Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
LABS
Glossary

Margin Call

A margin call is a protocol's automated demand for a borrower to deposit additional collateral to restore a safe loan-to-value (LTV) ratio, preventing forced liquidation.
Chainscore © 2026
definition
DEFINITION

What is a Margin Call?

A margin call is a formal demand from a lender or broker for an investor to deposit additional funds or securities into a leveraged trading account to restore the required minimum collateral level.

A margin call is a formal demand from a lender or broker for an investor to deposit additional funds or securities into a leveraged trading account to restore the required minimum collateral level. This occurs when the value of the account's assets falls below a specified threshold, known as the maintenance margin requirement. The call is a protective mechanism for the lender, ensuring the loan used to purchase assets remains sufficiently collateralized against market losses. Failure to meet a margin call typically results in the broker liquidating (force-selling) the investor's positions to cover the shortfall.

The process is governed by two key metrics: the initial margin (the percentage of the purchase price an investor must deposit to open a leveraged position) and the maintenance margin (the minimum account equity that must be maintained thereafter). For example, if an account's equity drops to or below the maintenance margin level—often calculated as (Account Equity / Total Market Value of Securities) * 100—the broker issues the call. In volatile markets, particularly with high leverage, this can happen rapidly, requiring immediate action from the trader to avoid automatic liquidation.

In the context of decentralized finance (DeFi), a margin call is often automated through smart contracts on lending protocols like Aave or Compound. Here, a user's collateralized debt position (CDP) is monitored by the protocol's code. If the collateralization ratio falls below the protocol's liquidation threshold, the position becomes eligible for liquidation by external liquidators. These actors can repay part of the debt in exchange for the collateral at a discounted rate, a process that is permissionless and instant, differing from the manual notice period sometimes given in traditional finance.

The primary risk of a margin call is forced liquidation at a loss. When a broker or protocol liquidates assets, it may do so at unfavorable market prices, potentially realizing a significant loss for the investor that exceeds their initial deposit. This risk is amplified by leverage, which magnifies both gains and losses. Prudent risk management involves maintaining a margin buffer well above the minimum requirement and using stop-loss orders to automatically exit positions before a call is triggered.

Margin calls are a fundamental concept across both traditional finance (for stocks, forex, and futures) and crypto markets. They represent a critical aspect of risk in leveraged trading, enforcing discipline and collateral integrity. Understanding the specific margin requirements, liquidation processes, and price oracle mechanisms of a given platform is essential for any trader or borrower utilizing leverage to mitigate the sudden financial demands of a margin call.

how-it-works
MECHANISM

How a Margin Call Works in DeFi

An automated, protocol-enforced process triggered when a borrower's collateral value falls below a required threshold, forcing them to add funds or face liquidation.

A margin call in decentralized finance (DeFi) is an automated, protocol-enforced event triggered when the value of a borrower's collateral falls below a predefined maintenance margin or health factor threshold. Unlike traditional finance where a broker issues a warning, DeFi margin calls are executed autonomously by smart contract logic. This occurs because the loan has become undercollateralized, posing excessive risk to the protocol and its liquidity providers. The primary purpose is to protect the lending pool's solvency by ensuring all outstanding debt remains sufficiently backed by collateral at all times.

The process is governed by a liquidation threshold, a critical parameter set by each protocol (e.g., Aave, Compound). When a user's health factor drops below 1.0 (or an equivalent metric), their position is flagged for liquidation. This decline is typically caused by a drop in the collateral asset's price or a rise in the borrowed asset's price. At this point, the borrower has a brief opportunity—sometimes just a single blockchain block—to add more collateral or repay part of the debt to restore their health factor above the safe threshold before liquidation occurs.

If the borrower fails to act, liquidators—anyone running a bot or script—can repay a portion of the unhealthy debt on the borrower's behalf. In return, they receive the borrower's collateral at a liquidation discount (or bonus), allowing them to profit from the arbitrage. This mechanism ensures bad debt is cleared without manual intervention. The specific mechanics, such as the size of the discount and the maximum liquidation amount, are defined in the protocol's smart contracts and can vary significantly between platforms like MakerDAO and Compound.

Key preventative metrics include the Loan-to-Value (LTV) ratio, which determines initial borrowing power, and the health factor, which is a real-time measure of safety calculated as (Collateral Value * Liquidation Threshold) / Borrowed Value. Users must monitor these ratios closely, especially during periods of high market volatility. Using stablecoins as collateral or borrowing against a diversified basket of assets can reduce, but not eliminate, margin call risk. Ultimately, the system's design prioritizes the protocol's financial stability over the individual borrower's position.

