Last updated
Last updated
When a user borrows spot, he effectively trades Fixed Rate Tokens for Loan Tokens in the fixed rate pool. The user must first deposit collateral assets, then the protocol mints the user's an offsetting pair of Fixed Rate Tokens and Fixed Rate Debt Tokens. It then finds the lowest tick with Loan Tokens and swap the user's Fixed Rate Tokens for Loan Tokens using the exchangeRate formula. The Loan Tokens are redeemed for Underlying Tokens and sent to the borrower's wallet. This leaves the borrower with collateral assets and Fixed Rate Debt tokens in his Tenor account.
Let’s go through a different scenario using the initial pool state as the starting point:
Imagine a user wants to borrow 100 USD. He will deposit some ETH collateral, in this case 500$ in ETH. He will then mint an offsetting position of 106 Fixed Rate Tokens and 106 Fixed Debt Tokens. He will sell his 106 Fixed Rate Tokens in the fixed rate pool at the lowest USDC tick, in this case the 6% tick. The trade will be executed at an exchangeRate of 1.06 such that the borrower will add 106 Fixed Rate Tokens to the pool at the 6% tick and remove 100 USDC. The end state of the pool after this transaction will be the following:
Following his trade, the net borrower position will be the following:
500$ of ETH collateral
106 Fixed USDC Debt Tokens
100 USDC in the user’s wallet