Liquidation With OnVault
Liquidation with OnVault ensures that under-collateralized Vaults are promptly liquidated, maintaining the overall health of the protocol while protecting other users in the system. OnVault enables efficient liquidation mechanisms, leveraging the following steps and smart contract interactions.
Liquidation Process
Liquidation occurs when a Vault’s collateralization ratio (ICR) falls below the Minimum Collateralization Ratio (MCR), rendering it under-collateralized. The process is triggered by the following mechanisms:
Normal Mode Liquidation (TCR ≥ 125%)
If the Vault’s ICR < MCR (110%), the debt and collateral are redistributed to other active Vaults. A portion of the RP is reserved as gas compensation and sent to the liquidator.
If the Vault’s ICR ≥ MCR, no action is taken.
Recovery Mode Liquidation (TCR < 125%) In Recovery Mode, the system aims to increase the Total Collateralization Ratio (TCR) back to 125%. The liquidation behavior depends on the Vault's ICR:
ICR < MCR: Complete redistribution of debt and collateral (minus gas compensation) to active Vaults.
MCR ≤ ICR < TCR: Offset mechanism is applied, where collateral equal to 1.1× the debt remains in the system, while the surplus is sent to the
CollSurplusPool
for the borrower to claim later.ICR ≥ TCR: No action is taken.
Liquidation Trigger Mechanism
Anyone can trigger the liquidation process using the following public functions:
liquidateVaults()
: Automatically scans and liquidates under-collateralized Vaults.batchLiquidateVaults(address[] calldata _VaultArray)
: Liquidates a custom list of Vaults provided as an argument.
Gas Costs: The cost of liquidating multiple Vaults ranges between 60k to 65k gas per Vault, allowing the system to liquidate up to 95-105 Vaults in a single transaction.
Gains from Liquidations
Liquidators are incentivized through the following rewards:
200 USDAO for gas compensation.
0.5% of the liquidated collateral (RP) is sent directly to the liquidator.
Remaining collateral is either offset or redistributed, depending on the system’s mode.
OnVault Smart Contract Interaction
OnVault contracts manage the core liquidation logic:
VaultManager.sol
— Implements the liquidation logic and state management for each Vault.BorrowerOperations.sol
— Coordinates withVaultManager.sol
and pools to handle value transfers and updates during liquidation.CollSurplusPool.sol
— Holds surplus collateral for borrowers whose Vaults were liquidated but had ICR > MCR during Recovery Mode.
Liquidation in Mixed Modes (Offset and Redistribution)
Liquidation is categorized into two modes:
Pure Offset: Debt is entirely canceled by redistributing collateral to the protocol.
Complete Redistribution: Collateral and debt are directly assigned to active Vaults proportional to their stake.
Note: The system guarantees that all active Vaults remain sorted by their Individual Collateralization Ratio (ICR) to ensure fair redistribution of liquidated collateral and debt.
Gas Compensation Mechanism
To ensure liquidators are always incentivized:
The borrower’s Vault is required to maintain a 200 USDAO reserve for gas compensation.
Gas compensation is a combination of 200 USDAO + 0.5% of the Vault’s collateral.
This structure encourages prompt liquidation and protects the system from holding under-collateralized Vaults for extended periods.
Last updated