Clean workspace with lending analytics, a notebook, and a blockchain finance interface.
Glossary

Liquidation

A liquidation is the forced sale of a borrower's collateral in a decentralized finance (DeFi) lending protocol, triggered automatically when their loan's health factor falls below 1, to repay the outstanding debt and maintain the protocol's solvency.
definition
DEFINITION

What is Liquidation?

A core risk mechanism in DeFi lending and leveraged trading protocols.

Liquidation is the forced sale of a user's collateralized assets in a decentralized finance (DeFi) protocol when their loan's health factor falls below a predefined threshold, typically due to a decline in collateral value or an increase in borrowed asset value. This automated process protects the protocol from undercollateralized loans by selling the collateral, repaying the user's debt plus a liquidation penalty, and returning any remaining value to the user. It is a critical risk management tool for maintaining protocol solvency.

The process is triggered by a liquidation threshold or health factor, a numerical value representing the safety of a loan. For example, if a user deposits $150 of ETH as collateral to borrow $100 of USDC, a 10% drop in ETH's price could push their collateral value near the liquidation point. Liquidators—third-party bots or users—are incentivized to trigger the liquidation by repaying part or all of the outstanding debt in exchange for the collateral at a discounted rate, known as the liquidation bonus. This creates a competitive market for risk management.

Liquidation mechanics vary by protocol but generally involve an auction or instant sale model. In MakerDAO, liquidations occur via collateral auctions. In Aave and Compound, liquidators can purchase collateral at a fixed discount in a single transaction. Key risks for borrowers include liquidation cascades (or "death spirals") during high volatility, where mass liquidations drive collateral prices down further. Users must actively monitor their loan-to-value (LTV) ratio and can use tools like decentralized price oracles and safety modules to manage this risk.

how-it-works
MECHANISM

How Does Liquidation Work?

Liquidation is a critical risk-management mechanism in DeFi lending protocols that automatically closes an undercollateralized loan to protect lenders from losses.

Liquidation is triggered when a borrower's collateralization ratio falls below a protocol's predefined liquidation threshold. This typically occurs due to a drop in the value of the collateral asset or a rise in the value of the borrowed asset. For example, if a user deposits ETH as collateral to borrow DAI, a sharp decline in ETH's price could push their loan into an undercollateralized state, making it eligible for liquidation. The protocol's smart contracts continuously monitor these ratios via price oracles to determine when this condition is met.

Once triggered, the liquidation process is opened to third-party participants known as liquidators. These are bots or users who repay a portion or all of the outstanding debt on behalf of the insolvent borrower. In return, they receive the borrower's collateral at a discounted rate, known as the liquidation penalty or incentive. This discount, often between 5-15%, ensures liquidators are compensated for their service and capital risk. The specific amount of debt repaid and collateral seized is governed by the protocol's liquidation close factor.

The primary purpose of liquidation is to ensure the solvency of the lending pool. By swiftly closing risky positions, the protocol guarantees that lenders can always withdraw their funds and that the total value of borrowed assets never exceeds the total value of collateral backing them. This automated enforcement is a foundational difference from traditional finance and is essential for maintaining trust in permissionless, non-custodial systems. Without it, bad debt could accumulate and destabilize the entire protocol.

For borrowers, liquidation results in a significant loss of their collateral. To avoid this, they must actively manage their health factor or collateral factor, often by adding more collateral or repaying debt. Key risks include liquidation cascades (or "death spirals"), where many positions are liquidated in a volatile market, creating intense sell pressure on the collateral asset and driving its price down further. Protocols implement parameters like liquidation bonuses and debt ceilings to mitigate such systemic risks.

Different protocols employ varying liquidation models. Compound and Aave use a fixed-percentage discount auction model. MakerDAO utilizes a collateral auction (flip, flap, or flap auctions) for its vaults. Liquidation engines can also be Dutch auctions, where the discount decreases over time, or batch auctions that process multiple underwater positions simultaneously. Understanding the specific mechanics of a protocol's liquidation system is crucial for both borrowers managing risk and liquidators seeking profit.

key-concepts
MECHANISMS & TERMINOLOGY

Key Concepts in Liquidation

Liquidation is the forced closure of an undercollateralized loan position in DeFi. These concepts define how it is triggered, executed, and managed.

01

Health Factor

