A liquidation call is a critical risk-management function in overcollateralized lending protocols like Aave, Compound, and MakerDAO. It occurs automatically when a user's health factor or collateralization ratio drops below a predefined safe level (e.g., 1.0). This happens because the value of the borrowed assets (debt) has risen relative to the value of the posted collateral, often due to market volatility. The primary purpose is to protect the protocol and its lenders from bad debt by ensuring loans are always sufficiently backed.
Liquidation Call
What is a Liquidation Call?
A liquidation call is an automated enforcement mechanism in decentralized finance (DeFi) that is triggered when a borrower's collateral value falls below a required minimum threshold, forcing the sale of assets to repay an outstanding loan.
The process is executed by liquidators—bots or users who repay a portion of the undercollateralized debt in exchange for the borrower's collateral at a discounted rate. This discount, known as the liquidation penalty or bonus, incentivizes third parties to participate in the process swiftly. For example, a protocol may allow a liquidator to repay $100 of a borrower's debt to seize $105 worth of their collateral, profiting from the 5% discount. The specific parameters—such as the liquidation threshold, penalty, and the maximum amount that can be liquidated in a single transaction—are set by each protocol's governance.
For borrowers, a liquidation call results in a loss of a portion of their collateral and the payment of the penalty, effectively closing part of their leveraged position at a loss. To avoid liquidation, users can add more collateral or repay part of their debt to improve their health factor. This mechanism is fundamental to maintaining the solvency of DeFi lending markets without relying on centralized intermediaries, though it introduces significant liquidation risk for highly leveraged positions during periods of extreme market stress or network congestion.
How a Liquidation Call Works
A detailed breakdown of the automated process that protects lenders by closing undercollateralized positions in decentralized finance.
A liquidation call is an automated process in decentralized finance (DeFi) protocols that is triggered when a borrower's collateral value falls below a predefined liquidation threshold, forcing the sale or seizure of their assets to repay the outstanding loan and protect lenders. This mechanism is a critical risk-management feature for overcollateralized lending platforms like Aave and Compound, ensuring the solvency of the lending pool. The call is executed by external actors known as liquidators, who are incentivized with a liquidation bonus for closing the risky position.
The process is governed by a user's Health Factor, a numerical representation of their loan's safety. This factor is calculated as (Total Collateral Value * Liquidation Threshold) / Total Borrowed Value. When this value drops to or below 1.0, the position becomes eligible for liquidation. Protocols often set the actual call threshold slightly higher (e.g., 1.1) to provide a buffer. Monitoring this factor in real-time is essential for borrowers to avoid involuntary closure of their positions due to market volatility.
Once triggered, the liquidation call allows a liquidator to repay a portion or all of the borrower's outstanding debt using the protocol's native stablecoin. In return, the liquidator can seize a corresponding amount of the borrower's collateral at a discounted rate, which constitutes their profit. For example, a liquidator might repay $100 of a user's debt to receive $105 worth of the user's ETH collateral—a 5% bonus. This auction-like mechanism ensures bad debt is quickly resolved, keeping the protocol's books balanced.
The technical execution varies by protocol. Some use a fixed percentage discount model, while others employ a Dutch auction where the discount decreases over time. The call is permissionless, meaning any user with the necessary capital can act as a liquidator, creating a competitive market for resolving insolvencies. This design aligns economic incentives, as liquidators are financially motivated to maintain the protocol's health, which in turn secures all lenders' funds.
For borrowers, a liquidation call results in significant losses, as assets are sold at a discount during potentially unfavorable market conditions. Strategies to avoid this include using stablecoins as collateral, maintaining a high Health Factor through overcollateralization, and utilizing debt monitoring tools or liquidation protection services. Understanding this mechanic is fundamental to assessing the risks and responsibilities of participating in DeFi lending markets.
Key Features of a Liquidation Call
A liquidation call is a critical automated process in DeFi lending protocols that occurs when a borrower's collateral value falls below a required threshold, triggering the forced sale of their assets to repay the debt.
Health Factor Threshold
The primary trigger for a liquidation call is the Health Factor (HF) dropping below 1.0. The HF is calculated as (Collateral Value * Collateral Factor) / Borrowed Value. When market volatility reduces collateral value or increases borrowed value, this ratio falls, signaling the position is undercollateralized and at risk.
Liquidation Incentive (Bonus)
To incentivize third-party liquidators (keepers or bots) to execute the call, protocols offer a liquidation bonus. This is a discount (e.g., 5-10%) on the seized collateral, allowing liquidators to buy assets below market price, repay the debt, and keep the difference as profit. This ensures the system remains solvent.
Partial vs. Full Liquidation
Protocols often use partial liquidation to minimize market impact and user loss. Instead of closing the entire position, only enough collateral is sold to restore the Health Factor above the safe threshold (e.g., 1.1). This is more common than full liquidation, which closes the position entirely and returns any remaining collateral.
Liquidation Auction Mechanisms
To ensure fair asset pricing and prevent predatory liquidations, some protocols use auction-based models (e.g., Dutch or English auctions). Instead of a fixed discount, collateral is sold to the highest bidder over a short period. This mechanism, used by protocols like MakerDAO, aims to maximize recovery for the system and the borrower.
Gas Price Competition
Liquidation is a highly competitive, profit-driven activity. Liquidators run sophisticated bots that monitor the mempool for undercollateralized positions. Execution speed is critical, leading to gas price auctions where liquidators pay high transaction fees to be the first to submit a profitable liquidation transaction, a process known as MEV (Maximal Extractable Value) extraction.
Cross-Protocol Liquidation Risk
A single asset's price drop can trigger cascading liquidations across multiple protocols where it is used as collateral (e.g., ETH on Aave, Compound, and Maker). This systemic risk can lead to rapid, broad sell pressure, exacerbating the initial price decline—a phenomenon observed during major market downturns like the March 2020 "Black Thursday."
The Role of Keeper Bots
An explanation of how automated agents, known as keeper bots, monitor and execute liquidation calls to maintain the solvency of decentralized lending protocols.
A liquidation call is a critical risk-management mechanism in decentralized finance (DeFi) lending protocols, triggered automatically when a borrower's collateral value falls below a required minimum threshold, known as the liquidation ratio. This event initiates a process where a portion of the borrower's collateral is forcibly sold to repay their outstanding debt, protecting the protocol and its lenders from losses. The primary actors responsible for detecting these conditions and executing the liquidation are keeper bots—specialized, automated software agents that monitor blockchain state and submit transactions for profit.
Keeper bots operate by continuously scanning the blockchain for undercollateralized positions. When a position's health factor drops below 1.0 (or a similar protocol-specific threshold), it becomes eligible for liquidation. The first keeper to successfully submit a liquidation transaction earns a liquidation bonus or fee, typically a percentage of the collateral seized. This creates a competitive, permissionless marketplace for keepers, ensuring liquidations are executed swiftly and efficiently without relying on a centralized entity. Their role is essential for maintaining the overall solvency and stability of the lending pool.
The technical execution involves the keeper bot calling a specific smart contract function, such as liquidate() or liquidatePosition(). The contract then calculates the exact amount of debt to be repaid and the corresponding collateral to be seized, applying any penalties or bonuses. This process often occurs via a public liquidation auction or a fixed-discount sale. By automating this enforcement, keeper bots solve the oracle problem of who acts when a position becomes risky, ensuring the protocol's rules are enforced trustlessly and in real-time, which is fundamental to DeFi's non-custodial ethos.
Running a profitable keeper operation requires significant technical infrastructure, including low-latency blockchain node connections, efficient transaction bundling to minimize gas costs, and sophisticated risk models to calculate potential profit margins after fees. Major protocols like MakerDAO, Aave, and Compound all rely on this ecosystem of keepers. The economic incentives must be carefully calibrated by protocol designers: if the bonus is too low, keepers may not act, risking protocol insolvency; if it is too high, it can lead to overly aggressive liquidation and user dissatisfaction.
In summary, keeper bots are the autonomous enforcers of DeFi's collateralized debt contracts. Their continuous, profit-driven monitoring and execution of liquidation calls are what allow these permissionless systems to manage counterparty risk without intermediaries. This creates a robust, self-regulating financial primitive where the security of lenders' funds is mechanically enforced by open-market incentives and code.
Protocol Examples & Implementations
A liquidation call is a critical risk management mechanism in DeFi lending protocols, triggered when a borrower's collateral value falls below a required threshold, allowing liquidators to repay the debt in exchange for the collateral at a discount.
Liquidation Mechanics Comparison
A comparison of key operational parameters and mechanisms for liquidation calls across major DeFi lending protocols.
| Mechanism / Parameter | Compound / Aave (v2/v3) | MakerDAO | dYdX (Perpetuals) | Liquity |
|---|---|---|---|---|
Primary Trigger | Health Factor < 1 | Collateralization Ratio < Liquidation Ratio | Maintenance Margin < 0 | Collateralization Ratio < 110% |
Liquidation Bonus (Discount) | 5-15% | 13% (for ETH-A) | N/A (Perpetual) | 10% (Minimum) |
Liquidation Penalty (Fee) | 5-15% | 13% (for ETH-A) | N/A (Perpetual) | 0.5% (to Stability Pool) |
Liquidation Size | Up to 50% of debt (Aave), Up to 100% (Compound) | Entire vault (Fixed Spread), Partial (Liquidations 2.0) | Entire position | Entire debt position |
Liquidation Executor | Any public liquidator | Keepers (Liquidations 2.0) | Keepers | Stability Pool or public liquidators |
Gas Cost Reimbursement | No | Yes (Liquidations 2.0) | Yes (via fee rebate) | No |
Auction Mechanism | Fixed-price discount sale | Collateral auction (English, Dutch) | N/A (Perpetual) | Fixed-price sale via Stability Pool, then Dutch auction |
Maximum Slippage Protection | No | Yes (via auction parameters) | Yes (via oracle price bands) | No (fixed redemption price) |
Security & Economic Considerations
A liquidation call is an automated process in DeFi lending protocols that seizes and sells a borrower's collateral when their loan becomes undercollateralized, protecting lenders from bad debt.
The Liquidation Trigger
A liquidation is triggered when a borrower's Health Factor falls below 1.0. This occurs when the value of their collateral, relative to their borrowed assets, drops below the protocol's required Liquidation Threshold. The calculation is:
- Health Factor = (Collateral Value Ă— Liquidation Threshold) / Total Borrowed Value When this ratio dips below 1, the position is flagged for liquidation to prevent the loan from becoming insolvent.
The Liquidation Process
Once triggered, a liquidator (often a bot) repays a portion or all of the borrower's outstanding debt in exchange for the collateral at a discounted rate, known as the liquidation bonus. Key steps:
- The liquidator calls the protocol's
liquidate()function. - They repay the borrower's debt using stablecoins or the borrowed asset.
- They receive the equivalent value of the collateral, plus the bonus, which serves as their profit.
- Any remaining collateral is returned to the borrower if the debt is fully cleared.
Liquidation Bonus & Penalty
The liquidation bonus (or incentive) is a critical economic mechanism. It's a discount (e.g., 5-15%) applied to the seized collateral's value, rewarding liquidators for their service and capital. Conversely, for the borrower, this acts as a liquidation penalty, as they lose more collateral than the debt repaid. This penalty is a primary risk of borrowing and is designed to encourage users to maintain healthy collateral ratios.
Maximizing Capital Efficiency vs. Safety
Borrowers face a trade-off: using a high Loan-to-Value (LTV) ratio maximizes capital efficiency but increases liquidation risk. A small drop in collateral value can trigger a call. Safer strategies involve:
- Borrowing well below the max LTV.
- Using stable, less volatile assets as collateral.
- Actively monitoring positions during market volatility.
- Setting up automated alerts for Health Factor changes.
Systemic Risks & Cascading Liquidations
During extreme market volatility, mass liquidations can create systemic risk. A sharp price drop can trigger many calls simultaneously, leading to:
- Cascading liquidations: Forced sales of collateral further depress its market price, triggering more liquidations.
- Liquidator congestion: The network may become congested, delaying transactions and causing failed liquidations.
- Bad debt: If collateral value falls too fast and liquidators are absent, the protocol may be left with unrecoverable loans.
Key Protocol Parameters
Protocols manage risk by configuring specific parameters that define the liquidation mechanics:
- Liquidation Threshold: The collateral value percentage at which liquidation begins (e.g., 80% for ETH).
- Liquidation Bonus: The discount offered to liquidators (e.g., 5%).
- Close Factor: The maximum percentage of a borrower's debt that can be liquidated in a single transaction.
- Liquidation Reserve: A small fee retained by the protocol from the collateral sale. Governance often adjusts these based on market conditions.
Common Misconceptions
Liquidation is a critical risk management mechanism in DeFi, but it's often misunderstood. This section clarifies the most frequent misconceptions about how liquidations are triggered, executed, and who benefits.
A liquidation call is an automated, permissionless function that is triggered when a user's collateralized debt position (CDP) falls below a protocol's required collateralization ratio. It is not a phone call or a warning; it is the execution of a smart contract function that allows a third party (a liquidator) to purchase the undercollateralized assets at a discount, repaying the user's debt and returning any excess collateral. The process is designed to protect the lending protocol from bad debt by ensuring loans are always overcollateralized.
How it works:
- A user's Health Factor (e.g., on Aave) or Collateral Ratio (e.g., on MakerDAO) drops below the liquidation threshold.
- The position becomes eligible for liquidation. Liquidators monitor the blockchain for these opportunities.
- A liquidator calls the
liquidate()function, supplying the debt tokens to repay the loan. - In return, they receive the user's collateral at a liquidation bonus (a discount, e.g., 5-15%).
- Any remaining collateral after the debt is repaid is returned to the original user.
Code Example (Pseudocode)
A practical walkthrough of the core logic that triggers and executes a liquidation in a decentralized lending protocol.
A liquidation call is a function invoked when a borrower's collateralization ratio falls below a predefined liquidation threshold, initiating the forced sale of their collateral to repay their debt. The following pseudocode outlines the typical sequence of checks and state changes. It begins by verifying the borrower's current health factor, ensuring the account is eligible for liquidation, and then calculates the precise amount of debt to be repaid and collateral to be seized, often offering a liquidation bonus to the liquidator as an incentive.
The core logic involves fetching the user's debt and collateral balances, then computing the health factor. If this value is below 1.0 (or the protocol's specific threshold), the call proceeds. The function then determines the liquidation amount, which is often capped at a percentage of the user's debt to prevent overly punitive liquidations. A critical step is the transfer of the debtAsset from the liquidator to the protocol to cover the debt, followed by the transfer of the collateralAsset from the borrower to the liquidator, discounted by the liquidation bonus.
Key Pseudocode Steps
- Check Health Factor:
if (healthFactor < 1.0) revert("Healthy account"); - Calculate Max Liquidation:
maxLiquidation = min(userDebt, collateralValue * maxLTV); - Execute Asset Swaps: Transfer debt tokens from liquidator to protocol, burn the borrower's debt, and send collateral tokens to liquidator.
- Update State: Recalculate and store the borrower's new health factor after the liquidation. This step is crucial to prevent the same position from being liquidated multiple times in the same block.
In practice, protocols like Aave or Compound implement variations, such as using a liquidation close factor to limit the size of a single liquidation or employing price oracles within the health factor calculation. The pseudocode abstracts away gas optimizations and specific token standards (e.g., ERC-20 transferFrom), but captures the essential economic and state-machine logic that ensures protocol solvency by automatically enforcing collateral requirements.
Frequently Asked Questions (FAQ)
A liquidation call is a critical event in DeFi lending protocols where a borrower's collateral is automatically sold to repay their debt. This section answers common questions about how it works, its triggers, and its consequences.
A liquidation call is an automated process in a decentralized finance (DeFi) lending protocol that is triggered when a borrower's collateral value falls below a required threshold, forcing the sale of that collateral to repay their outstanding debt. This mechanism protects the protocol from bad debt by ensuring loans are always over-collateralized. When a user's health factor (a ratio of collateral value to borrowed value) drops below 1.0 (or a protocol-specific threshold like 1.1 on Aave), the position becomes eligible for liquidation. Any network participant, known as a liquidator, can then repay a portion or all of the borrower's debt in exchange for the collateral at a discounted rate, known as the liquidation bonus. This process is non-negotiable and happens via smart contracts without human intervention.
Get In Touch
today.
Our experts will offer a free quote and a 30min call to discuss your project.