key-features
MECHANISM BREAKDOWN

Key Features of a Margin Call

A margin call is a protective mechanism in leveraged finance that triggers when a borrower's collateral value falls below a required maintenance threshold. These are its core operational components.

01

Trigger: The Maintenance Margin

A margin call is triggered when the Loan-to-Value (LTV) ratio exceeds the protocol's Maintenance Margin Requirement (MMR). This occurs because the value of the collateral asset has fallen or the borrowed asset's value has risen.

  • Formula: (Debt Value / Collateral Value) > MMR
  • Example: With $10,000 in ETH as collateral and a $5,000 USDC debt, the LTV is 50%. If the protocol's MMR is 75%, a margin call triggers if ETH's value drops so the LTV exceeds 75%.
02

The Liquidation Process

If a position is not remedied, it enters liquidation. A liquidator (often a bot) repays part or all of the debt and receives the collateral at a discount as a bounty.

  • Key Mechanism: This is an automated, permissionless process to ensure the protocol remains solvent.
  • Liquidation Penalty: The discount (e.g., 5-10%) incentivizes liquidators and acts as a fee for the risky position.
03

Remediation Options

To avoid liquidation, a user can take one of two actions to restore their LTV below the MMR:

  • Add More Collateral: Depositing additional assets increases the collateral value, lowering the LTV ratio.
  • Repay Debt: Partially repaying the loan reduces the debt value, also lowering the LTV.

These actions must be completed before the position's health factor crosses the liquidation threshold.

04

Health Factor & Safety Buffer

The Health Factor (HF) is a numerical representation of a position's safety, calculated as (Collateral Value * Liquidation Threshold) / Debt Value.

  • HF > 1: Position is safe.
  • HF <= 1: Position is undercollateralized and subject to liquidation.

This metric provides a continuous view of risk, with a margin call typically occurring as the HF approaches 1.

05

Protocol Design Variations

While the core logic is consistent, implementations differ:

  • Partial vs. Full Liquidation: Some protocols liquidate only enough to restore health; others close the entire position.
  • Auction Models: Traditional finance may use auctions; DeFi often uses fixed-discount, instant liquidations.
  • Cross-Margin vs. Isolated: In cross-margin, all collateral backs all debts. In isolated margin, risk is contained to a specific pair.
06

Systemic Risk & Cascades

During high volatility, mass margin calls can lead to liquidation cascades. As liquidators sell collateral, its price drops, triggering further liquidations in a negative feedback loop.

  • Mitigations: Protocols use circuit breakers, dynamic fees, and oracle safeguards.
  • Historical Context: Events like the March 2020 crash and the LUNA collapse demonstrated the severe impact of cascading liquidations.
triggers
MECHANISMS

What Triggers a Margin Call?

A margin call is a demand for additional collateral issued by a lending protocol when a user's borrowed position becomes undercollateralized, threatening the safety of the lender's funds. It is triggered by specific, automated on-chain conditions.

01

The Health Factor Threshold

The primary trigger is a user's Health Factor (HF) falling below the protocol's liquidation threshold (e.g., 1.0). Health Factor is calculated as (Collateral Value * Liquidation Threshold) / Borrowed Value. When HF < 1, the position is eligible for liquidation, initiating a margin call. Protocols like Aave and Compound use this model.

  • Example: If ETH collateral drops in value, the numerator decreases, pushing HF down.
  • Automated: This check happens continuously via oracles updating asset prices.
02

Collateral Value Depreciation

A drop in the market price of the collateral asset is the most common economic trigger. Since loan-to-value (LTV) ratios are dynamic, a sharp decline in an asset's price can rapidly degrade the Health Factor.

  • Volatility Risk: High-volatility assets (e.g., memecoins) reach liquidation thresholds faster.
  • Oracle Price Feed: The trigger uses the oracle's price, not the DEX spot price, though arbitrageurs align them.
03

Borrowed Asset Appreciation

If the asset you borrowed increases in value relative to your collateral, your debt becomes larger in collateral terms, worsening your Health Factor. This is a critical risk in cross-margin or multi-asset borrowing.

  • Example: Borrowing stablecoins is low-risk; borrowing a volatile asset that pumps can trigger a call.
  • Debt Denomination: Your debt is always measured in the base currency (e.g., USD value), so any debt asset appreciation counts.
