How Hyperliquid Calculates Mark Prices
Hyperliquid mark price is a robust risk price built from multiple candidates rather than simply the latest trade, reducing the ability of a brief local price move to force liquidations.
Mark price is the price Hyperliquid uses for key risk calculations such as unrealized PnL, liquidation, and trigger behavior. For standard perps, the protocol constructs multiple candidate prices using oracle and market information and takes a robust median-style result. The goal is to reflect fair market value without letting one abnormal last trade dictate account solvency.
Why last trade is insufficient
A thin or transient trade can print far away from the broader market. If liquidation used that exact print, an attacker or accidental order could trigger forced closes without a genuine move in reference value.
Marking therefore needs both market responsiveness and manipulation resistance.
Candidate prices
Hyperliquid's robust-price documentation describes multiple mark candidates combining oracle price, local market information, and external perp/spot relationships. The final mark uses a median construction so one extreme candidate cannot dominate.
The precise formula belongs in the live protocol docs because it can be adjusted as market design evolves.
Mark versus oracle
Oracle is an input/reference derived from external market data. Mark is the protocol's final risk-oriented price. They can be close without being identical.
Funding calculations also use price relationships, so traders should log both rather than infer one from the other.
Where mark matters
Liquidation thresholds, unrealized PnL, and TP/SL triggers can depend on mark price. A trader watching only last price can therefore be surprised when a risk action triggers while the visible last-trade chart shows a slightly different value.
Research implication
When studying liquidation events, compare mark, oracle, local mid, last trade, and relevant external prices at the same timestamps. Calling the event “wrong” because last price differed from mark misses the architecture the risk engine intentionally uses.