Hyperliquid Margin Explained: Cross vs Isolated, Maintenance Margin and Liquidation Price
How Hyperliquid margin works: initial and maintenance margin formulas, cross vs isolated mode, the liquidation price formula, partial and backstop liquidations, with worked examples.
Initial margin
On Hyperliquid, opening a perpetual position locks initial margin:
Initial margin = position size × mark price ÷ leverage.
A 1 BTC long at $75,000 with 5x leverage needs $15,000 of margin. With 20x it needs $3,750. The position, and its risk, is the same $75,000 of BTC either way; leverage only changes how much collateral backs it.
Leverage can be any integer from 1 up to the asset's maximum, which varies by asset (high for BTC and ETH, lower for smaller assets). You can raise leverage on an open position without closing it. Leverage is only checked when a position is opened, so after that, monitoring it is your job.
Maintenance margin
Maintenance margin is the minimum collateral a position must keep. Hyperliquid sets it at half of the initial margin at the asset's maximum leverage.
For an asset with 40x maximum leverage, initial margin at max is 2.5%, so maintenance margin is 1.25% of notional. For an asset capped at 3x, maintenance is about 16.7%. The lower an asset's maximum leverage, the more collateral it needs to stay open.
Liquidation begins when account equity, including unrealized PnL, falls below maintenance margin. Liquidations use the mark price, which blends prices from external exchanges with Hyperliquid's own order book, not the last trade.
Cross vs isolated margin
Cross margin (the default). All cross positions share the account's collateral. Unrealized profit on one position automatically supports the others and can be used as margin for new positions. That is capital-efficient, but a loss on one position can drain the margin of all of them.
Isolated margin. Each position has its own collateral. A liquidation is contained to that position; the rest of the account is untouched. Unrealized PnL counts as extra margin for that position only. You can add or remove isolated margin while the position is open, except on 'strict isolated' assets, where margin can only leave as the position closes.
Cross and isolated liquidations do not affect each other. A practical rule: use isolated for speculative or high-leverage trades you want to cap, cross for a deliberate, hedged book you actively manage.
The liquidation price formula
Hyperliquid documents the formula as:
liq_price = price − side × margin_available ÷ position_size ÷ (1 − l × side)
where side is 1 for a long and −1 for a short, l = 1 ÷ maintenance leverage, and margin_available is account value minus maintenance margin required (cross) or isolated margin minus maintenance margin required (isolated).
Worked example, isolated long. 1 BTC at $75,000, 10x, so $7,500 isolated margin. With a maintenance rate of 1.25% (l = 0.0125), maintenance required is $937.50, so margin_available is $6,562.50. Liquidation price ≈ 75,000 − 6,562.50 ÷ 1 ÷ 0.9875 ≈ $68,355, about 8.9% below entry, not the 10% that '10x' suggests.
In cross mode the same position's liquidation price depends on everything else in the account, and moves as other positions gain or lose.
Partial and backstop liquidations
Hyperliquid tries to liquidate through the order book first.
Partial liquidation. For liquidatable positions above 100,000 USDC, only 20% of the position is sent to the book as a market order at a time, followed by a 30-second cooldown. During the cooldown, liquidation orders can cover the whole position.
Backstop liquidation. If equity falls below two-thirds of maintenance margin and book liquidation has not succeeded, the liquidator vault, part of HLP, takes over the position. In cross mode all cross positions and cross margin transfer to the liquidator; in isolated mode only that position and its margin. In a backstop liquidation the maintenance margin is not returned to you.
Withdrawing margin
Removing margin for anything other than trading, such as withdrawals, spot transfers or moving isolated margin, must leave enough behind:
transfer margin required = max(initial margin required, 10% × total position value).
So even a low-leverage book must keep at least 10% of open notional as collateral before you can move funds out. Plan for this before you need the cash.
What this means for risk
Size by notional, not by margin. Your exposure is the position size, whatever the leverage.
Your liquidation distance is shorter than 1 ÷ leverage, because maintenance margin sits in between. Fees and funding shorten it further over time.
Cross margin couples positions. One bad trade can liquidate a good one.
In violent markets, the move to your liquidation price can happen in minutes. The defence is a smaller notional, not a closer watch.
For the practical side (sizing rules, hourly funding, order hygiene and when to cut size), see our Hyperliquid risk management guide.
Know your maximum notional before you open it.
RiskState returns the maximum notional exposure for BTC and ETH perps under current conditions, and blocks leverage when a squeeze is building.