04

Protocol Parameter Updates

Governance can change risk parameters, triggering margin calls for existing positions. Key parameters include:

  • Liquidation Threshold: Lowering this makes positions riskier instantly.
  • Loan-to-Value (LTV) Ratio: Reducing the max LTV for a collateral asset.
  • Asset Classification: An asset being marked as "not collateral" forces immediate repayment.

These are non-market triggers that users must monitor via governance proposals.

05

The Liquidation Process

Once triggered, the protocol opens the position for liquidation. A liquidator (often a bot) repays part or all of the debt in exchange for the collateral at a liquidation bonus (discount).

  • Key Mechanics:
    • Liquidation Bonus: Incentive for liquidators (e.g., 5-15%).
    • Close Factor: Maximum percentage of debt that can be liquidated in one transaction.
    • Gas Race: Liquidators compete in a gas auction to seize the opportunity.
06

Prevention & Monitoring

Users avoid margin calls by actively managing their Health Factor.

  • Common Strategies:
    • Deposit More Collateral: Increases the numerator in the HF formula.
    • Repay Debt: Reduces the denominator in the HF formula.
    • Use Safer Assets: Borrow against high-liquidity, low-volatility collateral (e.g., stETH, wBTC).
    • Monitoring Tools: Use dashboards and alerts to track HF in real-time.
protocol-mechanics
DEFINITION

Protocol Mechanics: From Call to Liquidation

A margin call is a protocol-enforced notification or demand for a user to deposit additional collateral to restore their account's health ratio, triggered when the value of their borrowed assets approaches the value of their posted collateral.

A margin call is a critical risk management mechanism in decentralized finance (DeFi) lending and margin trading protocols. It is automatically triggered when a user's collateralization ratio falls below a protocol-defined maintenance margin or liquidation threshold. This event is not a liquidation itself but a final warning state, indicating that the account is undercollateralized and at imminent risk of automatic liquidation. The primary purpose is to give the user a chance to act—typically by adding more collateral or repaying part of the debt—to restore their position's health before it is forcibly closed by the protocol.

The mechanics are governed by the protocol's health factor or collateral factor formula. For example, if a user borrows assets against ETH collateral and the price of ETH drops significantly, the value of their collateral decreases relative to their debt. Once this ratio crosses the predefined safety threshold, the smart contract logic flags the position. In many protocols, this state is visible on the front-end as a "Health Factor < 1.0" or similar warning. Users must then interact with the protocol to deposit additional collateral of an approved asset type or execute a partial debt repayment to increase the ratio back above the safe threshold.

Failing to respond to a margin call results in liquidation. At this point, the protocol's liquidation engine, often involving keepers or liquidators, is authorized to seize a portion of the user's collateral. This collateral is sold, typically at a liquidation penalty (a discount), to repay the outstanding debt and any accrued interest. The remaining collateral, if any, is returned to the user. This process ensures the solvency of the lending pool by preventing bad debt from accumulating, protecting other depositors (liquidity providers) in the system.

user-actions
MARGIN CALL MITIGATION

User Actions to Avoid Liquidation

A margin call is a demand from a lender for a borrower to add more collateral to a loan to restore the required collateral ratio. In DeFi, this is typically an automated process leading to liquidation. These actions can help users proactively manage their positions.

01

Deposit Additional Collateral

The most direct action to increase your Health Factor or Collateral Ratio. Adding more of the accepted collateral asset to your position increases the total value securing the loan, moving you further from the liquidation threshold.

  • Example: On Aave, if your Health Factor drops to 1.1, depositing more ETH can raise it back above the safe threshold of 1.5.
  • Impact: Immediately reduces liquidation risk but increases capital commitment and potential loss exposure.
02

Repay a Portion of the Debt

Reducing the borrowed amount lowers the Loan-to-Value (LTV) ratio, directly improving the position's health. This can be done by repaying some of the principal using your own funds or by selling other assets.

  • Mechanism: Repaying debt decreases the numerator in the LTV calculation (Debt Value / Collateral Value).
  • Strategic Note: Repaying stablecoin debt with a volatile collateral asset is often safer than the reverse, as it avoids selling collateral at a potentially unfavorable price.
03

Manually Close the Position

