Oracle price

The oracle price is the spot price Hyperliquid's validators publish for each perpetual, and what funding is computed on.

Definition

The validators are responsible for publishing a spot oracle price for each perpetual asset every 3 seconds. Each one computes the weighted median of the spot mid prices of Binance, OKX, Bybit, Kraken, Kucoin, Gate IO, MEXC and Hyperliquid, with weights 3, 2, 2, 1, 1, 1, 1 and 1. The price the clearinghouse then uses is the weighted median of each validator's submission, weighted by their stake, so no single validator and no single exchange decides it.

Two special cases follow from where an asset actually trades. A perpetual on an asset whose primary spot liquidity is on Hyperliquid, such as HYPE, does not include external sources in its oracle until there is enough liquidity. A perpetual on an asset whose primary liquidity is elsewhere, such as BTC, does not include Hyperliquid's own spot price. Hyperliquid's crypto perpetuals are USDT-denominated with USDC as collateral, except PURR-USD and HYPE-USD, where the most liquid source is Hyperliquid spot and the oracle is denominated in USDC.

What it is for is precise. Funding rates are computed on it, and the funding payment converts a position's size to a notional at the spot oracle price rather than at the mark price. It is also one of the three inputs of the mark price, which is what margin and liquidations are measured on. The documentation calls it robust because it does not depend on Hyperliquid's own market data at all, which is exactly what makes it hard to move by trading on Hyperliquid.

Formula

Each validator publishes the weighted median of the Binance, OKX, Bybit, Kraken, Kucoin, Gate IO, MEXC and Hyperliquid spot mid prices, with weights 3, 2, 2, 1, 1, 1, 1 and 1, and the clearinghouse uses the stake-weighted median of the validators' prices. The funding payment reads it as position_size * oracle_price * funding_rate.

Example

An example, in round figures. A long of 1 BTC is held through an hour whose funding rate is 0.001%. If the spot oracle price at the end of the interval is $100,000, the payment is $100,000 times 0.00001, so $1, and it is $1 even if the mark price reads $100,200 at that moment and the position's profit is measured there. The two prices answer two different questions.