Portfolio margin
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) |
One portfolio, four eligible assets
Section titled “One portfolio, four eligible assets”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 |
Shortfalls are borrowed for you
Section titled “Shortfalls are borrowed for you”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 continuouslyutilization = total_borrowed_value / total_supplied_valueIt’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 ratio that triggers liquidation
Section titled “The ratio that triggers liquidation”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)Spot borrows go straight to the backstop
Section titled “Spot borrows go straight to the backstop”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.
The numbers
Section titled “The numbers”| 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 |
Carry becomes cheap to hold
Section titled “Carry becomes cheap to hold”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 |
Watch the ratio, not the health factor
Section titled “Watch the ratio, not the health factor”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.
Enabling and reading it from code
Section titled “Enabling and reading it from code”- Enable with
userSetAbstractionand"portfolioMargin",agentSetAbstractionwith"p", or CoreWriter action 16 with 3 (account modes). No precompile exposes the mode. - Balances are in
spotClearinghouseState, not the per-dex perp states.borrowLendUserStatereturns per-tokenborrowandsupply(basisandvalue, in token amounts, not USD), plushealthandhealthFactor. - Read live LTVs from
allBorrowLendReserveStates(ltv) or precompile0x812(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
borrowLendor CoreWriter action 15. On mainnet, two action 15 emissions failed withManual borrow/lend not allowed with portfolio marginwhile 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.
Eligibility and caps are not fixed
Section titled “Eligibility and caps are not fixed”- Caps are soft or moving: on 2026-09-20 mainnet HYPE
totalSuppliedread 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.