Hyperliquid Academy Independent · Unofficial

What price does Hyperliquid use to liquidate you?

Verified against Hyperliquid docs: Oracle and Hyperliquid docs: Robust price indices · by Hyperliquid Academy

Two prices, doing two different jobs

Most traders assume the number on the chart is the number that liquidates them. It is not, and the gap between those two prices is the reason liquidations sometimes look wrong.

Hyperliquid runs two derived prices. Neither is the last trade you see.

Oracle priceMark price
Built fromspot prices at eight venuesthree inputs, one of which is the oracle
Updatedevery 3 seconds, by validatorswhenever the oracle updates
Used forfunding paymentsmargin, liquidation, TP/SL triggers, unrealised PnL
Includes Hyperliquid’s bookonly for assets that trade mainly hereyes, as one of three inputs

If you only remember one line from this page: funding is settled on oracle price, and everything that can close your position runs on mark price.

How the oracle price is built

Each validator computes its own spot price for every perpetual asset, as a weighted median of eight venues.

VenueWeight
Binance3
OKX2
Bybit2
Kraken1
Kucoin1
Gate IO1
MEXC1
Hyperliquid spot1

Two adjustments matter, and both are about where an asset’s liquidity actually lives:

  • Assets whose spot liquidity is mainly outside Hyperliquid, such as BTC, exclude Hyperliquid’s own spot price from the oracle.
  • Assets whose spot liquidity is mainly on Hyperliquid, such as HYPE, exclude the external venues until outside liquidity is deep enough to be worth including.

Every validator submits its number. The price the clearinghouse uses is the weighted median of those submissions, weighted by each validator’s stake.

That is two medians stacked on top of each other. To move the oracle you would have to move a weighted median of eight spot books, and then move enough stake-weighted validators to shift the median of their submissions. This is the structural reason a single venue printing a bad tick does not reach your position.

A median, not an average

An average moves a little whenever any input moves. A median only moves when the middle input moves. That is the whole design: one venue can print anything it likes and the median will not follow it.

How the mark price is built

Mark price is the median of three prices:

  1. Oracle price plus a 150 second exponential moving average of the difference between Hyperliquid’s mid price and the oracle price. This is the oracle, corrected for how far this exchange has been trading from it lately.
  2. The median of best bid, best ask and last trade on Hyperliquid. This is the local book, in one number.
  3. The median of Binance, OKX, Bybit, Gate IO and MEXC perpetual mid prices, with weights 3, 2, 2, 1 and 1. Note these are perp prices, not the spot prices used by the oracle.

If exactly two of those three inputs exist, a fourth is added to the median: the 30 second exponential moving average of the median of best bid, best ask and last trade.

Mark price recomputes whenever validators publish new oracle prices, so it moves in roughly 3 second steps.

Why your liquidation did not match the chart

Three properties of the design explain almost every “but the price never got there” complaint.

The chart is one of three inputs, not the decision. A wick on Hyperliquid’s own book moves input 2. If inputs 1 and 3 have not moved with it, the median does not follow the wick. Your position survives a spike that the chart clearly shows.

The same logic runs in reverse, and this is the half people do not expect. If the other venues move and Hyperliquid’s book lags, the median moves without the chart moving. You can be liquidated on a candle that never printed here.

It updates in steps, not continuously. Mark price refreshes when the oracle does, about every 3 seconds. Between refreshes it does not exist at intermediate values, so there is no guarantee that any particular price was ever “reached” in the sense a chart implies.

The drift term has memory. Input 1 carries a 150 second EMA of the gap between this book and the oracle. If Hyperliquid has been trading persistently above the oracle, that premium is still being carried for a couple of minutes after it closes.

What to do with this

Monitor your positions against mark price, not the chart price. The exchange publishes it, and it is the only number that decides whether your position is closed. A stop loss is triggered by mark price too.

What this protects you from

The design is a deliberate trade. It costs you the intuition that the chart equals your risk, and it buys resistance to the attack that has drained more than one perpetuals venue: push a thin book, print a price, harvest the liquidations.

To do that here you would need to move a weighted median of eight spot venues for the oracle, a weighted median of five perp venues for input 3, and Hyperliquid’s own book for input 2, all at once and for long enough to survive a median. That is not impossible, but it is a completely different order of cost than pushing one order book.

Where it still bites

Robust does not mean painless, and two cases are worth planning around.

Thin listings. The protection scales with how many venues list the asset. A perpetual whose underlying trades on two venues rather than eight has a much shorter path from one book to your liquidation price. Size accordingly.

Fast, correlated moves. When every venue moves together, the median moves with them immediately. There is no smoothing left, because smoothing only exists where inputs disagree. The design protects you from one venue being wrong, not from the market being right.

Neither of these is a flaw in the mechanism. They are the boundary of what a median can do, and knowing where that boundary sits is the difference between sizing a position and hoping.

Frequently asked questions

Is mark price the same as the price on the chart?

No. The chart shows the last traded price on Hyperliquid's own book. Mark price is a median of three separate inputs, only one of which is that book, so the two routinely differ by a few basis points and can differ far more in a fast move.

What is the Hyperliquid oracle?

It is a price each validator computes as a weighted median of spot prices from Binance, OKX, Bybit, Kraken, Kucoin, Gate IO, MEXC and Hyperliquid. The clearinghouse then takes the stake-weighted median of every validator's submission.

How often do these prices update?

Validators publish oracle prices every 3 seconds, and mark price recomputes whenever they do. So both move in roughly 3 second steps rather than continuously.

Which price am I charged funding on?

Oracle price. The funding payment is position size multiplied by the oracle price multiplied by the funding rate, so the notional used for funding is not the mark price.

Can one exchange move my liquidation price?

Not easily, which is the point of a median. Moving a median of eight weighted spot venues, and then a stake-weighted median across validators, takes far more than pushing one book.

Why does BTC's oracle ignore Hyperliquid's own spot market?

Because BTC's real spot liquidity is elsewhere. Assets whose primary spot liquidity sits outside Hyperliquid exclude Hyperliquid spot from the oracle, and assets like HYPE that trade mainly on Hyperliquid exclude the external venues until outside liquidity is deep enough.

Sources

We link the primary source for every number on this page. If a figure here disagrees with the Hyperliquid documentation, the documentation is right and we want to know.

Keep going