A numerical metric representing the safety of a borrowing position, calculated as the ratio of the collateral value to the borrowed value. When the Health Factor drops below 1.0 (or a protocol-specific threshold like 1.1), the position becomes eligible for liquidation. It is the primary risk indicator for users and liquidators.

  • Formula: (Collateral Value * Collateral Factor) / (Borrowed Value + Accrued Interest)
  • Example: A position with $10,000 ETH collateral and a $5,000 USDC loan might have a Health Factor of 2.0. If ETH price drops 30%, the factor could fall below the threshold.
02

Liquidation Threshold

The specific Health Factor value at which a position becomes eligible for liquidation, set by the lending protocol. It acts as a buffer below the theoretical insolvency point (HF = 1.0) to account for price volatility and ensure liquidators have time to act.

  • Typical Range: Between 1.0 and 1.5.
  • Purpose: Provides a safety margin to protect the protocol from bad debt.
  • Variable by Asset: Riskier collateral assets may have lower thresholds.
03

Liquidation Bonus (Incentive)

A discount offered to liquidators when they purchase a borrower's collateral, serving as the economic incentive for the liquidation process. The liquidator repays part of the debt in exchange for collateral worth more than the repaid amount.

  • Mechanism: Also known as a liquidation penalty for the borrower.
  • Typical Range: 5% to 15%.
  • Example: A liquidator repays $100 of debt to seize $108 worth of collateral, earning an $8 (8%) bonus.
04

Liquidation Engine

The smart contract subsystem that manages the liquidation process. It defines the rules for eligibility, the auction or fixed-discount mechanism, and the settlement logic. Key functions include:

  • Checking Health Factors across all positions.
  • Executing liquidations via public function calls.
  • Distributing the liquidation bonus and repaying the debt pool.
  • Handling partial liquidations to restore positions to health.
05

Bad Debt

Unrecoverable debt that occurs when a position's collateral value falls below its debt value and no liquidator is able to close the position in time. This represents a loss for the protocol's lenders.

  • Causes: Extreme market volatility, illiquid collateral, or network congestion preventing liquidations.
  • Mitigation: Protocols use liquidation thresholds, insurance funds, and protocol-owned surplus to cover bad debt.
06

Auction vs. Fixed-Price Liquidation

The two primary mechanisms for selling collateral.

  • Fixed-Price (Instant): The most common method. Liquidators purchase collateral at a pre-defined discount (liquidation bonus) via a single transaction. Fast and simple.
  • Dutch Auction: The collateral is offered at a starting price that decreases over time. Designed to improve fairness and price discovery in volatile markets or for large, illiquid positions. Used by protocols like MakerDAO.
liquidation-mechanics
DEFINITION

Liquidation Mechanics & Triggers

A technical breakdown of the automated process by which undercollateralized positions in DeFi lending and trading protocols are forcibly closed to protect the solvency of the system.

Liquidation is the forced closure of a borrower's collateralized debt position (CDP) when its collateral value falls below a required minimum threshold, known as the liquidation threshold. This automated mechanism is a critical risk-management feature in decentralized finance (DeFi) protocols like Aave, Compound, and MakerDAO, ensuring that loans remain overcollateralized and protecting the protocol from bad debt. The process is triggered by a liquidation bot or a keeper, which pays off a portion of the borrower's debt in exchange for the seized collateral, often at a discounted rate known as a liquidation penalty.

The primary trigger for liquidation is the health factor (or collateral ratio) falling below 1.0. This metric is calculated as (Collateral Value * Liquidation Threshold) / Borrowed Value. For example, if a user deposits $10,000 of ETH as collateral with an 80% liquidation threshold and borrows $6,000, their health factor is ($10,000 * 0.80) / $6,000 = 1.33. If the ETH price drops, reducing the collateral value to $7,000, the health factor becomes ($7,000 * 0.80) / $6,000 ≈ 0.93, triggering liquidation. Different protocols use analogous metrics like the collateral factor (Compound) or Safety Module thresholds.

Upon triggering, a liquidator can repay a portion of the outstanding debt, typically up to a close factor (e.g., 50%), and in return receives the equivalent value of the borrower's collateral plus a bonus—the liquidation penalty. This penalty, often 5-15%, incentivizes liquidators to participate and compensates the protocol for risk. The seized collateral is usually sold via an on-chain market, such as a liquidation auction in MakerDAO or a direct swap on a decentralized exchange (DEX) integrated into the protocol's smart contracts. This process happens programmatically without requiring permission.

