# Liquidation

A **liquidation** occurs when your leveraged position moves against you so much that your account no longer has enough margin to keep it open.

In simple terms: Your collateral becomes too small relative to your losses, and the system force-closes your position to prevent your account from going negative.

On Hyperliquid, liquidations are designed to be transparent, competitive, and as fair as possible for the liquidated trader.

***

### **When Do Liquidations Happen?**

Every position has two key margin requirements:

#### **1. Initial Margin**

Required to open the position.

#### **2. Maintenance Margin**

Required to *keep* the position open.

On Hyperliquid:

* Maintenance margin is half of the initial margin at max leverage
* Max leverage varies by asset (3x to 40x)
* Therefore, maintenance margin ranges from 1.25 percent (high leverage assets) to 16.7 percent (low leverage assets)

You get liquidated when **Account equity < Maintenance margin**

Equity includes:

* Collateral
* Unrealized PnL
* Funding effects

***

## **How Liquidations Execute on Hyperliquid**

Hyperliquid liquidations occur in two steps:

### **Step 1: Orderbook Liquidation (Primary Method)**

If your account equity drops below maintenance margin:

* Hyperliquid tries to close your entire position by sending a market order to the orderbook.
* The liquidation order is for 100 percent of your position size.
* If the market order fills fully or partially in a way that restores margin requirements, liquidation ends.

This method:

* Returns remaining collateral to the user
* Involves no clearance fees (unlike many CEXs)
* Lets anyone compete to fill the liquidation (not just privileged market makers)

This makes Hyperliquid’s liquidation system:

* Transparent
* Efficient
* Community-driven

#### **Partial Liquidations (for large positions)**

If a position is larger than 100,000 USDC:

* Only 20 percent of the position is liquidated at a time
* After any partial liquidation, there's a 30-second cooldown

During the cooldown:

* All subsequent liquidation orders are for the full size of the position

This mechanism:

* Reduces unnecessary market impact
* Slows down cascades
* Allows smoother unwinding

### **Step 2: Backstop Liquidation (Liquidator Vault)**

If equity drops below two thirds of maintenance margin, and the orderbook cannot liquidate your position fully the Liquidator Vault takes over your position via backstop liquidation.

The Liquidator Vault is part of HLP (Hyperliquid Liquidity Provider).

#### What happens next?

#### **For Cross-Margin Positions**

* All cross positions and the cross collateral are transferred to the liquidator
* If the user has no isolated positions, account equity becomes zero

#### **For Isolated Positions**

* Only the isolated position and its isolated margin are transferred
* Cross margin remains untouched

#### **Why Maintenance Margin Isn’t Returned**

During backstop liquidation, the maintenance margin is not returned because:

* The liquidator requires a buffer
* Ensures the process remains profitable long term
* Prevents the vault from losing money during volatility

On most platforms, liquidation profits go to the exchange.\
On Hyperliquid, all liquidation PnL goes to HLP, meaning the community benefits.

***

## **Mark Price: The Price Used for Liquidation**

Hyperliquid uses the mark price, not the mid-price of the orderbook.

Mark price = **Weighted median of external CEX prices + Hyperliquid book state**

This method:

* Prevents manipulation
* Avoids fake wicks
* Anchors liquidations to “true market price”
* Makes liquidations more robust during volatile periods

Because mark price can differ from book price, your liquidation level might trigger earlier or later than expected in fast markets.

***

## **How to Avoid Liquidation**

The user can avoid liquidation by:

* Placing stop-loss or trailing-stop orders
* Adding margin to the position
* Reducing leverage
* Avoiding oversized bets
* Monitoring mark price closely

Hyperliquid’s system is designed to help traders retain as much collateral as possible, but avoiding liquidation entirely is always more cost-efficient.

***

## **Why Hyperliquid’s Liquidation System Is Unique**

Compared to CEXs, Hyperliquid liquidations:

* Are transparent
* Pay profits to the community (HLP), not the exchange
* Use a more robust mark price
* Do not charge clearance fees
* Prioritize returning remaining margin to the trader
* Allow partial liquidation for large positions
* Provide a fair backstop liquidation system

This helps reduce unfair liquidations, protects traders from exchange manipulation, and decentralizes liquidation rewards.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://supercexy.gitbook.io/supercexy-docs/trading/liquidation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
