Skip to content
TradePerpetuals9 pages
What a perpetual future isFoundationA perpetual future is a contract on an asset's price that never expires, kept close to that price by an hourly payment between longs and shorts.Contract specificationsPractitionerEvery Hyperliquid perp is a linear contract on 1 unit of its asset, defined by size decimals, maximum leverage, a margin table and a margin mode.FundingPractitionerFunding is an hourly payment between longs and shorts, set by how far the perp trades from the oracle price, that ties a contract with no expiry to its index.Margin: cross, isolated and margin tiersPractitionerMargin is the collateral behind a perp: initial margin to open, maintenance margin to stay open, shared in cross mode or ring-fenced in isolated mode.Leverage and liquidationPractitionerBelow maintenance margin, positions go to the order book as market orders; below two thirds of it, the liquidator vault takes them over.Auto-deleveragingExpertWhen an account goes below zero, auto-deleveraging closes the most profitable, most leveraged opposing positions at the previous mark price, leaving no bad debt.Hyperps and index perpetualsPractitionerHyperps fund against a moving average of their own mark price until spot trading exists; index perps track a formula the validators publish.AMM-priced perpetualsExpertSome perps price off a Uniswap V2 or V3 pool instead of exchange spot prices, and are isolated only, with margin locked in until the position closes.DelistingPractitionerWhen validators vote to delist a perp, positions settle at the 1-hour time-weighted oracle price before the vote and no new orders are accepted.

Risk playbook

Practitioner

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_leverage
side = 1 for long, -1 for short
margin_available (cross) = account_value - maintenance_margin_required
margin_available (isolated) = isolated_margin - maintenance_margin_required

For 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 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.

  • 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.
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
  1. Distance: compute it and compare with the interface; resolve any gap first.
  2. 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.
  3. Size tier: find the margin tier of the full position.
  4. Mode and scope: cross or isolated, and which dex’s margin.
  5. Correlation: count correlated positions as one.
  6. Funding: annualise the hourly rate on notional, divide by margin, decide how many days the trade can carry.
  7. Auto-deleveraging: on a large, highly levered winner, cut leverage or take profit rather than sit at the front of the queue.
  8. The venue: on a builder-deployed market, know the deployer.
  9. Keys and processes: one API wallet per process, scheduleCancel armed, cancel-all on shutdown.
  10. Stops: a stop before the liquidation price keeps the maintenance margin a backstop liquidation would take.

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.