Key risks for borrowers include liquidation cascades or death spirals, where large-scale liquidations in a volatile market drive down the collateral asset's price, triggering further liquidations. To mitigate this, protocols implement circuit breakers, gradual liquidation mechanisms, and isolated collateral modes. For liquidators, risks involve maximal extractable value (MEV) competition, gas price auctions, and slippage during the collateral sale. Understanding these mechanics—the health factor, liquidation thresholds, and penalty structures—is essential for managing risk in any leveraged DeFi position.

ecosystem-usage
MECHANISM COMPARISON

Liquidation in Major Protocols

While the core concept of forced debt closure is universal, major DeFi protocols implement liquidation with distinct parameters, triggers, and auction mechanisms. This section details the specific implementations across leading lending and borrowing platforms.

06

Key Protocol Parameters

All liquidation systems are governed by a set of critical, adjustable parameters that define their risk profile and behavior:

  • Liquidation Threshold/Collateral Factor: The maximum loan-to-value (LTV) ratio before liquidation is enabled.
  • Liquidation Penalty/Bonus: The incentive paid to the liquidator, taken from the borrower's collateral.
  • Close Factor: The maximum portion of debt that can be liquidated in a single block (limits market impact).
  • Health Factor / Collateralization Ratio: The real-time metric that determines a position's safety.
  • Liquidation Reserve: A small fee held back from borrowers to cover gas costs of liquidation. These parameters are often set and adjusted via governance votes by token holders.
1.0
Universal Health Factor Trigger
5-10%
Typical Liquidation Bonus Range
participant-roles
LIQUIDATION MECHANICS

Participant Roles in a Liquidation

A liquidation event involves multiple distinct actors, each with specific incentives and functions. Understanding these roles is key to grasping the economic dynamics of decentralized lending and trading protocols.

01

The Borrower (or Trader)

The user who has taken out a collateralized loan or opened a leveraged position. Their role is to maintain the health of their position. They face liquidation when their collateralization ratio falls below the protocol's required liquidation threshold, often due to market volatility. The primary risk is the loss of a portion of their collateral to cover the debt.

02

The Liquidator

A bot or user who actively monitors the blockchain for undercollateralized positions. Their role is to trigger the liquidation by repaying the borrower's outstanding debt (or closing their position) in exchange for the collateral at a liquidation discount (or bonus). This activity is profit-driven and provides critical liquidity and risk management for the protocol.

03

The Liquidation Keeper

A specialized type of liquidator, often automated, that executes liquidations in protocols with keeper-based systems (e.g., MakerDAO, Synthetix). Keepers compete in a gas auction to be the first to call the liquidation function, paying higher transaction fees for priority. They are essential for the timely execution of liquidations.

04

The Protocol / Smart Contract

The immutable code that defines all liquidation rules. Its role is to:

  • Set liquidation thresholds and health factor formulas.
  • Calculate the liquidation penalty or discount.
  • Enforce the liquidation process and distribute collateral.
  • Ensure the solvency of the lending pool by using liquidated collateral to cover bad debt.
05

The Liquidation Engine

A subsystem within a protocol's architecture responsible for the mechanics of the liquidation. It handles:

  • Determining the liquidation size (partial vs. full).
  • Calculating the exact liquidation bonus for the liquidator.
  • Managing the liquidation queue if positions are processed in batches.
  • Interfacing with oracles for price feeds to determine insolvency.
06

Lenders / Liquidity Providers

Users who supply assets to the protocol's lending pool. While not active participants in a single liquidation, their role is fundamentally protected by the process. Liquidations safeguard the pool's solvency, ensuring lenders can withdraw their funds. They effectively bear the systemic risk if liquidations fail en masse, leading to bad debt.

COMPARISON

Key Liquidation Parameters by Protocol

A comparison of core liquidation mechanics and thresholds across major DeFi lending protocols.

ParameterAave V3Compound V3MakerDAO

Liquidation Threshold

Dynamic

Fixed

Fixed

Health Factor / Collateral Ratio

Health Factor < 1

Collateral Factor < 0

Collateralization Ratio < Liquidation Ratio

Liquidation Penalty (Bonus)

5-15%

8%

13%

Close Factor (Max % of Debt)

