Minting an MTK

A portfolio manager (PM) can create a new portfolio with a set of tokens of their choice, specifying the weight each token must have in the portfolio. The weight of a token indicates the proportion of the total Lovelace value locked in the portfolio (i.e. if the weight of a token is 0.3, and the TVL of the portfolio is 10.000.000 LVC, this means that the portfolio must contain the equivalent of 3.000.000 LVC of that token).

For the initial version, the site admin will act as PM, but the smart contract will be designed in a way that it's possible to allow any user to create a portfolio. The amount of MTK tokens minted upon the creation of the portfolio is set by the PM, who also specifies the portfolio's settings and strategy.

Users that want to interact with the portfolio (either deposit or withdraw tokens) must place an order, which will be processed, one at the time, by the portfolio admin. This means that interactions with the portfolio are not immediate. This also extends to PM interactions with the portfolio, with a difference: portfolio manager's orders will not be enqueued like user orders; they will have priority and be processed as soon as they are created.

Any user can place an order to deposit in the portfolio. To place an order, the Lovelace price of each token must be specified. A fee will be charged to each user that makes a deposit. This fee will be a percentage set and fixed in the portfolio, and will be charged in MTK when the order is processed. The fees will be stored in the portfolio for later collection by the portfolio manager. When processed, the tokens in the order will be deposited in the portfolio and an amount of MTK will be minted: most of it will got to the user that made the deposit, and the rest is kept as fees.

Users can then redeem these MTK by placing a withdraw order with the desired amount of MTK. When processed, the MTK in the order are burned, and users are paid tokens from the portfolio.

Fluctuations in token prices and potential portfolio weight updates made by the Portfolio Manager (PM) may lead to an imbalance in the portfolio. When an order is placed, the user is provided with an estimated payout based on the portfolio balance at that specific moment. However, since orders are not processed immediately, the actual payout for the user might be lower than the initial estimate. For deposits, this means that the actual tokens deposited could be less than what was indicated in the order. Consequently, the user would get back the tokens that couldn't make it into the deposit and also receive less MTK than initially shown. Similarly, for withdrawals, users may receive tokens for a Lovelace equivalent amount less than the initially indicated value. To address this issue, orders include a slippage tolerance, which is a permissible deviation from the initial payout estimation. For example, if a user placing a deposit order is shown an estimation of a 100 MTK payout, a slippage tolerance of 1% would mean that they would accept no less than a 99 MTK payout for the deposit. Analogously for withdrawals, users would set a slippage over the Lovelace equivalent of the payout tokens.

After creating an order, the user can cancel it before it's processed. The user will get back the tokens they deposited, either MTK or the portfolio tokens.

The PM can update the portfolio settings, specifically the target weights assigned to each token within the portfolio. They can do so by placing an update order, which is a special kind of order only available to them, and waiting for it to be processed. These updates (along with the market Lovelace price of the token) lead to the portfolio becoming unbalanced relative to the target weights, so user deposits and withdraws are calculated to approximate the target weights described in the portfolio.

To collect the metera fees accumulated in the portfolio, the PM must set a collect order, which is the other special kind of order. Once it's processed, the fees in the portfolio will be paid to the PMs address.

*** Please keep in mind this document is a work in progress, things may change as the project evolves ***

Last updated