A preemptive exit strategy where the user repays the loan in full and withdraws their collateral before an automated liquidation occurs. This avoids liquidation penalties and potentially unfavorable prices from liquidation bots.

  • Process: Requires having the full borrowed amount available or selling a portion of the collateral to generate the necessary funds for repayment.
  • Use Case: Often used when market volatility is extreme and the user wishes to exit on their own terms rather than risk a 5-15% liquidation penalty.
05

Switch to a More Stable Collateral Asset

If permitted by the protocol, users can substitute volatile collateral (e.g., ETH) for a more stable one (e.g., a stablecoin or wBTC) to reduce price volatility risk.

  • How it works: On compound-like protocols, you may be able to withdraw one collateral asset and supply another with lower volatility or a better liquidation threshold.
  • Consideration: This involves a swap transaction and may incur slippage and gas costs, but can structurally improve position stability.
06

Monitor & Use Price Alerts

Proactive monitoring is the first line of defense. Setting alerts for your collateral asset's price and your position's health metrics allows for early intervention.

  • Key Metrics to Watch: Collateral Price, Health Factor / LTV Ratio, and Liquidation Threshold.
  • Tools: Use portfolio dashboards (like DeBank, Zapper), protocol-specific UIs, or custom scripts with data from oracles like Chainlink to get real-time alerts before a margin call is triggered.
RISK MANAGEMENT

Margin Call vs. Liquidation

A comparison of the two primary risk mitigation events in leveraged trading, detailing their triggers, processes, and outcomes.

FeatureMargin CallLiquidation

Trigger Condition

Account's margin ratio falls below the maintenance margin requirement.

Account's margin ratio falls below the liquidation threshold.

Primary Purpose

Warning to add collateral to restore safe margin levels.

Forced closure of positions to repay the protocol and prevent loss.

User Action Required

Yes, user must deposit more collateral or close positions.

No, the protocol's liquidation engine executes automatically.

Process

Notification (on-chain or off-chain) requesting more funds.

Liquidator bots bid to purchase the undercollateralized position at a discount.

Typical Outcome

Position remains open if margin is restored.

Position is closed; remaining collateral (if any) is returned to user.

Financial Penalty

None, aside from potential gas fees for adding funds.

Liquidation penalty/fee (e.g., 5-15%) paid to the liquidator.

Speed / Deadline

Varies; can be minutes to hours depending on protocol.

Near-instantaneous (< 1 sec) once triggered.

Relation to Health Factor

Health Factor is low (e.g., < 1.5) but > 1.0.

Health Factor reaches or falls below 1.0.

ecosystem-usage
MECHANISM DEEP DIVE

Margin Calls in Major Protocols

A margin call is a protocol-enforced liquidation event triggered when a borrower's collateral value falls below a required maintenance margin. This section details how major DeFi protocols implement this critical risk-management mechanism.

01

MakerDAO: The Collateralized Debt Position (CDP)

Maker's system uses a Collateralization Ratio to manage risk. When the value of locked ETH or other assets drops, the ratio falls. If it breaches the Liquidation Ratio for that vault type:

  • The position becomes eligible for Keepers (liquidators).
  • A Liquidation Penalty is applied to the debt.
  • Keepers bid at auction to purchase the collateral, repaying the debt and penalty. The protocol's Stability Fee (interest) and Debt Ceiling are separate parameters that influence borrowing behavior before a call occurs.
02

Aave & Compound: Health Factor & Close Factor

These lending protocols use a Health Factor (HF), calculated as (Collateral Value * Liquidation Threshold) / Total Borrowed. When HF ≤ 1, the position is undercollateralized.

  • Close Factor: Determines the maximum percentage of a borrow that can be liquidated in a single transaction (e.g., 50%).
  • Liquidation Bonus: An incentive (e.g., 5-10%) given to liquidators on top of the seized collateral.
  • Liquidations are performed via public function calls, often automated by bots monitoring the mempool.
03

dYdX & Perpetuals: Maintenance Margin

Perpetual futures protocols like dYdX use a Maintenance Margin Requirement (MMR). A trader's account has an Account Value and Maintenance Margin (sum of MMR for all positions).

  • Margin Call Trigger: Account Value ≤ Maintenance Margin.
  • This initiates Auto-Deleveraging or allows liquidators to close the position at the bankruptcy price.
  • The Initial Margin Requirement is higher, acting as a buffer before the maintenance level is breached.
04

Liquidation Process & Incentives