50%

100%

100%

Liquidation Protocol Fee

null

null

Maker Stability Fee + 2%

Primary Auction Mechanism

Fixed Discount

Fixed Discount

English Auction (Collateral Auction)

Liquidation Call Initiator

Any Keeper

Any Keeper

Any Keeper (via Keepers)

security-considerations
LIQUIDATION

Security & Risk Considerations

Liquidation is a risk management mechanism in DeFi lending protocols that automatically closes an undercollateralized position to protect lenders. Understanding its mechanics is critical for managing risk.

01

The Liquidation Process

When a borrower's collateralization ratio falls below the protocol's liquidation threshold, their position becomes eligible for liquidation. A liquidation bot or keeper can then repay a portion of the borrowed assets (the debt) in exchange for a discounted portion of the collateral, known as the liquidation bonus. This process is atomic, restoring the position's health and penalizing the borrower.

  • Trigger: Health Factor < 1 (e.g., on Aave, Compound).
  • Execution: Liquidator repays debt, seizes collateral at a discount.
  • Outcome: Borrower's debt is reduced, but they lose collateral.
02

Liquidation Price & Margin of Safety

The liquidation price is the asset price at which a position becomes undercollateralized. It's calculated based on the collateral amount, debt amount, and liquidation threshold. A critical risk is liquidation cascades, where many positions are liquidated simultaneously, causing rapid price drops and triggering more liquidations. To mitigate this, users maintain a margin of safety by over-collateralizing and monitoring prices.

  • Formula: Liquidation Price ≈ (Debt * Collateral Factor) / Collateral
  • Risk: High volatility can push prices to the threshold quickly.
03

Liquidation Penalties & Incentives

Protocols use a system of penalties and incentives to ensure liquidations occur promptly. The borrower pays a liquidation penalty (or liquidation fee), which is added to their debt. The liquidator receives a liquidation bonus (e.g., 5-15% discount on the seized collateral), making the role profitable. This creates a competitive keeper network that monitors the blockchain for undercollateralized positions.

  • Borrower Cost: Loss of collateral + penalty fee.
  • Liquidator Incentive: Discounted asset purchase.
  • Protocol Safety: Ensures bad debt is minimized.
04

Common Vulnerabilities & Attacks

Liquidation mechanisms are targets for exploitation. Key vulnerabilities include:

  • Oracle Manipulation: Attackers manipulate the price feed (oracle) to trigger false liquidations.
  • Liquidation Sandwiching: A malicious liquidator front-runs a legitimate liquidation transaction to capture the bonus.
  • Gas Wars: During market volatility, liquidators engage in priority fee bidding, making liquidation unprofitable and risking protocol insolvency.
  • Flash Loan Attacks: Using flash loans to dramatically lower a position's health factor for a targeted liquidation.
05

Risk Mitigation for Users

Borrowers can take several steps to avoid liquidation:

  • Conservative Collateralization: Use a higher initial collateral factor than the minimum.
  • Asset Diversification: Avoid using highly volatile or correlated assets as sole collateral.
  • Active Monitoring: Use tools to track health factor and set up price alerts.
  • Understanding Parameters: Know the specific liquidation threshold, close factor, and penalty for your chosen protocol.
  • Using Stablecoins: Borrowing against stablecoin collateral reduces price volatility risk.
06

Protocol-Level Safeguards

DeFi protocols implement safeguards to stabilize the liquidation process:

  • Circuit Breakers: Some protocols pause liquidations during extreme volatility.
  • Gradual Liquidations: Using a close factor to liquidate positions in portions, not all at once.
  • Robust Oracle Design: Using decentralized, time-weighted average price (TWAP) oracles to resist manipulation.
  • Insurance Funds & Reserve Factors: Protocols accumulate fees to cover bad debt from unsuccessful liquidations.
  • Isolated Collateral Modes: Limiting which assets can be used together to prevent contagion.
DEBUNKED

Common Misconceptions About Liquidation

Liquidation is a critical but often misunderstood mechanism in DeFi. This section clarifies widespread inaccuracies about how liquidations work, their triggers, and their role in maintaining protocol solvency.

