Fraxlend is a money market platform that allows anyone to create an isolated market between a pair of tokens.
Fraxlend is a money market platform that provides lending and borrowing services between any pair of ERC-20 tokens. Each pair is an isolated market and can be permissionlessly created as long as a Chainlink data feed exists. Lenders deposit collateral into a specific pair and receive yield-bearing fTokens in return at the current exchange rate. fTokens can be redeemed for an ever-increasing amount of the underlying asset over time (e.g. the fToken exchange rate increases over time as more interest is accrued). Borrowers provide collateral to a token pair and receive asset tokens (FRAX). Borrowing incurs an interest cost which is capitalized and paid to lenders upon redemption of fTokens. Each token pair on Fraxlend relies on an oracle to determine the market rate for both the asset token and the collateral token. Each pair is also deployed with a rate calculator, which are contracts that calculate the interest rate based on the amount of available capital to borrow (e.g. less borrowing equals lower rates and vice versa).
When a borrower's LTV (loan-to-value) rises above the maximum threshold, any user can repay all or a portion of the debt on the borrower's behalf (by default the max LTV is set to 75%). The liquidator receives an equal value of collateral plus a liquidation fee. This fee is immutable and defined at deployment for a token pair (by default, the value is set to 10%). In cases of high market volatility, liquidators may not be able to close the unhealthy position before LTV exceeds 100%. In this scenario, the Fraxlend protocol would accumulate bad debt. The liquidator would repay the max amount of the borrower's position covered by the collateral, while the remaining bad debt is borne by the remaining lenders of that token pair (e.g. reduced from the total claims that all lenders have on underlying capital). This mechanism serves to protect lenders from a bank run, where the last lender to withdraw liquidity is effectively holding worthless fTokens.
The Frax protocol can lend FRAX externally on protocols like Aave or Compound or internally via Fraxlend to earn yield and expand the FRAX circulating supply. This is what Frax refers to as its Lending AMOs (automated market operations). Since borrowers must over-collateralize FRAX on these platforms, the protocol can perpetually supply lending markets with newly minted FRAX. This allows FRAX to diversify its collateral type by leveraging these money markets. Lending AMOs also allow the Frax protocol to control the FRAX interest rate across money markets. By minting and supplying new FRAX into these markets, it lowers the cost to borrow for users, and vice versa, by withdrawing and burning supplied FRAX, it reduces the supply and raises borrowing rates.