Lending and interest

supply(marketId, coinSide, amount) deposits USDC (coinSide = false) or the coin (coinSide = true) into a market and mints shares. withdraw(marketId, coinSide, shares) burns shares for their current value.

Share value grows as borrowers pay interest. Interest accrues by the second on a borrow index.

Interest model

Utilization Borrow APR
0% 2%
80% (kink) 20%
100% 320%

Linear between the points. Lenders receive 90% of the interest; 10% goes to the protocol reserve. At 80% utilization the supply APR is 14.4%.

Withdrawals

A withdrawal is paid from the pool's free cash: what is supplied and not borrowed. When a pool is fully borrowed, cash comes back as positions close, add margin or get liquidated, and the steep rate above 80% pushes borrowers to close.

Lending a coin

A holder who lends a coin keeps the same number of coins plus interest, paid in that coin. The coin is lent to shorts, who sell it into the pool when they open and buy it back when they close.