No, liquidation is a partial collateral seizure to cover an undercollateralized debt position, not a total loss. When a user's Health Factor or Loan-to-Value (LTV) ratio falls below a protocol's liquidation threshold, a portion of their collateral is sold (or has a debt written off) to repay enough debt to restore the position to a safe level. The remaining collateral, minus a liquidation penalty, is returned to the user. A total loss typically only occurs in extreme scenarios like a black swan event where collateral value plummets to near zero before liquidation can occur.

Chains We Build On

Looking to build on a specific blockchain?

We build smart contracts, DeFi applications, wallets, tokenization platforms, and blockchain infrastructure across the major ecosystems teams choose today. That includes Ethereum, Arbitrum, Optimism, Polygon, Avalanche, Solana, Sui, Aptos, Hedera, Stellar, and NEAR, with support for additional EVM and non-EVM networks based on your product requirements.

EVM ecosystems

  • Ethereum logo
    Ethereum
  • Arbitrum logo
    Arbitrum
  • Optimism logo
    Optimism
  • Polygon logo
    Polygon
  • Avalanche logo
    Avalanche
  • Cronos logo
    Cronos

Non-EVM ecosystems

  • Solana logo
    Solana
  • Sui logo
    Sui
  • Aptos logo
    Aptos
  • Hedera logo
    Hedera
  • Stellar logo
    Stellar
  • NEAR logo
    NEAR

Additional ecosystems

  • Polkadot logo
    Polkadot
  • Cosmos logo
    Cosmos
  • TON logo
    TON
  • Cardano logo
    Cardano
  • Algorand logo
    Algorand
  • Tempo logo
    Tempo

Also available for Base, appchains, custom EVM networks, and cross-chain product architecture.

LIQUIDATION

Frequently Asked Questions (FAQ)

Liquidation is a critical risk management mechanism in DeFi lending protocols. These questions address how it works, its triggers, and its consequences.

Liquidation is the forced sale of a borrower's collateral in a decentralized finance (DeFi) lending protocol to repay their outstanding debt when their collateral's value falls below a required threshold. This automated process protects the protocol and its lenders from losses due to undercollateralized loans. When a user opens a loan (e.g., a collateralized debt position or CDP), they lock assets like ETH and borrow a different asset like DAI. The protocol sets a liquidation threshold (e.g., 80% Loan-to-Value). If market volatility causes the collateral value to drop, pushing the loan's health factor below 1 (or LTV above the threshold), the position becomes eligible for liquidation. Third-party liquidators can then repay a portion of the debt in exchange for the collateral at a discounted rate, known as a liquidation penalty, ensuring the protocol remains solvent.

Trusted by Industry Leaders

Delivering blockchain solutions for 5+ years.

We have partnered with 50+ leading DeFi protocols, NFT ecosystems, and fintech innovators to build secure, scalable, and capital-efficient blockchain products.

Selected Partners & Clients

ChainVote logo
Reax logo
Sokail logo
Swapsicle logo
SyntheX logo
Tekika logo
Telos logo
Zexe logo
ChainVote logo
Reax logo
Sokail logo
Swapsicle logo
SyntheX logo
Tekika logo
Telos logo
Zexe logo
ChainVote logo
Reax logo
Sokail logo
Swapsicle logo
SyntheX logo
Tekika logo
Telos logo
Zexe logo
ChainVote logo
Reax logo
Sokail logo
Swapsicle logo
SyntheX logo
Tekika logo
Telos logo
Zexe logo
I've been working with Chainscore Labs for last 3+ years, they've consistently delivered with strong ownership across multiple projects. The team is reliable and detail-oriented.
L
Lee Erswell
CEO, Telos Foundation
how to get started

How to get started?

If you're looking for blockchain integration, ChainScore Labs has 5+ years of experience helping teams build and integrate exchanges, wallets, smart contracts, tokenization solutions, and protocol-connected products, we can help you choose the right path, integrate securely, and get to production faster. Our team consists of experienced blockchain developers and architects who can help you with your blockchain integration needs.

01

Exploration & Strategy

Define your product goals and choose the right blockchain architecture for your use case.

02

Architecture & Design

Design the smart contracts, tokenomics, and security parameters of your system.

03

Development & Integration

Build and integrate with wallets, oracles, and front-end dApps for a seamless experience.

04

Security & Launch

Comprehensive audits followed by a risk-managed mainnet deployment to protect your users.

Start a build

Need a blockchain engineering team?

Send the project context and we will respond with next steps, scope questions, and a practical path to delivery.