Getting started
Architecture & the bus
Components are small and single-purpose; they coordinate only through well-known Redis keys. Learn the key schema and you understand the whole system.
Components
feed price_feed
Runs each configured source on its own supervised thread, computes a rolling volatility window, evaluates calc scripts, and writes price hashes + history to the bus.
dashboard (console)
Reads the bus for a live view; edits & backtests calc scripts; builds pusher slot configs; starts/stops pushers over pm2; watches balances and fires alerts.
compressed-pusher
Encodes bus prices into packed 32-byte slot words and pushes them to the CompressedOracle — broadcast or MEV builder-lane.
pyth-lazer-pusher
Forwards a signed Pyth Lazer EVM blob to the Pyth oracle. A pool of signers with the anti-drift nonce machine.
Shared libraries keep the two runtimes honest: the Rust contracts crate defines
every Redis key format and JSON shape (golden-tested, mirrored in the TS @oracle-stack/core),
and pusher-core holds key derivation, the nonce policy and ABI encoders.
The Redis bus
All keys share a prefix — oracle:updates by default. Raw price hashes carry a
TTL, so a crashed feed's prices simply expire and pushers stop reading them (never a stale push).
| Key | Written by | What it holds |
|---|---|---|
{prefix}:{source}:{symbol} | feed | Latest price hash: price, exponent, confidence, spread, timestamp, plus packed / packed:{chain} and guard_min:{chain}/guard_max:{chain}. |
{prefix}:hist:{source}:{symbol} | feed | Capped history stream (ts · price · spread) — the σ window and the backtest replay. |
{prefix}:sources | feed | Active source registry: JSON [{name, kind}]. The console's dynamic source list. |
{prefix}:calc:script[:src:sym:chain] | console | Pricing script — global or per source:symbol:chain selector. |
{prefix}:calc:guard[:src:sym:chain] | console | Guard-band script family (same selector rules). |
{prefix}:calc:lib · :default · :chains | feed/console | Shared script library, repo baseline for reset, and the per-chain conf lanes. |
{prefix}:calc:status:{source} | feed | Per-source compile/eval status for the editor. |
{prefix}:lazer:blob:{id} | feed | Signed Pyth Lazer EVM blob — the pyth pusher's input. |
{prefix}:control:sub:{id} · :producer | console/feed | Consumer-driven Lazer subscription requests + the feed's heartbeat. |
{prefix}:cex:feeds:{source} | console | Dashboard-managed CEX feed sets (live-editable). |
{prefix}:sanity:quarantine:{src}:{base} | feed | A dropped outlier record (see the sanity guard below). |
Cross-feed sanity guard
Before publishing, the feed cross-checks a price against the other sources for the same asset. A value that disagrees with the median beyond a configured band is not published — its key expires and pushers skip it — and a quarantine record is left for visibility. A fail-safe keeps at least a two-source agreement from being silently dropped.
Config & deployment
Configs live under <stack>/config/ (feeds/, pushers/).
Each binary takes one TOML and supports --check-config. On the deploy host the
processes run under pm2 (evm-price-feed, evm-dashboard, the pushers);
the console can start/stop them.