🏎️Liquidation Engine
Liquidation is the most critical feature in any lending protocol. In order to guarantee the safety of the lender's funds, the liquidation engine must be airtight, not letting the account health to deteriorate below the minimum threshold.
This is the process of liquidation:
The margin account health (a function of collateral ratio) goes below a minimum threshold
Liquidator calls the "liquidate" instruction which
Repays USDC back to the lending pool at a specified discount (10%? of the account valuation)
Transfers ownership of the margin account to the liquidator, and zeroes out the account debt
The liquidator can then withdraw the assets or use the account for future trading? (TODO)**
Last updated