Zero to HYPE

Lab · T4 Trading mechanics

Funding and mark price

Pick a perp and watch its prices update every 5 seconds from mainnet. The lab recomputes the premium from the impact prices and shows where the hour's funding sits on the published formula.

Perp

Loading live data from api.hyperliquid.xyz…

Prices now

Oracle–
Mark–
Mid–
Impact bid–
Impact ask–

The oracle drives funding; the mark drives margin, liquidations and TP/SL. Impact prices are the average fill prices for a set notional size on each side of the book.

Premium, worked out

premium = (max(impact bid − oracle, 0) − max(oracle − impact ask, 0)) / oracle
Premium, computed here–
Premium, from the API–
Predicted funding, per hour–
The same, per year–

Where funding sits on the formula

Hourly funding against the hour's average premium. Across the flat middle, the clamp cancels the premium and funding equals the interest rate, 0.00125% an hour. The dot is today's instantaneous premium; the dashed line is the API's predicted rate, which uses the average over the hour so far.

–

What a position pays

–

Payment = size × oracle price × hourly rate. It uses the oracle price, not the mark.