Price
kHYPE in dollars is HYPE's HyperCore mark times Kinetiq's kHYPE rate. Both are read on chain and carried to Elysium by the rollup's inbox.
The formula
kHYPE/USD = markPx(HYPE) x kHYPEToHYPE(1e18)
- markPx comes from HyperEVM's read precompile
0x…0806for perp index 159 (HYPE). It returns the price with 6 minus szDecimals decimals, so 4 for HYPE. - bbo from precompile
0x…080egives the best bid and ask. The spread drives the guard on the next pages. - kHYPEToHYPE is Kinetiq's StakingAccountant on HyperEVM (
0x9209…dc7A).
The ticket
MintSnapshotter.send() reads all four values in one call and passes them, with the HyperEVM block number, to Elysium's inbox (0xce59…2cff) through createRetryableTicket. The ticket executes on Elysium as a call from the snapshotter's L1-to-L2 alias, and PriceBook.land() accepts nothing else. Each ticket carries the HyperEVM block number and block time it read the prices at. A ticket with an older block than the stored one is ignored, and a reading older than 15 minutes is refused, however late the ticket is redeemed. A mark of zero, a crossed book or a Kinetiq rate outside 0.5 to 2 is refused too.
Anyone can send a ticket and pay for it (about 0.0002 HYPE). A new one goes out when the price moves 0.2%, and at least every 5 minutes.
Staleness
fresh() turns false 15 minutes after the HyperEVM block the last reading came from. While stale: minting, new debt, kHYPE withdrawals, liquidations and redemptions wait, because each of them moves value at the price. Repaying, adding kHYPE, closing a trove, claiming a surplus and withdrawing from the stability pool stay open.
The upgrade path
Troves read the price through one interface, IKhypePrice. Elysium's own HyperCore read precompile is not answering today; when it does, a reader that implements the same interface (and checks it agrees with the last ticket) can serve the price with no change to troves.