Leverage and liquidation
Below maintenance margin, positions go to the order book as market orders; below two thirds of it, the liquidator vault takes them over.
Liquidation closes your position while its margin still covers the loss. With leverage, a loss past your margin would fall on someone else. Most liquidations go to the public order book, where anyone can compete for the flow.
Every test uses the mark price (a median of three inputs from external prices and Hyperliquid’s own book), not the last trade (oracles and mark prices).
One long, three thresholds
Section titled “One long, three thresholds”Say you go long 10 contracts at 1,000 with 10x, on an asset with 20x maximum leverage (l = 0.025), with 1,000 of isolated margin. Maintenance margin at entry is 250, leaving 750 available.
| Threshold | Condition | Price |
|---|---|---|
| Liquidation | equity = maintenance margin | 923.08 |
| Backstop | equity = 2/3 of maintenance margin | 915.25 |
| Negative equity | equity = 0 | 900.00 |
- Mark at 923.08 → liquidation starts. The loss is 769.2, leaving 230.8, which is 2.5 per cent of the 9,230.8 notional.
- 923.08 to 915.25: the book has about 0.85 per cent of price to close you.
- Below 915.25: the backstop takes the position and the remaining margin.
The first row is the docs’ formula, 1,000 - 750 / 10 / 0.975:
liq_price = price - side * margin_available / position_size / (1 - l * side)
side = 1 for long, -1 for shortl = 1 / MAINTENANCE_LEVERAGE (the maintenance margin rate)margin_available (cross) = account_value - maintenance_margin_requiredmargin_available (isolated) = isolated_margin - maintenance_margin_requiredFour steps as your equity falls
Section titled “Four steps as your equity falls”- Trigger: equity below maintenance margin (margin), for a cross account as a whole or an isolated position alone.
- Market liquidation: market orders go to the book, sliced above 100,000 USDC (table). Once maintenance margin is met again it stops, and the remaining collateral stays with you.
- Backstop: below two thirds of maintenance, the liquidator vault (HLP) takes every cross position and all cross margin (a trader with no isolated positions ends at zero equity), or an isolated position and its margin only. Keeping the maintenance margin makes backstops profitable on average for HLP.
- Auto-deleveraging: if an account’s or isolated position’s value goes negative, profitable opposing positions are closed against it (auto-deleveraging).
What this means for you:
- Watch the mark. In volatile markets and at high leverage it can sit well away from the book.
- Your liquidation price moves with funding and, in cross, with every other cross position’s PnL.
- In cross, lowering leverage doesn’t help: add collateral or reduce size.
- Leave before the backstop, which takes the maintenance margin too: the docs advise a stop loss or exit first (TP/SL).
- Liquidated positions show as “Market Liquidation” in trade history.
Each HIP-3 dex has its own backstop
Section titled “Each HIP-3 dex has its own backstop”On a HIP-3 dex the backstop liquidator is a fully on-chain strategy at a per-dex address (table); the first HIP-3 dex’s ends ...0001. As an independent user it falls back to auto-deleveraging to keep the dex solvent. hip3LiquidatorTransfer moves funds in and out; only principal, not PnL, can be withdrawn.
Portfolio margin skips the book
Section titled “Portfolio margin skips the book”A portfolio margin account is liquidatable when its portfolio margin ratio exceeds 0.95, and goes directly to the backstop liquidator at system address 0xbbb...b.
The numbers
Section titled “The numbers”| Parameter | Value |
|---|---|
| Price used | mark price |
| Trigger | equity below maintenance margin |
| Maintenance margin rate | half the initial margin rate at maximum leverage; 1.25% (40x) to 16.7% (3x) |
| First step | market orders for the full position sent to the book |
| Partial liquidation | positions above 100,000 USDC (10,000 USDC on testnet): 20% per market liquidation order |
| Cooldown after a partial liquidation | 30 s; market liquidation orders are for the entire position during it |
| Backstop threshold | equity below 2/3 of maintenance margin |
| Backstop, validator-operated perps | liquidator vault, a component strategy of HLP |
| Backstop, HIP-3 | per-dex liquidator at 0x4000000000000000000000000000000000000000 + dex_index; cross-enabled assets only |
| Maintenance margin on backstop | not returned |
| Clearance fee | none |
hip3LiquidatorTransfer amount |
ntl in units of 1e-6 collateral token; a multiple of 1,000 tokens |
Liquidations in the API
Section titled “Liquidations in the API”| Source | Liquidation data |
|---|---|
clearinghouseState |
liquidationPx per position; the production integrations surveyed read it rather than compute it |
| Fill | liquidation: { liquidatedUser?, markPx, method }, method being "market" or "backstop" |
userEvents WebSocket (channel "user") |
can deliver liquidation: { lid, liquidator, liquidated_user, liquidated_ntl_pos, liquidated_account_value } |
| Non-funding ledger update | a liquidation entry: accountValue (the isolated account value, for isolated positions), leverageType ("Cross" or "Isolated"), liquidatedPositions (coin, szi) |
| Order status | liquidatedCanceled for orders a liquidation cancelled |
One risk dashboard builds a liquidation ladder by bucketing tracked accounts’ liquidationPx by price.
Estimate, tier and HIP-3 caveats
Section titled “Estimate, tier and HIP-3 caveats”- Pre-trade estimates can differ from the post-trade liquidation price as book liquidity changes; without enough margin, they assume a top-up to initial margin.
- Tiered assets:
lcomes from the tier matching position value at the liquidation price, not the current price. - Isolated-only HIP-3 assets (
noCross,strictIsolated) lack the per-dex backstop, which the docs say makes cross-enabled assets significantly less likely to see auto-deleveraging. - Deployer-supplied mark prices: on a HIP-3 dex the deployer pushes mark inputs with
setOracle, each push moving the mark at most 1 per cent (operating a perp dex).
Below zero equity, auto-deleveraging takes over. For liquidation distance as a pre-trade check, see the risk playbook.