Cross vs. Isolated Margin on Hyperliquid Perps: Which to Use
Compares cross-margin and isolated-margin modes on Hyperliquid, showing how each affects liquidation price, capital efficiency, and portfolio-level risk for HFT bots, directional traders, and hedgers.
Hyperliquid gives you a real choice about how your collateral is allocated, and the wrong answer costs real money. Most traders pick a mode at account open and never revisit it. That is a mistake — the right answer depends on what you are trading, how many positions you run simultaneously, and whether your risk model is per-position or portfolio-wide.
How the Two Modes Actually Work
In cross-margin mode, your entire account balance backs every open position. If you hold BTC-PERP long and ETH-PERP short, the unrealised PnL from one position contributes to the margin of the other. Liquidation is triggered when your total account equity falls below the maintenance margin requirement across all positions combined.
In isolated-margin mode, you pin a fixed USDC amount to each position at open. That tranche is ringfenced. A position can go to zero and liquidate without touching margin in any other position. You can add margin manually, but you cannot borrow from the rest of the account automatically.
Hyperliquid computes both modes using a mark-price-based margin system. Maintenance margin rates vary by asset and leverage tier; at 10x on BTC you are looking at roughly 0.5% maintenance margin, which means your liquidation buffer is thin and the mode choice has outsized consequences.
Liquidation Price Mechanics
The liquidation price formula differs substantially between modes.
In cross mode, your liquidation price for any single position is a moving target. As other positions generate unrealised profit, your effective equity rises and your liquidation distance on a losing position widens. As other positions lose, that distance shrinks — sometimes fast. You will not see a single static liquidation price in the UI that you can trust; you need to model the full portfolio.
In isolated mode, liquidation price is deterministic at open:
- Long isolated liquidation price ≈ entry price × (1 − 1/leverage + maintenance margin rate)
- Short isolated liquidation price ≈ entry price × (1 + 1/leverage − maintenance margin rate)
At 20x leverage long BTC at 65,000, with 0.5% maintenance margin, your isolated liquidation sits around 61,912. That number does not move unless you add collateral. For a bot generating fill reports, this is essential: a fixed liquidation price means a fixed stop-loss equivalent you can model deterministically.
Capital Efficiency Trade-offs
Cross margin wins on capital efficiency for multi-leg strategies. A delta-neutral book — long one asset, short another — nets out the margin requirement in cross mode because the combined equity exposure is lower. Running the same two legs in isolated mode double-charges you: you post full margin for the long and full margin for the short independently, with no netting benefit.
For a bot running 8–12 concurrent perpetual positions across different assets, cross margin can reduce total collateral requirement by 30–50% compared to isolated. That freed capital earns yield in the vault or backstops additional trades.
The cost is correlated liquidation risk. A broad market move can wipe the shared pool faster than any single-position stop would trigger. In August 2024-style liquidation cascades, cross-margin accounts on leveraged exchanges faced liquidation on positions they considered safe because correlated losses across the book exceeded the combined equity simultaneously.
Which Mode Fits Which Strategy
Directional swing traders running one or two large positions should use isolated margin. You know your max loss at open, you set position size from that number, and a blow-up in one trade cannot cascade to another. The capital inefficiency is acceptable at small position counts.
Market-making and HFT bots — the kind we build at TierZero — almost always run cross margin. A market-maker quotes both sides simultaneously and nets the inventory risk. Isolated mode would demand double the collateral for the same spread capture. Cross margin also simplifies the reconciliation loop: one equity number, one liquidation threshold to monitor, one funding event to account for.
Hedgers and delta-neutral strategies belong in cross margin for the netting benefit, but require a portfolio-level liquidation monitor, not position-level alerts. The bot needs to watch total account equity against total maintenance margin in real time, not individual position margins.
Momentum bots taking aggressive directional entries are a genuine grey area. If the bot can have multiple directional positions open simultaneously and they can be correlated, isolated margin limits contagion. If the bot is strictly one-position-at-a-time, the distinction collapses to capital efficiency only.
Operational Considerations for Automated Systems
When you automate against Hyperliquid's API, margin mode is set per-account, not per-order. Switching modes while positions are open will not immediately change how existing positions are margined — Hyperliquid migrates open positions, but the behaviour during the transition window needs testing. We have seen edge cases where the liquidation price displayed in the UI diverges momentarily from the API-returned value during a mode switch with open positions.
For bots, the practical rule is: set the mode once before any position is opened, treat it as an immutable account property, and run separate accounts if a strategy mix requires both modes. Account isolation at the key level on Hyperliquid means this is operationally straightforward.
Monitor clearinghouseState.marginSummary.accountValue and maintenanceMarginRequired on every fill event in cross mode. In isolated mode, parse positions[].marginUsed per position. The alert thresholds and the remediation logic — reduce position, add collateral, or flatten — differ substantially between the two, and conflating them in a shared risk module is a common source of bugs.
If you are building automated strategies on Hyperliquid and want the margin logic handled correctly from the start, talk to us — we have shipped production bots in both modes and can cut your integration time significantly.
Need a bot like this built?
We design, build and run trading bots on Solana, Hyperliquid and Polymarket.
Start a projectMore from the blog
Public vs Paid RPC: How to Run a Fair Benchmark
A fair comparison of public and paid RPC endpoints must account for quotas, workload, freshness and support guarantees.
Read articleRPC Benchmark Percentiles Explained: p50, p95 and p99
Why averages hide the latency spikes that break trading bots, wallets and production blockchain applications.
Read articleHyperliquid REST vs WebSocket Benchmark: What to Measure
A benchmark plan for Hyperliquid market data that separates request latency from streaming freshness and recovery.
Read article