Liquidations & Insurance Fund on dYdX

When traders use leverage on dYdX, they post collateral that gets progressively consumed by losses and fees. When that collateral falls below the maintenance margin threshold, the position enters the liquidation queue - a keeper bot steps in, force-closes the position, and the remaining collateral (if any) is returned to the trader after the liquidation bonus is paid. If the liquidation executes below the bankruptcy price, the insurance fund absorbs the loss. If the insurance fund is exhausted, the clawback mechanism kicks in.

Liquidation Price Simulator

Configure a position and see exactly how close you are to liquidation. The bar shows your safety margin as a percentage of the position value - the lower the margin %, the closer you are to getting liquidated.

Position Size
$10,000
Liquidation Price
$58,500
Distance to Liq
10.0%
Maintenance Margin
$100
Margin Ratio
10.0%
Bankruptcy Price
$58,000

Liquidation Process Flow

From margin warning to position closed - the full lifecycle of a liquidation event.

Insurance Fund & Clawback Mechanics

The insurance fund is dYdX's first line of defense against cascading liquidations. It grows from profitable liquidations and is drawn down when positions are force-closed below their bankruptcy price.

Healthy Fund
  • Liquidations above bankruptcy price -> surplus to insurance fund
  • Insurance fund grows over time in normal market conditions
  • Fund pays out bad debt from below-bankruptcy liquidations
  • Fund remains positive -> no clawback needed
Trader payouts are whole
Exhausted Fund (Clawback)
  • Cascade of fast liquidations in high-volatility event
  • Many liquidations below bankruptcy price
  • Insurance fund depleted rapidly
  • Remaining profitable positions are clawed back pro-rata
? Profitable traders contribute back
The Clawback Sequence
1. Volatility spike -> many positions hit margin threshold simultaneously
2. Keeper bots race to liquidate; orders execute in rapid succession on dYdX Chain
3. Some fills are at worse prices than bankruptcy price (market has moved fast)
4. Insurance fund covers gap for first N bad liquidations
5. If fund exhausted: protocol reduces profitable position payouts by a clawback factor
6. Clawback factor = (Total shortfall) / (Total profitable position value) 100
7. Profitable traders receive (1 ? clawback factor) their actual PnL

Liquidation Tiers by Leverage

The maximum leverage and maintenance margin requirement interact to determine your liquidation distance. Higher leverage = tighter safety margin = closer to liquidation.

Leverage Margin Required % Move to Liq Liq Bonus to Keeper Bankruptcy
2 50.0% ~49.5% 1.5% of notional $0 (no buffer)
5 20.0% ~19.5% 1.5% of notional $0 (no buffer)
10 10.0% ~9.5% 2.0% of notional $0 (no buffer)
20 5.0% ~4.5% 2.5% of notional $0 (no buffer)
50 2.0% ~1.8% 3.0% of notional $0 (no buffer)
100 1.0% ~0.85% 5.0% of notional $0 (no buffer)

Note: At 100 leverage, a 0.85% adverse move triggers liquidation. At that point, the keeper earns a 5% bonus on notional - worth $500 on a $10,000 position. This is why keeper bots compete so fiercely and pay for priority gas.

How to Avoid Liquidation

Stop-Loss Orders

Place a conditional stop-loss order when opening your position. This automatically closes your position when the price reaches your specified level, locking in a defined loss rather than letting it run to liquidation.

Add Margin

You can add collateral to an open position at any time to push the liquidation price further away. This is like adding to your margin in a futures account. Particularly useful when the trade is going against you but you still believe in the direction.

Lower Your Leverage

Most Important Tip

At 10 with a 10% buffer, you can survive a 9.5% move against you. At 2, you have 49.5% of runway. Conservative leverage is the single most effective risk management tool. Most professional traders use 2-5 in trending markets.