Risk playbook
Most losses on Hyperliquid come from liquidation distance, shared margin, funding, auto-deleveraging and operational slips, each checkable before sizing up.
This page is a pre-trade checklist, with the arithmetic behind each check. The mechanisms live on margin, leverage and liquidation, funding and auto-deleveraging. Operational slips here mean a lost key, a nonce collision or a process that died with orders resting.
Say you go long at 10x on a 40x asset with isolated margin. Maintenance is 1.25 per cent, so a fall of 8.86 per cent liquidates you, before fees and funding.
How far the price can move before liquidation
Section titled “How far the price can move before liquidation”Liquidation happens when margin falls below maintenance margin at the mark price. Maintenance is half the initial margin at maximum leverage, more on larger positions under margin tiers. The docs’ exact price:
liq_price = price - side * margin_available / position_size / (1 - l * side)l = 1 / maintenance_leverageside = 1 for long, -1 for shortmargin_available (cross) = account_value - maintenance_margin_requiredmargin_available (isolated) = isolated_margin - maintenance_margin_requiredFor an isolated position at leverage L and maintenance rate m, before fees and funding:
long: distance = (1/L - m) / (1 - m)short: distance = (1/L - m) / (1 + m)Long on a 40x asset (m = 1.25%) |
Liquidated after a fall of |
|---|---|
| 10x | 8.86% |
| 20x | 3.80% |
| 40x | 1.27% |
- Cross margin ignores the leverage setting: lower leverage just uses more collateral; the price depends on the whole account.
- At the line, market orders go to the book first and you keep any margin left. Large positions go in partial steps; below two-thirds of maintenance margin the liquidator vault takes over (table). Testnet starts partial liquidation at 10,000 USDC, not 100,000.
Cross shares collateral; isolated confines it
Section titled “Cross shares collateral; isolated confines it”Cross margin, the default, shares collateral across cross positions; a backstop liquidation takes all of them and all cross margin, leaving an account without isolated positions at zero. Isolated margin confines collateral and liquidation to one position; strict isolated assets forbid removing margin.
Cross reaches one perp dex in Standard mode (each HIP-3 dex is its own), every same-collateral dex in unified and portfolio margin, which also margins spot, and never another sub-account (account modes). Portfolio margin liquidations have no fixed order: perps or spot borrows may go first, depending on oracle update order.
Correlated positions share one liquidation price
Section titled “Correlated positions share one liquidation price”Cross margin can’t see that two positions are one bet: correlated cross longs, or a builder-deployed and a validator-operated perp on one underlying, share one effective liquidation price. The HIP-3 docs warn of greater risk in cross margin across different deployers’ dexes. Separate such bets with isolated margin or sub-accounts.
Funding moves your liquidation price
Section titled “Funding moves your liquidation price”Funding is paid hourly on size times oracle price, out of margin. The quiet-market 0.00125 per cent an hour, longs to shorts, is 10.95 per cent of notional a year simple: 109.5 per cent of margin at 10x (carry).
Your best trade is first in the auto-deleveraging queue
Section titled “Your best trade is first in the auto-deleveraging queue”When an account or isolated position goes negative, profitable opposing positions are closed against it at the previous mark price, ranked by:
(mark_price / entry_price) * (notional_position / account_value)Your best, most levered trade is the most exposed. An account with no open positions never shares in the platform’s losses.
Keys, nonces and processes
Section titled “Keys, nonces and processes”- API wallets trade but can’t withdraw. They’re pruned when deregistered, expired or the registering account is unfunded; never reuse an old address, whose old signed actions can then replay (API wallets and agents).
- Nonces are per signing key: processes sharing a key and the current millisecond collide, and a reused nonce is rejected.
- Dead processes leave orders resting: cancel all on shutdown and arm
scheduleCancel, which cancels every open order at a set time. - A HIP-3 deployer can halt a market, cancelling all orders and settling positions at the mark price.
The numbers
Section titled “The numbers”| Parameter | Value |
|---|---|
| Maintenance margin | half the initial margin at maximum leverage; 1.25% (40x) to 16.7% (3x) |
| Partial liquidation | positions over 100,000 USDC, 20% at a time, 30 s cooldown |
| Backstop liquidation | below two-thirds of maintenance margin; maintenance margin not returned |
| Transfer margin | unrealised profit can leave only if at least max(initial margin, 10% of total open notional) remains |
| Funding | hourly; quiet-market rate 0.00125% an hour; cap 4% an hour |
| ADL ranking | (mark_price / entry_price) * (notional_position / account_value) |
| Portfolio margin liquidation | portfolio margin ratio above 0.95 |
| Nonces | 100 highest per signer; within 2 days behind and 1 day ahead of block time |
| Dead man’s switch | at least 5 s ahead; 10 triggers a day |
| Daily action cap | 50k user actions for unified and portfolio margin accounts; none in Standard |
Run this before you size up
Section titled “Run this before you size up”- Distance: compute it and compare with the interface; resolve any gap first.
- Mark, not last: the mark is a median built from the oracle and Hyperliquid’s own book, and in fast markets can differ from the price you watch.
- Size tier: find the margin tier of the full position.
- Mode and scope: cross or isolated, and which dex’s margin.
- Correlation: count correlated positions as one.
- Funding: annualise the hourly rate on notional, divide by margin, decide how many days the trade can carry.
- Auto-deleveraging: on a large, highly levered winner, cut leverage or take profit rather than sit at the front of the queue.
- The venue: on a builder-deployed market, know the deployer.
- Keys and processes: one API wallet per process,
scheduleCancelarmed, cancel-all on shutdown. - Stops: a stop before the liquidation price keeps the maintenance margin a backstop liquidation would take.
Keep watching after you open
Section titled “Keep watching after you open”Leverage is checked only at open; afterwards only maintenance margin limits it, so a monitor, not the exchange, must watch it. The displayed liquidation price moves with funding payments and, for cross positions, with every other cross position’s profit and loss.
Read liquidationPx from clearinghouseState instead of recomputing it, and alert on its distance from the mark price. Margin tables, tiers included, come from meta.
For the price liquidations use, see Oracles, mark prices and robust price indices. For the same controls run continuously, see Market making on Hyperliquid.