Liquidations
Last updated
Last updated
Liquidation reasons:
All assets are calculated in USD value and called collateral and borrowing principal balances (using Price Oracles);
Minimum C-Ratio - depends on the collateral type and market situation. The borrow can not be more than the collateral value multiplied by C-Ratio parameter for particular asset (C parameter, for stables it is 95% and for example ETH/WETH/BTC/WBTC - it is 70%:
Current C-Ratio - ratio between collateral principal balance and borrowing principal balance (can be 300% or 125%);
Liquidation threshold = 95% (if the borrowed asset principal balance exceeds 95% of the collateral principal balance - liquidation happens):
Health Factor - Sum of Collateralized Assets per their prices multiplied by liquidation threshold 0.95 and divided by the sum of all Borrowed Assets per their prices:
User Liquidation function
Checking health factor. If the health factor is below 1, then we start liquidation. If the health factor is higher than 1, revert and return an error.
Liquidator funds the balances of all user debts (together with interest). User debt no longer counts towards total borrow balance.
We transfer all the user's oTokens (along with the deposit interest) from his wallet to the liquidator's wallet. And until withdraw these oTokens remain to generate yield.
Liquidation is called by any individual who have figured liquidation opportunity and has enough assets to clear the debt positions.
Example:
User deposited USDC and borrowed WBTC;
WBTC price has increased significantly -> user’s health factor dropped below 1.0;
Liquidator tracks all collaterals and find this event. Liquidator initiates Liquidation function and smart contracts transfers corresponding amount of oUSDC tokens to Liquidators wallet after successful funding of WBTC debt balance of the user.
Liquidator receives up to 5% of premium for clearing a bad dept from the platform as a mechanism of community incentivization to participate in protocol workflow.