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.

Market shapes: binary, labelled, multi-outcome, price bucket, scalar

Practitioner

Every HIP-4 market arranges the same Yes and No outcome into one of five shapes: price binary, labelled binary, multi-outcome question, price buckets or scalar.

The shape of a market tells you what its price means. It also decides which conversions apply and how the market settles.

A Yes at 0.30 on a binary reads as about a 30 per cent chance. On a scalar band from 50 to 150, a Long at 0.30 means the market expects a settle near 80: 50 + 0.30 * (150 - 50) = 80.

Every shape reuses HIP-4’s one primitive, an outcome paying f and 1 - f, with no new contract type.

  • Standalone outcome. One Yes and No pair on one book.
  • Question. Outcomes, each on its own book with sides Yes and No, of which exactly one settles to 1. The protocol adds a fallback to the named outcomes. Outcomes added while it is live credit fallback Yes holders an equal Yes, so “none of the listed” keeps its meaning.
Shape Container What it is
Price binary standalone the protocol’s recurring markets, named Recurring; Yes if the mark price, interpolated to expiry, is at or above the target. Deployers list the same idea with the binaryPrice template, resolved on a TWAP over a stated number of seconds
Labelled binary standalone a template names its sides, such as template:Over and template:Under; the first is side 0 and receives f. Most standalone deployer templates on mainnet, such as sportsOverUnderMarket and aiModelHeadToHead, produce it
Multi-outcome question question named outcomes are the answers, such as a tournament winner. On deployer questions the fallback is named template fallback, described other, and settles to 0 automatically when a named answer wins
Price buckets question N thresholds cut the price into N + 1 half-open buckets, lower bound inclusive (< P1, [P1, P2), >= P2), plus the fallback
Scalar standalone settles to a fraction; on scalarPrice the sides are Long and Short

Example descriptions:

class:priceBinary|underlying:BTC|expiry:20260503-0600|targetPrice:78213|period:1d
class:priceBucket|underlying:BTC|expiry:20260507-0745|priceThresholds:81538,81783|period:15m

The scalarPrice payout:

Long = clamp((price - low) / (high - low), 0, 1)
Short = 1 - Long
price = TWAP over {seconds} of a Hyperliquid perp's price, ending at {time}

With low 50 and high 150, a price of 116 pays Long 0.66 and Short 0.34. The perp may be a HIP-3 dex:COIN, so a scalar band can list against a perp its deployer does not own (how the HIPs compose).

Every outcome trades on one merged book. Buying Yes at p is selling No at 1 - p. Priority is price, then side, then time, so at one merged level resting sells match before resting buys; measured on mainnet, the Yes and No l2Books were exact 1 - p mirrors.

Parameter Value
Price grid steps of 0.00001, from 0.00001 to 0.99999
Size decimals 0 (whole contracts)
Named outcomes per question at most 100, plus 1 automatic fallback
Standalone settlement any fraction from 0 to 1
Question outcome settlement exactly 0 or 1
Display name of a standalone outcome or question at most 70 characters
Display name of a question outcome at most 25 characters
Display side name, standalone at most 10 characters
On-chain name / description at most 100 / 2,000 characters
Price buckets N thresholds give N + 1 buckets, plus the fallback
Scalar Long payout clamp((price - low) / (high - low), 0, 1)
Scalar Short payout 1 - Long
Shape A Yes price of 0.30 means
Price binary, labelled binary about a 30 per cent chance the first side wins
Multi-outcome, price bucket about a 30 per cent chance this answer or bucket wins; the Yes prices across the question should sum to about 1
Scalar the market expects Long to pay 0.30, which maps to a price of low + 0.30 * (high - low)

When the best Yes asks across a question sum below 1, buying one of each and redeeming the set pays the difference (split, merge, negate).

Orders follow spot within the grid: a market order is FrontendMarket at 0.99999 to buy or 0.00001 to sell. FOK and GTD are rejected; Ioc fills what it can and cancels the rest (order types).

Each outcome in outcomeMeta carries name, description and sideSpecs. Deployer markets are named template:<template id>, with keyword values sorted by keyword as keyword:value|keyword:value. Standalone sides are template: plus the template’s side name; question outcomes use Yes and No.

Classify an outcome by checking in this order, as one production deployer does:

Check Shape
Description starts class:priceBinary price binary (protocol recurring)
Parent question’s description starts class:priceBucket price bucket
Belongs to any other question multi-outcome
Anything else labelled binary

Scalars, being standalone pairs, fall in the last row: tell them apart by template name, such as template:scalarPrice or template:sportsScalarMarket.

  • Side index is position, not name. Side 0 is the first sideSpecs entry; the encoding is 10 * outcome + side (asset ids). One SDK maps Yes to 0 and any other name to 1, wrong for labelled sides; code that falls back to side 0 on unparsable input trades the wrong side silently, so validate the side.
  • Question outcomes carry only their own keywords, such as choice:A; event and deadline times live on the parent question.
  • Count the pair as one market. dayBaseVlm is identical on the Yes and No coins, and their two dayNtlVlm values sum to it (measuring volume).
  • Open interest is circulatingSupply per side; the sides differed on 89 of 192 pairs measured.
  • The spot five-significant-figure price rule does not apply. One SDK applies it, allowing 0.000001 steps below 0.10 that the 0.00001 grid lacks (precision).
  • The minimum order size is unresolved: $10 historically, $1 anticipated, neither stated in the official docs for outcomes. One SDK values an order on its cheaper side, min(p, 1 - p).
  • A settled outcome leaves outcomeMeta with its bucket bounds; only the parent question’s description in settledOutcome recovers them.
  • Template sets differ by network: on 2026-09-14 mainnet had 18 and testnet 60. Mainnet has scalarPrice; testnet lacks it and carries other scalar ids, including a misspelt scalePrice; test against the mainnet id (templates).
  • Some templates settle a draw or a void at 0.5, even in a binary shape: read the template before reading a price as a probability.

For where shapes come from, see Outcome templates and keywords.