Overview
When a borrower’s health factor drops below 1.0 in Pooled Markets, anyone can callliquidationCall on the Pool contract to repay part of the debt and receive discounted collateral. This guide covers the mechanics and provides integration examples.
For Mewler (Euler V2) liquidation mechanics, see the HypurrFi Markets Agent Reference.
How Liquidation Works
Health Factor
- HF > 1.0 → position is safe
- HF = 1.0 → at liquidation threshold
- HF < 1.0 → position can be liquidated
Close Factor
Liquidators can repay up to 50% of the borrower’s debt in a singleliquidationCall. Setting debtToCover to type(uint256).max will liquidate the maximum allowed amount.
Liquidation Bonus
Liquidators receive collateral at a discount. The bonus varies per asset and is encoded in the reserve configuration bitmap (bits 32–47). Typical values are 5–10%.Pool.liquidationCall
| Parameter | Description |
|---|---|
| collateralAsset | Address of the collateral reserve to seize |
| debtAsset | Address of the debt reserve to repay |
| user | Address of the borrower being liquidated |
| debtToCover | Amount of debt to repay. Use type(uint256).max for maximum (50% of debt) |
| receiveAToken | true to receive hyTokens, false to receive the underlying asset |
The liquidator must
approve() the Pool contract to spend debtToCover of the debtAsset before calling liquidationCall.Integration Example
1. Monitor Positions
2. Calculate Profitability
3. Execute Liquidation
Key Contract Addresses
| Contract | Address |
|---|---|
| Pool | 0xceCcE0EB9DD2Ef7996e01e25DD70e461F918A14b |
| PoolAddressesProvider | 0xA73ff12D177D8F1Ec938c3ba0e87D33524dD5594 |
| HyFiOracle | 0x9BE2ac1ff80950DCeb816842834930887249d9A8 |
| ProtocolDataProvider | 0x895C799a5bbdCb63B80bEE5BD94E7b9138D977d6 |
References
- Pool API Reference — full
liquidationCallmethod documentation - HyFiOracle — querying asset prices
- HyFiProtocolDataProvider — querying reserve parameters