Market-data normalization
Tayho workers consume a small, stable fact protocol instead of coupling transaction-signing code to Hyperliquid’s evolving exchange API. Two statelesstayho-market-data replicas translate the
testnet-only outcomeMeta catalog and l2Book snapshots into authenticated WAD observations.
100_000_000 + 10 * outcome + side, with sides restricted to zero and one. The
adapter queries #<10 * outcome + side>, validates a fresh monotonic two-sided book, and derives:
- impact: the midpoint of bid and ask VWAPs that each fill
MARKET_DATA_IMPACT_NOTIONAL_WAD; - index: the BBO midpoint;
- depth: the smaller USDC notional available on either side inside
MARKET_DATA_DEPTH_BAND_BPS; - resolution: pending unless an upstream supplies an explicit final side.
Service contract
The private Elysia service exposes four independently authenticated, read-only facts:/v1/funding/impact, /v1/funding/index, /v1/oracle/depth, and
/v1/oracle/resolution. Inputs are an asset and oracle key. Outputs use bounded decimal strings and
carry freshness/source metadata. Invalid identity, one-sided or crossed books, stale samples,
insufficient notional, and ambiguous resolution fail closed.
The service is stateless and signerless. It receives no PostgreSQL, Redis, RPC, contract address,
coordination token, or public domain. /livez proves process liveness; /readyz qualifies the
configured upstream and normalization path without exposing resolved credentials. Loss pauses new
oracle/attester observations but cannot mutate prior on-chain state.
Sources:
apps/market-data/src,
schemas, and
qualification tests.