Oracle
Protocol

Oracle

Hyperliquid mark prices, signed by a keeper quorum and checked on chain.

v0: keeper quorum

BoxOracle accepts batched price updates signed by keepers. Each entry carries the Hyperliquid mark, the market's σ1h and the Hyperliquid timestamp.

One entry
struct Px {
  uint32 coin;       // Hyperliquid perp index
  uint64 markE8;     // mark price · 1e8
  uint32 sigmaE6;    // σ1h · 1e6
  uint64 hlTimeMs;   // Hyperliquid time, ms
}
push(Px[] batch, uint64 deadline, bytes[] sigs)

Signatures use EIP-712 with domain name “BoxOracle”, version “1”:

digest = hashTypedDataV4(
  keccak256(abi.encode(
    keccak256("Batch(bytes32 pxHash,uint64 deadline)"),
    keccak256(abi.encode(batch)),
    deadline)))

On-chain checks

CheckRule
Quorum2 of 3 keeper signatures
StalenessUpdate no older than 5 s (Turbo actions: 1.5 s)
Jump guardMove of more than 10% in one update needs 3 of 3 signatures
OrderinghlTimeMs must increase for each coin
σ1h range0.1% to 10%

Each accepted batch emits PriceBatch(n, hlTimeMs). Any contract or user can read the latest value with price(coin).

v1: HyperCore precompile

When Elysium exposes a HyperCore price precompile, the oracle reads Hyperliquid marks directly on chain. The engine reads prices through the IPriceSource interface, so the switch replaces the adapter and leaves the engine unchanged.