Liquidation Flow (Brief)
Liquidation Flow (Brief)
If a borrower’s position becomes under-collateralized (health factor falls below 1.0 due to asset price changes or accrued interest), it enters a state where liquidation is possible. A liquidator (an external actor) can call the liquidationCall()
on the LendingPool, specifying the target borrower, the debt asset to repay, and the collateral to seize. PrimeFi’s liquidation logic (largely inherited from Aave’s) will allow up to a certain portion of the outstanding debt (e.g. 50%, defined by close factor) to be repaid. The liquidator must provide the debt asset (plus a liquidation bonus, e.g. 5-10% extra, which incentivizes liquidators) which goes to repay the borrower’s debt. In return, the liquidator receives a corresponding amount of the borrower’s collateral asset, discounted by the bonus. Under the hood, the borrower’s debt tokens are burned for the forgiven portion, and their aTokens (or underlying collateral) are transferred to the liquidator. The result is that the borrower’s debt is partially cleared and their collateral is reduced. This brings the account back to a safer state (health factor above 1) or, if fully liquidated, closes the loan. The LendingPool enforces all the rules (using price oracles, collateral limits, and bonus rates) to ensure fairness. Liquidation events are critical on-chain decisions to manage risk; they do not rely on any off-chain trigger aside from price feeds. PrimeFi’s contracts emit events when liquidations occur, and the AddressesProvider’s emergency admin could pause the protocol in extreme conditions to halt liquidations if the oracle prices were compromised.
Last updated