Liquidation
If a user breaches their max LTV or if their health factor drops below 1, they will become eligible for liquidation. When a user gets liquidated, the liquidator can purchase 40% or more of their collateral at a discount.
For example, consider a user who has borrowed 1,000 USDC against 1 ETH worth 2,000 USDC for an LTV of 50%. Assume the max LTV is 75% and the liquidation discount is 5%. Here's what will happen if the ETH price falls to 1,300 USDC.
In this example, the liquidated account is returned to a healthy LTV of 0.655 and the liquidator earns a profit of 31.2 USDC.
Liquidation discount
The size of the liquidation discount is the sum of two parts:
The exchange rate discount. This discount depends on what currency the user is borrowing and what currency they're using as collateral. This discount is larger for volatile pairs and smaller for stable pairs.
The collateral asset type discount. This discount depends on whether the user is holding their collateral as prime cash, nTokens, or fCash. For prime cash, this discount is 0%. But for nTokens and fCash it will be positive and vary by currency.
Exchange rate discount
Each currency has its own liquidation discount. For example, the ETH liquidation discount is 6% and the USDC liquidation discount is 4%. The discount that will be used in liquidation is the greater of the collateral asset discount and debt asset discount.
Collateral asset type discount
Prime cash: zero additional discount.
fCash: fCash collateral asset type discounts work similarly to fCash haircuts. They are not flat percentages - they are discounts based on adjustments to the oracle rate. This means that liquidation discounts vary in size depending on the time to maturity of the fCash asset.
nTokens: nTokens have a flat discount percentage that varies by currency. For example, nETH has a 2% collateral asset type discount.
Example calculations
Here are some example liquidation discount calculations for users with different portfolios.
Example 1: prime ETH collateral vs. fUSDC debt
Example 2: fETH collateral vs. fUSDC debt
Example 3: nETH collateral vs. fUSDC debt
Single-currency liquidation discounts
Some accounts have debts that are in the same currency as their collateral. For example, a user might have a prime USDC debt against nUSDC collateral. In these scenarios, the liquidators will not receive an exchange rate discount.
This means that the only liquidation discount for single-currency liquidations is the collateral asset type discount.