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.

Portfolio margin

Expert

Portfolio margin treats an account's cross perps and spot balances as one portfolio, borrows against HYPE and BTC, and liquidates when its ratio passes 0.95.

Portfolio margin sees a hedge; cross margin can’t. Under cross margin a perp is backed only by its own dex’s collateral. Hold 1 BTC spot and short 1 BTC perp, and a rally can liquidate the short, seen as unhedged and backed by USDC, while the spot BTC sits idle.

Say you post 100 HYPE at $40 and borrow 2,000 USDC, with no perps (the 20 USDC offset ignored):

Step Value
Position 100 HYPE at $40, 2,000 USDC borrowed
Borrow capacity 100 * 40 * 0.65 = 2,600
Partial liquidation starts HYPE at about $24.24: 2,000 / (100 * 0.825)
Full liquidation HYPE at about $22.64: 2,000 / (100 * 0.8833)

Every cross perp position (validator-operated and HIP-3 dexes) and spot balance form one margin unit; each sub-account is its own. Only four assets count, and not every HIP-3 collateral asset is borrowable.

Asset Role LTV Liquidation threshold 0.5 + 0.5 * LTV
HYPE collateral 0.65 0.825
BTC collateral 0.5 0.75
USDC borrowable quote asset; idle balance is supplied not applicable not applicable
USDT borrowable quote asset; idle balance is supplied not applicable not applicable
every other spot token, every outcome position (+ balances, # coins) none: no collateral value not applicable not applicable

A shortfall, for an order or for a perp below maintenance margin, is borrowed against collateral up to the limit below. Deposits and realised profits repay it; borrowed balance can trade but not be withdrawn or transferred.

borrowable = token_balance * borrow_oracle_price * LTV (price in the asset being borrowed)

Borrows accrue interest continuously, indexed hourly like funding. Measured on mainnet, suppliers earn exactly rate * utilization * 0.9 (borrowing and lending).

rate = 0.05 + 4.75 * max(0, utilisation - 0.8) APY, compounded continuously
utilization = total_borrowed_value / total_supplied_value

It’s deliberately not a full lending market: anything beyond supply, borrow and a rate curve, such as a tokenised deposit, is left to HyperEVM builders (composable credit).

The account is liquidatable when its worst ratio across borrowable tokens exceeds 0.95. Notionals convert to USDC at borrow_oracle_price.

portfolio_margin_ratio = max over borrowable tokens T of
maintenance(T) / liquidation_value(T)
maintenance(T) = min_borrow_offset
+ sum over dexes of cross_maintenance_margin(dex)
+ borrowed_size_for_maintenance(T) * borrow_oracle_price(T)
liquidation_value(T) = portfolio_balance(T)
+ min(borrow_cap(T), min(portfolio_balance(T), supply_cap(T)) * borrow_oracle_price(T) * liquidation_threshold(T))
liquidation_threshold(T) = 0.5 + 0.5 * LTV(T)
min_borrow_offset = 20 USDC
borrow_oracle_price(T) = median(HL_spot_USDC_price,
HL_perp_mark_price * USDT_USDC_oracle,
HL_perp_oracle_price * USDT_USDC_oracle)
USDT_USDC_oracle = 1 / HL_spot_oracle_price(USDC)

Perps or spot borrows may go first, depending on the order of oracle updates, so monitor both legs. Spot borrows go in two stages straight to the backstop liquidator at system address 0xbbb...b, with no market phase: spot books are less consistently liquid than perp books.

Stage Triggered when borrowed value exceeds HYPE BTC What happens
Partial collateral_value * (LTV + (1 - LTV) / 2) 82.5% 75% collateral and debt taken over in 20 per cent steps until no longer liquidatable; the FAQ says it repeats every 3 seconds
Full collateral_value * (LTV + (1 - LTV) * 2 / 3) 88.33% 83.33% all remaining collateral and debt taken over

The backstop converts collateral into the debt asset by TWAP. Takeover slippage is bounded by size_liquidated * oracle_price * (LTV + 2) / 3 * width. The docs’ version has an unmatched parenthesis; multiplication is associative, so this is the only reading.

Parameter Value
Eligibility (trading page) master account weighted volume above $5M, or account value above $10k; account value below $25M
Eligibility (FAQ) account value above $10,000 or weighted volume above $5,000,000; account value below $5,000,000; no open positions, orders or TWAPs when enabling
HYPE LTV, liquidation threshold 0.65, 0.825
BTC LTV, liquidation threshold 0.5, 0.75
Liquidatable at portfolio_margin_ratio > 0.95
Minimum borrow offset 20 USDC
Borrow rate 0.05 + 4.75 * max(0, u - 0.8)
Protocol retention 10% of borrow interest, a buffer for future liquidations
Backstop takeover width 3M USDC (HYPE), 300k USDC (BTC)
Backstop conversion TWAP half-life 10 minutes
User actions per day 50k

Supply and borrow caps, per the docs:

Asset Global supply Global borrow Per-user supply Per-user borrow
USDC 1B 500M 250M 50M
USDT 50M 10M 5M 1M
HYPE 10M not borrowable 1M not borrowable
BTC 2k not borrowable 200 not borrowable

The docs’ example: 1 BTC spot, short 1 BTC perp at 10x. Without portfolio margin, USDC alone backs the perp and the hedged range is far narrower. Funding, interest and spot-perp drift still apply (carry).

BTC price What happens
100k interest paid only on the one-tenth initial margin; funding earned on the full 100k
150k 50k USDC borrowed against the spot BTC, now worth 150k, to cover the perp loss
200k the trader must cut size to avoid a borrow liquidation

The interface shows both, and only one liquidates you.

Number Formula At the threshold
Portfolio margin ratio above at 95%, positions and collateral are at risk of liquidation
Health factor LTV-weighted account value / borrowed amount below 100%, no further borrowing; not a liquidation

Caps change the rules mid-trade. Past a borrow cap, or with all supply lent, positions are protected only up to what can still be borrowed; further margin must come from the settlement asset. At 100 per cent utilisation suppliers can’t withdraw until supply is added or borrows repaid.

Your liquidation price drifts. Accrued interest, withdrawals, falling collateral and perp losses all push the ratio up. Net balance is equity - borrowed, negative when borrows exceed equity.

  • Enable with userSetAbstraction and "portfolioMargin", agentSetAbstraction with "p", or CoreWriter action 16 with 3 (account modes). No precompile exposes the mode.
  • Balances are in spotClearinghouseState, not the per-dex perp states. borrowLendUserState returns per-token borrow and supply (basis and value, in token amounts, not USD), plus health and healthFactor.
  • Read live LTVs from allBorrowLendReserveStates (ltv) or precompile 0x812 (ltvBps): the docs’ API example shows HYPE at 0.5, and one app hard-coded 0.5 for both.
  • Manual lending is refused, by HTTP borrowLend or CoreWriter action 15. On mainnet, two action 15 emissions failed with Manual borrow/lend not allowed with portfolio margin while the EVM transaction reported success.
  • Idle balances are supplied for you, so a contract or vault that tracks its own supply must not use this mode.
  • Caps are soft or moving: on 2026-09-20 mainnet HYPE totalSupplied read 10,233,170.44 against the documented 10M. Read live reserve state.
  • Supplied balances may not count toward eligibility (unconfirmed): on testnet, 10,000 USDC supplied plus 2,000 USDC spot was refused with Portfolio margin requires account value of $10000 or total volume of $5000000.

For the three modes side by side, see Account modes. For perp liquidation outside portfolio margin, see Leverage and liquidation.