> For the complete documentation index, see [llms.txt](https://docs.perpetuals.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.perpetuals.xyz/trading/liquidations.md).

# Liquidations

If a trade moves too far against you and you don't have enough margin to support it, your position may be **liquidated.** This means it gets force-closed to prevent losses from exceeding your available balance.

***

### When do liquidations happen?

Every position has a minimum margin requirement, based on the leverage you use. The higher the leverage, the less margin is required - but the closer you are to liquidation.

**Here's how much margin you need to maintain:**

| Leverage | Maintenance Margin | Liquidation Buffer  |
| -------- | ------------------ | ------------------- |
| 20x      | 5.00%              | 95% loss from entry |
| 50x      | 2.00%              | 98% loss from entry |
| 100x     | 1.00%              | 99% loss from entry |

If your account value (including unrealized PnL) falls below this level, Perpetuals will automatically close your position at market. If there's any margin left after closing, it stays in your account.

***

### How to avoid liquidation

To lower your chances of being liquidated:

#### 1. Use lower leverage

* 10-20x gives you more breathing room than 100x
* Even small price moves won't liquidate you

#### 2. Set stop-losses

* Close positions automatically before liquidation
* Protect your capital for the next trade

#### 3. Monitor your liquidation price

* Shown in the UI for every position
* Add more margin when getting close

#### 4. Don't overtrade

* Don't use 100% of your capital on one position
* Diversify across multiple pairs

#### 5. Reduce before news

* Major economic releases cause volatility
* FED decisions, NFP, CPI can trigger fast moves
* Lower leverage or close positions before high-impact events

***

### How liquidation price works

When you open a trade, we calculate a **liquidation price -** the point at which your losses become too large to support your position.

**For long positions:**

```
Liquidation Price ≈ Entry Price × (1 - 1/Leverage + Maintenance Margin %)
```

**For short positions:**

```
Liquidation Price ≈ Entry Price × (1 + 1/Leverage - Maintenance Margin %)
```

#### Example (Long Position):

```
Entry: EUR/USD @ 1.1000
Leverage: 50x
Maintenance Margin: 2%
Liquidation Price ≈ 1.1000 × (1 - 0.02 + 0.02) = ~1.0780

A move from 1.1000 to 1.0780 is a 2% drop, which at 50x leverage wipes out your margin.
```

**Important:** This price can shift slightly over time due to accrued funding payments.

***

### The liquidation process

When your position hits the liquidation threshold:

1. Position is closed at current mark price
2. Liquidation fee (0.5% of position size) is deducted
3. Remaining margin (if any) returned to your account
4. You cannot lose more than your deposited margin

**Example:**

```
Position: $50,000 at 50x leverage ($1,000 margin)
Liquidation occurs when account value = $1,000 (maintenance margin)
Liquidation fee: $50,000 × 0.5% = $250
Remaining margin: $1,000 - $250 = $750 returned to you
Maximum loss: $1,000 (your initial margin)
```

***

### Auto-deleveraging (ADL)

In rare black swan events where the insurance fund is depleted, Hyperliquid may use **auto-deleveraging** to close profitable opposing positions.

**ADL priority is based on:**

1. Profitability (higher PnL = higher priority)
2. Leverage (higher leverage = higher priority)

ADL events are extremely rare but can happen during major market dislocations.

***

### Liquidation warnings

Perpetuals provides real-time warnings:

* 🟢 **Safe**: >20% margin buffer
* 🟡 **Warning**: 10-20% buffer
* 🟠 **Danger**: 5-10% buffer
* 🔴 **Critical**: <5% buffer (add margin immediately!)

***

### Higher leverage = higher risk

| Leverage | Price Move to Liquidation | Risk Level |
| -------- | ------------------------- | ---------- |
| 10x      | \~10%                     | Low        |
| 20x      | \~5%                      | Medium     |
| 50x      | \~2%                      | High       |
| 100x     | \~1%                      | Very High  |

**Remember:** Crypto-native traders may be comfortable with high leverage on BTC/ETH, but FX pairs can move significantly during major news events. A surprise Fed decision or geopolitical event can easily create significant moves in seconds.

***

Last updated
