What's in it for me?
How can I benefit from this protocol as both a lender or a borrower?
So all of this is great but what is in it for the user? Well:
- 1.Lenders do not need to worry about where to provide liquidity or keep moving capital searching for yields. One pool with sustainable APRs to rule them all!
- 2.Borrowers have the freedom to use capital anywhere in a variety of protocols. This is in contrast to current margin protocols where the capital is restricted within the protocol itself.
The loans provided are under-collateralized, i.e. borrowers can borrow more than the collateral deposited. The loans including the deposited collateral can be used on any of the whitelisted protocol
In Xenon, each margin account is a PDA which holds both the lender's and the borrower's assets. The priveleges to the PDA are programmatically controlled in a way so as to allow the borrower to only borrow funds in a ratio of the collateral deposited, and only withdraw when the whole of the loan is repayed back to the lending pool. That means that the borrower cannot run away with the funds and the PDA has the full custody of the assets. Each margin account has a health factor which is a function of the collateral ratio = assets/liabilities. In the event of the health factor approaching zero, the margin account is subject to liquidation. Anyone would be able to liquidate a margin account once it reaches the threshold.
- 1.Lender deposits assets (USDC) into the lending pool. They receive xeUSDC tokens, which represent their share in the pool. xeUSDC is an interest-bearing token, so its value always accrues over time and its price reflects the cumulative interest rate accrual in the asset pool. Ex: If the lender deposits 1000 USDC into the pool and the current price is 1 xeUSDC = 1.25 USDC, he would receive 1000/1.25 = 800 xeUSDC tokens
- 2.When the lender withdraws his capital from the pool, the xeUSDC tokens would be burned and an equivalent amount of USDC will be returned to the lender as per the exchange rate of xeUSDC at that point. Ex: If the rate of xeUSDC increases to 1.5 (due to interest accrual in the pool), the lender would be returned 800 * 1.5 = 1200 USDC, thereby earning him an interest of 200 USDC.
- 1.The first step for a borrower is to create a margin account. The margin account is the PDA which would hold the custody of funds and allow borrowers to trade using the funds.
- 2.The borrower then deposits the collateral amount into the margin account.
- 3.The borrower then borrows funds from the lending pool upto 2x of the collateral deposited
- 4.The borrower can then trade on the whitelisted protcols using all of the funds in the margin account
- 5.The borrower repays back the funds borrowed to the lending pool in USDC(along with the borrow interest)
- 6.The borrower can then withdraw the assets from the margin account