How to Avoid Liquidation on Hyperliquid: Margin Math, Buffers, and Automatic Protection
The margin math in plain numbers, how far your liquidation price really is at each leverage, why mark price decides it, what the HLP backstop costs you — and the buffers that actually work.
You choose your liquidation price. Most traders just never compute it.
Liquidation feels like something the market does to you. It isn't. The moment you pick a leverage and a margin mode, you have chosen a price at which your position will be forcibly closed — the market only decides whether to visit it.
That reframing matters because it moves liquidation from the category of 'bad luck' to the category of 'design decision made at entry.' Traders who get liquidated repeatedly are not unlucky; they are repeatedly choosing liquidation prices inside the market's normal breathing room and then being surprised when the market breathes.
This guide walks through Hyperliquid's margin system with real numbers: how maintenance margin is set, how far away your liquidation price actually is at each leverage, why it triggers on mark price rather than the last trade, what happens in the two stages of a liquidation — and the buffers that keep you out of all of it.
The margin system in plain numbers
Two quantities govern everything.
Initial margin is what you post to open: notional ÷ leverage. Open $60,000 of BTC at 10x and you post $6,000.
Maintenance margin is the floor that triggers liquidation, and Hyperliquid sets it at half of the initial margin at the asset's maximum leverage. BTC's max leverage is 40x, so its maintenance margin is 1/(2×40) = 1.25% of notional. ETH's max is 25x → 2%. A 3x-max asset → 16.7%. Note that maintenance margin depends on the asset's max leverage, not on the leverage you chose — a 2x BTC position and a 40x BTC position have the same 1.25% maintenance floor; what differs is how much cushion sits above it.
Max leverage itself is tiered by size: BTC supports 40x up to $150M notional (20x above), ETH 25x up to $100M — retail-size positions live comfortably in the top tier.
Margin mode decides what stands behind the position. Cross (the default) pools your whole perps balance behind all cross positions — more cushion, but positions sink together. Isolated fences off a fixed margin for one position: a blow-up there cannot touch the rest, and you can add or remove margin after opening (removal is bounded so the position stays properly collateralized). Isolated is the mode where the numbers in the next section apply most cleanly.
How far away is liquidation, really?
For an isolated position, the adverse move that liquidates you is approximately your margin fraction minus the maintenance fraction. With BTC's 1.25% maintenance margin, that gives (ignoring fees and funding, which only shrink it):
• 5x → margin 20% → liquidation ≈ 18.8% against you
• 10x → margin 10% → liquidation ≈ 8.8% against you
• 20x → margin 5% → liquidation ≈ 3.8% against you
• 40x → margin 2.5% → liquidation ≈ 1.25% against you
Worked example: long 1 BTC at $60,000, 10x isolated, $6,000 margin. Equity hits the 1.25% maintenance floor (~$750 on ~$55k notional) around $54,700 — roughly an 8.8% drawdown. These are approximations — the exchange shows the exact liquidation price on the position, and funding payments, fees, and (in cross) your other positions all shift it. Treat the table as intuition, the UI as truth.
Now put those distances against how BTC actually moves: 3-5% daily swings are unremarkable, and 8-10% moves happen many times a year without any structural news. A 20x position is betting that nothing unremarkable happens while you hold it. This is why 'what leverage should I use?' is the wrong question — the right one is 'where is my invalidation, and what leverage keeps liquidation safely beyond it?' Leverage should be an output of that calculation, never an input.
Mark price decides — not the last print on the book
Liquidations on Hyperliquid trigger on mark price, a deliberately manipulation-resistant reference. It is computed as the median of three inputs: the validators' oracle price (a weighted median of major CEX spot prices) adjusted by a short EMA of Hyperliquid's basis; the median of Hyperliquid's own best bid, best ask, and last trade; and a weighted median of perp mid-prices on Binance, OKX, Bybit, Gate, and MEXC.
Two practical consequences follow.
First, the protection: a thin-book wick on Hyperliquid alone will generally not liquidate you. Someone slamming the HL order book through your level moves only one of the three median inputs — the mark barely blinks. 'Scam wicks' that print on the venue's own chart are largely defanged.
Second, the exposure: you cannot hide from the global market. If BTC drops through your level on Binance and OKX, your mark price follows — even if Hyperliquid's own book never printed there. Your liquidation is effectively referenced to the whole market's price, not one venue's. That is the correct design, but it surprises traders who assumed the local book was what mattered.
The two-stage liquidation: book first, backstop after
When your equity crosses below maintenance margin, liquidation happens in stages — and the deeper you go, the worse the terms.
Stage one is a book liquidation: the position is sent to the order book as a market order. Small positions are attempted in full; positions above $100k notional are unwound in 20% tranches with a cooldown between attempts. Crucially, whatever collateral remains after a book liquidation is still yours.
Stage two is the backstop. If your equity falls below two-thirds of the maintenance margin before the book can absorb the position, the backstop liquidator vault (part of HLP) takes the position over directly — and your remaining maintenance margin is not returned; it stays with the vault as its buffer for taking on the risk.
Read that as a fee schedule for margin negligence: getting liquidated near the maintenance line costs you the loss; getting liquidated through it costs you the loss plus your remaining margin. In a fast market gapping past your level, the difference between the two stages is not in your control — which is the strongest argument for never letting price get near the line at all.
Buffers that actually work
Everything above compresses into a handful of rules that remove liquidation as a way you can lose:
• Size from the stop, not from the leverage. Decide your invalidation level first (where the trade idea is wrong), decide what fraction of your account that stop may cost, and let those two numbers set position size — the full arithmetic is in our position sizing guide. Leverage falls out of the calculation.
• Keep liquidation far beyond invalidation. If your stop is 3% away, your liquidation should be several times that — not 4%. A stop that fails to execute in a gap should hit air, not the maintenance line. If the leverage you wanted puts liquidation inside ~2× your stop distance, the position is too big.
• Budget for funding. Funding settles every hour on Hyperliquid and comes out of the same equity that holds up your position. A crowded trade paying persistent funding erodes your buffer while you wait.
• Use isolated margin for tail-risk trades. Fence the damage so one thesis cannot cascade into your whole book. Cross margin's shared cushion is comfort in normal conditions and contagion in bad ones.
• Never plan to 'add margin if it gets close.' That plan has you wiring collateral into a losing position during the exact hours you are worst at deciding. If a position needs rescuing, it was mis-sized at entry.
None of this is sophisticated. What it requires is being applied on every trade, including the ones you feel strongly about — which is precisely where humans fail.
Or make the gate refuse the trade
The uncomfortable truth about liquidation avoidance is that it is a discipline problem, not a knowledge problem. Every liquidated trader knew leverage was risky. The failure is applying the rules at the moment of maximum conviction — which is when they matter and when they get skipped.
This is what a pre-trade risk gate is for. Hyperhelm runs every trade intent through a governor before you sign it: position size and leverage are capped by the current regime and volatility, the stop from the structure map has to sit inside a survivable distance, and an intent whose geometry puts liquidation within reach is resized or rejected — mechanically, before the order exists. Exits are placed as native reduce-only triggers at entry, so the position is never naked while you sleep.
You can override the gate; the override is logged, and the public benchmark scores what governed and ungoverned execution would each have done. That is the honest version of 'automatic protection': not a promise that you cannot lose, but a measured record of what the constraint adds. The margin math in this guide is what the governor computes on every intent — the only difference is that it never gets tired of computing it.
See the governed verdict live.
Hyperhelm gates every trade through three engines before you sign it — non-custodial, on Hyperliquid and CoW. Looking is free.