Skip to content
Request a review

How Perpetual DEXs Work · Perpetual Contracts · 3/4

Margin & Liquidation in Perpetual Futures

In short: initial margin is what you post to open a leveraged position; maintenance margin is the minimum needed to keep it open. When account equity (or, for an isolated position, its margin plus PnL) falls below maintenance margin, the position is liquidated. On Hyperliquid, maintenance margin is half the initial margin at the asset's maximum leverage, and it is checked against the mark price.

Leverage is what makes perpetual futures both powerful and dangerous. Understanding margin and liquidation isn't optional — for traders it's survival, and for market operators it's the machinery that keeps a market solvent. A correct directional call with wrong position sizing can end in the same place as a wrong call: zero.

What Is Margin?

Margin is the collateral you deposit to open a leveraged position. Instead of putting up the full value of a trade, you put up a fraction; the margin exists to absorb your losses.

If you want to open a $100,000 BTC-PERP position:

The margin is your skin in the game. When your losses approach your margin, bad things happen.

Initial Margin vs Maintenance Margin

Two critical thresholds govern every leveraged position:

Initial Margin (IM): The minimum collateral required to open a position. It is notional / leverage, so the leverage you choose sets it, up to the asset's maximum leverage.

Maintenance Margin (MM): The minimum collateral required to keep a position open. It is always lower than the initial margin. On Hyperliquid it is set to half of the initial margin at the asset's max leverage — so it depends on the asset, not on the leverage you picked (Margining docs).

Example on Hyperliquid for BTC-PERP (as of October 2026, from the live meta endpoint and Margin tiers):

How Liquidation Works

Liquidation is the forced closure of your position when your equity falls below the maintenance requirement. On Hyperliquid the sequence is (Liquidations docs):

  1. You open a $100,000 long BTC-PERP at $60,000 with $10,000 isolated margin (10x)
  2. BTC falls to about $54,700 (by the mark price, not the last trade) — your equity is now about the $1,250 maintenance margin
  3. The liquidation engine sends market orders for the position to the order book. For positions above $100,000, only 20% is sent in the first liquidation order
  4. If the book closes enough of the position, any remaining collateral stays with you — Hyperliquid charges no separate clearance fee
  5. If equity drops below 2/3 of maintenance margin without the book absorbing the position, a backstop liquidation transfers it to the liquidator vault (a component of HLP), and the remaining maintenance margin is not returned

The backstop is the venue's buffer — what other exchanges call an insurance fund. If even that is not enough and an account goes negative, auto-deleveraging (ADL) closes profitable positions on the opposite side at the previous mark price, ranked by profit and leverage, so the venue never carries bad debt (ADL docs). Each HIP-3 DEX has its own on-chain backstop liquidator for assets with cross margin enabled, and falls back to ADL (HIP-3 docs).

Cross Margin vs Isolated Margin

This is one of the most important decisions a trader makes on any perp DEX:

Isolated Margin

Cross Margin

On Hyperliquid, cross margin is the default. Some assets are strict isolated (margin cannot be removed). HIP-3 DEXs also support a "no cross" mode, and enabling cross margin on a HIP-3 asset is irreversible and subject to validator eligibility standards (Margining docs, HIP-3 docs).

Practical Liquidation Examples

Both examples use Hyperliquid's ETH-PERP parameters (25x max leverage, so 2% maintenance margin) and the liquidation price formula.

Scenario 1: Isolated Margin Long

Scenario 2: Cross Margin Long

For cross positions, the leverage you set doesn't change the liquidation price — only how much of the balance is reserved as initial margin. Cross margin gives you more room to be right, but the downside is your whole account.

Liquidation Cascades

One of the most dangerous phenomena in leveraged markets is the liquidation cascade:

  1. Price drops sharply, liquidating long positions
  2. Liquidations are market sells, pushing the price down further
  3. Lower price triggers more liquidations
  4. Those liquidations push the price even lower
  5. Repeat until the cascade exhausts itself

This is why you see violent wicks in crypto. Design choices such as a robust mark price, partial liquidations of large positions and a backstop liquidator are there to dampen cascades, but they cannot remove them — thin books make them worse.

What This Means for Market Operators

If you deploy a HIP-3 market, several of these levers are yours (HIP-3 docs, deployer actions):

  1. Max leverage and margin tiers: They set the maintenance margin. High leverage on a thin or volatile market means positions go straight from healthy to backstop or ADL.
  2. Oracle quality: Liquidations follow the mark price, which is built on your oracle. A manipulable oracle is a liquidation weapon.
  3. Open interest caps: Capping OI limits how much has to be unwound in a cascade.
  4. Margin mode: Isolated-only markets contain damage; cross margin is irreversible once enabled and must meet validator standards.
  5. Liquidity: Liquidations go to the order book first. Without makers quoting through stress, more positions fall through to the backstop and ADL.

Margin and liquidation are mechanical — they follow rules, not emotions. Learn the rules, and you control the risk. Ignore them, and the market will teach you the hard way.