Comment on page
Core Protocol Interaction Theoretical
Minting is the process of converting underlying assets in your canister balance to fTokens. fTokens allow you to earn money from the interest payments that borrowers owe to the protocol. The conversion between the amount of fTokens one receives from minting or the amount of underlying tokens one receives from redeeming their fTokens is given below.
If you look carefully at the equation and combine this with the fact that each minute a borrower owes the market money over time, the amount of underlying tokens you receive per fToken will never go below the amount you initially minted at.
Checks before redeeming
- 2.The market must have more total cash than you want to redeem
- 3.You can only redeem the amount of fTokens you have
Redeem underlying allows a user to specify the amount of underlying fTokens they would like to recieve from the protocol which gets converted to # of fTokens in the backend.
Checks before redeemUnderlying
- 2.NOTE: If you put more an underlying value which gets computed to be more than the fTokens you have, we will attempt to redeem all of your fTokens.
- 3.The market must have more total cash than you want to redeem
Borrow describes the amount of assets you can borrow. In order to borrow, you must have these checks.
- 1.More dollar liquidity in collateral than you plan to borrow
- 2.The market must have more cash than you can borrow
- 3.The amount to borrow must be greater than the default token fee.
Interest rates on borrows are accumulated by the following equation
UtilizationRateMantissa is not a atomic unit of our protocol and can be calculated using
After X amount of blocks, borrowed balances and total borrows get updated via
Specifying how much of your borrow balance you want to repay
NOTE: Due to increases in borrow amount as calling borrow accrues interest causing a change in the borrow balance, user's specifying a repayment amount for the entire balance may miss slightly. Therefore a specified repayment amount greater than the borrow balance will repay all borrows. Only the amount repaid will be taken from your balance so rest assured you are not being charged anymore than whats repaid.