The liquidation mechanism itself involves several key components:

  • Liquidators: Network participants (often bots) who trigger the liquidation transaction.
  • Liquidation Bonus/Penalty: The protocol-defined incentive paid to the liquidator from the borrower's collateral.
  • Auction vs. Fixed Discount: Protocols use either a Dutch auction (Maker) or a fixed percentage discount (Aave) for selling collateral.
  • Gas Wars: In fixed-discount systems, liquidators compete via transaction fee (gas price) prioritization to capture profitable opportunities.
05

Risk Parameters & Governance

The thresholds triggering margin calls are not static; they are Governance-controlled parameters. Key settings include:

  • Liquidation Threshold: The collateral value at which borrowing becomes unsafe (e.g., 80% for ETH).
  • Liquidation Bonus/Penalty: The size of the liquidator's incentive.
  • Close Factor: The portion of debt liquidatable per transaction. Governance tokens (MKR, AAVE, COMP) are used to vote on adjusting these parameters in response to market volatility and protocol risk.
06

Cascading Liquidations & Systemic Risk

In extreme volatility, margin calls can create feedback loops:

  • Mass liquidations flood the market, driving collateral prices down further.
  • This triggers more margin calls (cascading liquidations).
  • Can lead to bad debt if liquidation proceeds don't cover the borrowed amount. Protocols mitigate this with circuit breakers, auction duration adjustments, and risk parameter diversification across asset classes.
security-considerations
MARGIN CALL

Security & Risk Considerations

A margin call is a protective mechanism in leveraged trading that occurs when a user's collateral value falls below a required maintenance threshold, triggering a forced liquidation to repay the borrowed funds.

01

The Liquidation Trigger

A margin call is triggered when the loan-to-value (LTV) ratio of a position exceeds the protocol's liquidation threshold. This happens because the value of the collateral asset falls or the value of the borrowed asset rises. At this point, the position is considered undercollateralized and is flagged for liquidation to protect the protocol's solvency.

02

Liquidation Process & Penalty

Once triggered, a liquidator (often a bot) can repay a portion of the user's debt in exchange for seizing the user's collateral at a discount. This discount is the liquidation penalty, a fee paid by the liquidated user. For example, a common penalty is 5-15% of the liquidated amount, which incentivizes liquidators while punishing risky positions.

03

Health Factor & Maintenance Margin

The Health Factor is a key metric that determines proximity to liquidation. It is calculated as (Collateral Value * Liquidation Threshold) / Borrowed Value. A Health Factor of 1.0 is the liquidation threshold. Users must maintain a Health Factor above this level, often by adding more collateral (topping up) or repaying debt, to avoid a margin call.

04

Cascading Liquidations & Systemic Risk

In volatile markets, a wave of liquidations can create cascading effects. As large positions are liquidated, the sale of collateral can further depress its market price, triggering more liquidations. This systemic risk is a major design consideration for lending protocols, which may implement circuit breakers or dynamic parameters to mitigate such events.

05

Mitigation Strategies for Users

Users can avoid margin calls by:

  • Maintaining a high Health Factor (e.g., >1.5) as a safety buffer.
  • Using less volatile assets as collateral.
  • Actively monitoring positions, especially during high volatility.
  • Understanding the specific liquidation threshold and penalty for their chosen assets on the protocol.
06

Protocol-Level Safeguards

Lending protocols implement several mechanisms to manage liquidation risk:

  • Isolated Markets: Limit risk contagion by isolating asset pools.
  • Gradual Liquidations: Liquidate positions in chunks to minimize price impact.
  • Dynamic Parameters: Automatically adjust loan-to-value ratios and liquidation penalties based on market volatility and pool utilization.
MARGIN CALL

Frequently Asked Questions (FAQ)

Essential questions and answers about margin calls, a critical risk management mechanism in DeFi and leveraged trading.

A margin call is a demand from a lender or protocol for a borrower to deposit additional collateral to restore the health of a leveraged position that has fallen below a required threshold. It is a protective mechanism that triggers when the Loan-to-Value (LTV) ratio of a position rises above a predefined liquidation threshold, indicating the collateral is insufficient to cover the loan's risk. The borrower must either add more collateral or repay part of the loan to reduce the LTV and avoid liquidation, where the protocol automatically sells the collateral to repay the debt.

ENQUIRY

Get In Touch
today.

Our experts will offer a free quote and a 30min call to discuss your project.

NDA Protected
24h Response
Directly to Engineering Team
10+
Protocols Shipped
$20M+
TVL Overall
NDA Protected Directly to Engineering Team