Margin: cross, isolated and margin tiers
Margin 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.
Margin rules decide how much of your USDC a position locks up, and when it is closed for you. A loss beyond your collateral would fall on the liquidator and then the other side (auto-deleveraging). The perps clearinghouse on HyperCore holds every address’s balance, positions and margin state.
A 10,000 USDC position, worked
Section titled “A 10,000 USDC position, worked”Say you buy 10 contracts at 1,000 USDC with 10x, on an asset with 20x maximum leverage.
position value = 10 * 1,000 = 10,000 USDCinitial margin = 10,000 / 10 = 1,000 USDC locked to openmaintenance margin = 10,000 * (1/20) / 2 = 250 USDC liquidated if equity falls belowtransfer requirement = max(1,000, 0.1 * 10,000) = 1,000 USDC must stay behindAt 20x, initial margin drops to 500 USDC; the transfer requirement still holds 1,000.
Initial margin sets your leverage
Section titled “Initial margin sets your leverage”initial_margin = position_size * mark_price / leverage- Leverage is checked only when you open; after that, health is your job. You can raise an open position’s leverage without closing it.
- Margin is checked at placement and again when a resting order is matched, covering oracle moves in between.
Maintenance margin is half the maximum initial rate
Section titled “Maintenance margin is half the maximum initial rate”At 20x, that’s 5 per cent initial and 2.5 per cent maintenance.
- Cross: the account is liquidated when account value, including unrealised PnL, falls below maintenance margin times total open notional.
- Isolated: the same test on the position’s own margin and notional (liquidation).
Cross shares collateral, isolated ring-fences it
Section titled “Cross shares collateral, isolated ring-fences it”Deposits credit the cross balance first; positions open in cross by default.
| Mode | Collateral | Add margin | Remove margin | Where it applies |
|---|---|---|---|---|
| Cross | shared by all cross positions (per dex in standard mode) | deposit | only above the transfer requirement; initial margin in use cannot be withdrawn | default |
| Isolated | ring-fenced to one position | yes | yes, above the transfer requirement | any asset that allows it |
Strict isolated (strictIsolated) |
ring-fenced | yes | no; released pro rata as the position closes | some assets, including AMM-priced perps |
No cross (noCross) |
ring-fenced | yes | yes, above the transfer requirement | HIP-3 assets whose deployer turned cross off |
In cross, unrealised PnL counts as initial margin for new positions; in isolated, it stays in the position. An isolated liquidation touches no other position or the cross account, and no other liquidation touches it.
What this means for you:
- In cross, leverage doesn’t move your liquidation price. It only locks more collateral as initial margin. In isolated, it sets the position’s margin, so it does.
- Cross for a book, isolated for a bet. Cross lets a winner support a loser; isolated caps one idea’s loss at its margin.
- Strict isolated margin is locked in: choose leverage before you open.
Taking margin out
Section titled “Taking margin out”Removing margin other than by trading must leave:
transfer_margin_required = max(initial_margin_required, 0.1 * total_position_value)That covers withdrawals, transfers to spot and isolated margin transfers, including of unrealised PnL. In cross, closing a position that showed 1,000 USDC of margin can free less than that: freed margin first covers other positions whose losses put them below initial margin.
Margin tiers for large positions
Section titled “Margin tiers for large positions”For tiered assets, maintenance margin is piecewise in notional:
maintenance_margin = notional * maintenance_margin_rate(tier) - maintenance_deduction(tier)
maintenance_margin_rate(n) = initial_margin_rate_at_max_leverage(n) / 2maintenance_deduction(0) = 0maintenance_deduction(n) = maintenance_deduction(n - 1) + notional_lower_bound(n) * (maintenance_margin_rate(n) - maintenance_margin_rate(n - 1))The deduction keeps it continuous: each dollar in a higher tier pays that tier’s rate, dollars below keep the lower one. Rates and deductions depend on the tier, not the asset. BTC (40x up to 150M USDC, 20x above):
tier 0: rate = (1/40)/2 = 1.25% deduction = 0tier 1: rate = (1/20)/2 = 2.5% deduction = 0 + 150,000,000 * (2.5% - 1.25%) = 1,875,000
at 150M: tier 0 gives 150,000,000 * 1.25% = 1,875,000 tier 1 gives 150,000,000 * 2.5% - 1,875,000 = 1,875,000 (continuous)at 200M: tier 1 gives 200,000,000 * 2.5% - 1,875,000 = 3,125,000Ids of 50 and above are defined in meta.marginTables. Crossing into a tier your leverage does not allow is refused with Order would cause position to exceed margin tier limit at current leverage.
Cross margin across dexes
Section titled “Cross margin across dexes”In standard mode each perp dex has its own balance and its own cross margin; under unified account and portfolio margin, cross positions on dexes sharing a collateral asset share margin (account modes).
On a HIP-3 dex, enabling cross on an asset is irreversible and subject to validator eligibility rules, including a slashing review each time externalPerpPx moves over 50 per cent from its start-of-day price.
The numbers
Section titled “The numbers”| Parameter | Value |
|---|---|
| Leverage setting | integer, 1 to the asset’s maximum |
| Initial margin | position_size * mark_price / leverage |
| Maintenance margin rate | half the initial margin rate at maximum leverage |
| Maintenance range, validator-operated | 1.25% (40x) to 16.7% (3x) |
| Transfer requirement | max(initial_margin_required, 0.1 * total_position_value) |
| Margin table ids below 50 | single tier, maximum leverage = id |
| HIP-3 margin table | at most 3 tiers; maximum leverage 1 to 50; tiers sorted by increasing lower bound and decreasing leverage |
Mainnet tiers, from the docs:
| Assets | Tier 0 | Tier 1 | Table id, mainnet read |
|---|---|---|---|
| BTC | 0 to 150M: 40x | above 150M: 20x | 56 |
| ETH | 0 to 100M: 25x | above 100M: 15x | 55 |
| SOL | 0 to 70M: 20x | above 70M: 10x | 54 |
| XRP | 0 to 40M: 20x | above 40M: 10x | 53 |
| AAVE, ADA, APT, AVAX, BCH, CRV, DOGE, ENA, FARTCOIN, HYPE, kBONK, kPEPE, LINK, LTC, NEAR, PUMP, SUI, TRUMP, UNI, WLD, ZEC | 0 to 20M: 10x | above 20M: 5x | 52 |
| ARB, BNB, DOT, JUP, kSHIB, MKR, ONDO, PAXG, TON, TRX, XPL | 0 to 3M: 10x | above 3M: 5x | 51 |
Notional in USDC. The mainnet meta read on 28 September 2026 returned tables 51 to 56 with exactly these boundaries, plus table 50, a single 50x tier no listed validator-operated asset used.
Leverage and margin from code
Section titled “Leverage and margin from code”{ "type": "updateLeverage", "asset": 0, "isCross": true, "leverage": 10 }{ "type": "updateIsolatedMargin", "asset": 0, "isBuy": true, "ntli": 1000000 }{ "type": "topUpIsolatedOnlyMargin", "asset": 0, "leverage": "5" }| Action or request | Notes |
|---|---|
updateLeverage |
integer leverage; isCross picks cross or isolated |
updateIsolatedMargin |
adds or removes isolated margin; ntli is an integer with 6 decimals (1000000 is 1 USD); isBuy has no effect until hedge mode exists |
topUpIsolatedOnlyMargin |
targets a leverage, as a float string, not an amount |
clearinghouseState |
pass dex for HIP-3; marginSummary, crossMarginSummary, crossMaintenanceMarginUsed, withdrawable; per position leverage {type, value, rawUsd}, marginUsed, maxLeverage, liquidationPx |
insertMarginTable, setMarginTableIds, setMarginModes |
HIP-3 deployer actions; table ids must be non-zero (operating a perp dex) |
Under unified account or portfolio margin, per-dex states are not meaningful: read spot balances.
Fields and defaults to double-check
Section titled “Fields and defaults to double-check”onlyIsolatedis deprecated: true for bothstrictIsolatedandnoCross, which differ on removing margin. ReadmarginMode.- HIP-3 cross margin is mostly off. On 28 September 2026, 116 of 138 non-delisted assets on three HIP-3 dexes were
noCross; the other 22 had nomarginModeset. An earlier read of listed rate and volatility perps (a US 10-year Treasury yield perp, volatility indices, a dominance ratio) found cross off on every one. - The discontinued DEX abstraction mode makes HIP-3 cross margin behave unintuitively, per the docs: move such accounts to a current mode.
- The docs’ tier lists are slightly stale: in the same read every listed asset sat on the matching table, but MKR and TON were delisted.
- Unified account and portfolio margin allow 50,000 user actions a day; standard mode has no such limit.
- The sign convention for removing margin with
updateIsolatedMarginis undocumented: probe it on testnet first.
For what happens below maintenance margin, see Leverage and liquidation; portfolio margin has its own rules. The risk playbook turns margin rules into pre-trade checks.