Last updated
Last updated
An LP can provide liquidity in any pool (1 Year, 6 Months, 3 Months) they wish for. This is fully automated in the v2 version which uses nTokens to provide liquidity across different maturity pools for the selected asset.
Following is an example of an LP providing 1000 DAI as liquidity in a single liquidity pool. Since fDAI to be minted depends on the current pool proportion, the example depicts 3 scenarios:
When pool proportion is shifted towards DAI (fDAI < DAI)
When pool proportion is balanced (fDAI = DAI)
When pool proportion is shifted towards fDAI (fDAI > DAI)
To provide liquidity with 1000 DAI a user must also mint +fDAI and -fDAI. After minting they can use fDAI to pair it with DAI to provide liquidity.
The quantity of +/-fDAI to be minted is computed based on the current balance of funds in the pool i.e. proportion. Notice that the +/-fDAI minted (denoted by fDAI supplied in the screenshot) is less in the pool where the proportion of fDAI is lower and vice-versa.
After the execution of the trade, the user's portfolio consists of the liquidity pool token (receipt tokens) and -fDAI. A crucial thing to notice is that the exchange rates and the interest rates are never changed with a liquidity provisioning trade.
Continuing the same example where a user wants to provide 1000 DAI as liquidity, we would be assuming that they are providing liquidity through nTokens. Providing liquidity through nTokens distributes the liquidity throughout all the active maturity pools for that specific asset (DAI in our case). This distribution depends on the parameter called Deposit Shares. For DAI, whatever amount of liquidity you provide would be distributed as 15%, 40% and 45% for 1 Year, 6 Months, and 3 Months maturity pools.
It is possible for all the pools to have a different proportion of funds in them. To better illustrate this, the following example includes 3 different proportions:
1 Year - 15% share - Pool proportion < 0.5 (fDAI < DAI)
6 Months - 40% share - Pool proportion = 0.5 (fDAI = DAI)
3 Months - 45% share - Pool proportion > 0.5 (fDAI > DAI)
With the above parameters, fDAI is minted based on the deposit share allocation and the pool proportion based on the respective pools.
Here is how the quantity of fDAI to be minted is computed:
1 Year - 15% share - 1000*0.15*(0.45/(1-0.45)) = 122.7
6 Months - 40% share - 1000*0.40*(0.5/(1-0.5)) = 400
3 Months - 45% share - 1000*0.45*(0.55/(1-0.55)) = 550
After the trade is executed, the nToken portfolio would consist of liquidity pool tokens and -fDAI of individual pools.