$NTDO | $PMRT markets live on beta now

Polymarket Oracle

Data sources from Polymarket

Polymarket exposes multiple data feeds that can be used to compute p_ref:

1) WebSocket (low latency)

Use for real-time orderbook updates, price changes, and last trade prices.

Example endpoint (market channel):

wss://ws-subscriptions-clob.polymarket.com/ws/market

You subscribe with the outcome token ID(s) you care about (e.g., YES token ID).

2) Gamma API (metadata + indexing)

Use for:

  • market discovery (active markets)

  • mapping from condition/event to outcome tokens

  • reading current outcome prices in a simple format

3) Onchain data (resolution + settlement events)

For resolution-aware operations, monitor:

  • resolution events

  • final outcome publication

  • redemption conditions


Reference signal definition

Trove defines a reference signal per market:

  • p_ref = the probability-like value used as oracle/index input

Common choices:

  • Midpoint price of YES token (best bid/ask midpoint)

  • A short EMA of midpoint (to reduce microstructure noise)

  • A robust median across multiple snapshots (to reduce spikes)

For binary markets, token prices are commonly interpreted within [0, 1] as probability-like values. Trove normalizes the signal to [0, 1] for “probability perps”.


Operational requirements for HIP-3

HIP-3 requires continuous oracle updates.

Trove runs an oracle pusher service that:

  1. Fetches Polymarket data (WebSocket preferred, REST fallback)

  2. Computes p_ref (and optionally a smoothed external reference)

  3. Submits HIP-3 setOracle updates to Hyperliquid on a fixed cadence

  4. Maintains redundancy (multiple feeds / regions / automated failover)


Security and robustness checklist

  • Use multi-region WebSocket + REST fallback

  • Track sequence numbers and rebuild local orderbook if out-of-sync

  • Enforce strict [0, 1] bounds post-processing

  • Add circuit breakers (halt trading) on:

    • feed outage beyond a threshold

    • abnormal deviations / corrupted data

  • Log every update and keep an audit trail for post-incident review

Last updated