Testnet

Liquidation

When losses eat through the margin, Hyperliquid closes the position. Here is where that line is.

6 minLesson 4 of 62 questions at the end

Key ideas

  1. 1Every position has a liquidation price. If the mark price reaches it, Hyperliquid closes the position and the margin behind it is lost.
  2. 2The higher the leverage, the closer the liquidation price is to your entry.
  3. 3Hyperliquid keeps a maintenance margin: liquidation comes a little before the margin is fully gone.
  4. 4A stop loss is how you leave on your terms, before liquidation does it for you.

What happens

As a position loses, the losses come out of its margin. Hyperliquid needs a little margin to remain, the maintenance margin. When the account falls to it, Hyperliquid closes the position at the market. The margin behind it is lost.

For BTC, the maintenance margin is half of what 40x needs: 1.25% of the position. So liquidation comes a little before the margin is completely gone.

Where the line is

Formula
Distance to liquidation ≈ 1 ÷ leverage − maintenance margin
Roughly, for a fresh position backed only by its own margin. Lance shows the exact estimate before every trade.
Worked example: Where a $100 margin long is liquidatedBTC at an example price
Entry
100,000
Long at 3x
67,511 (−32.5%)
Long at 10x
91,139 (−8.9%)
Long at 25x
97,215 (−2.8%)

Hyperliquid’s maintenance margin for BTC is 1.25% of the position, so liquidation comes a little before the margin is all gone.

Move the price until it breaks

Push the price slider into the red zone to see the margin go.

BTC at an example priceEntry 100,000
Side
Margin$100
Leverage10x
Move the price0.0% → 100,000
−20%−10%0+10%+20%
Position size
$1,000
$100 × 10
Liquidation price
91,139
−8.9% from entry
PnL
$0.00
Before fees
ROE
0.0%
A 1% move is 10% of your margin

At 10x, a 8.9% move down would liquidate this position.

Liquidation follows the mark price

Hyperliquid checks liquidations against the mark price, a fair price built from its own book and prices on other exchanges. A single odd trade won’t liquidate you, but a real fast move will, even if it reverses a minute later.

Staying away from it

  • Use a stop loss: it closes the position on your terms, before liquidation.
  • Use less leverage: the line moves further away.
  • Watch your bot’s warnings: it tells you when a position nears liquidation.

Common mistakes

  • Ignoring the liquidation price shown before you trade. Lance shows it on the order panel and on the confirm card.
  • Moving a stop loss past the liquidation price. Lance refuses a stop loss that would come at or after liquidation.
  • Thinking a position is fine because the last price is. Liquidation follows the mark price, which can briefly differ.

Check yourself

Question 1 of 2

What usually happens to the margin of a liquidated position?

Previous: Leverage and margin

Lance Learn is education, not advice. Examples use made-up or rounded numbers and say so; nothing here tells you what to trade.

Trading perpetual futures with leverage is high risk. Prices can move fast and you can lose all the money you put in. Lance is software: it does not give investment advice, manage money or trade on anyone’s behalf. Trades are executed on Hyperliquid, a third-party exchange that is not affiliated with Lance. Lance is not available to persons in the United States, the United Kingdom and sanctioned countries.