Borrow Trade
Last updated
Last updated
Assume you want to borrow DAI on your ETH worth $2000. The following is a thorough example of a user borrowing DAI with an LTV ratio of 0.5 (50%) and $2000 worth of ETH as collateral. In the specific scenario, the user should get almost $1000 worth of DAI in return for their borrowing trade.
Consider a Notional liquidity pool between DAI and 1-year DAI (fDAI maturing in one year), 6-month DAI (fDAI maturing in 0.5 years), 3-month DAI (fDAI maturing in 0.25 years):
Proportion (P) = fCash / (DAI + fCash)
Exchange rate = ((1 / Scalar) * (ln(P / (1-P)))) + ((Anchor * time)+1) + (liquidityFee * time)
Interest rate = (Exchange rate - 1) / Time
Time = tenor span i.e. 1 = 1 year, 0.5 = 6 months and so on
For a borrowing trade, a user must provide collateral and mint fDAI pair (+ve fDAI and -ve fDAI) to execute a swap between +ve fDAI and cDAI.
Similar to a bond issuer, a borrower can mint positive fCash and negative fCash tokens based on the supplied collateral, collateral ratio, and the amount that the borrower wishes to borrow. The newly minted positive fCash token is swapped for cTokens. At the end of the borrowing trade, the borrower ends up with the amount they want to borrow denominated in cTokens, negative fCash (obligation to pay at maturity) tokens equivalent to the borrowed amount (cTokens).
Context: fCash Use-case
Now at an exchange rate of fDAI, fDAI value for DAI is computed to determine the quantity of fDAI to be minted. Here 1043 1-Year fDAI, 1021.5 6-Month fDAI, and 1010.75 3-Month fDAI are worth 1000 DAI (Collateral value * LTV).
After swapping +fDAI for DAI the DAI received is almost $1000. Note that a user portfolio will consist of -fDAI (equivalent to the amount of fDAI minted initially) and will also consist cDAI worth 1000 DAI (999.8 DAI here).
Proportion (P_n) = new fCash balance / (old DAI balance + old fCash balance)
Exchange rate = ((1 / Scalar) * (ln(P_n / (1-P_n)))) + ((Anchor * time)+1) + (liquidityFee * time)
DAI recieved = fDAI minted / Exchnage rate
Interest rate = (Exchange rate - 1) / Time
Time = tenor span i.e. 1 = 1 year, 0.5 = 6 months and so on
The pool and rates would look like this after the trade: