oracle-stack documentation

A scriptable price oracle,
from CEX & chain to EVM.

oracle-stack ingests prices from exchanges and on-chain contracts, shapes confidence and price bands with hot-reloadable scripts, and pushes them compactly to EVM oracle contracts. A console reads the same bus and controls the pushers.

feed sources → Redis bus calc hot-reloaded scripts pushers compressed · pyth-lazer console live view + control

The pipeline

Every component talks through one Redis bus — the seam that decouples ingestion from publication. Sources never touch a chain; pushers never touch an exchange.

sources

CEX · Lazer · chain

WS / RPC ticks

feed

scale · σ · scripts

confidence + bands

Redis bus

price hashes

latest-wins, TTL'd

pushers

encode · sign

slot words / blob

EVM chain

oracle contract

on-chain price

The console (dashboard) reads the bus for the live view and drives the pushers over their config + pm2.

Two implementations, one wire format

The stack ships as a canonical Rust workspace and a wire-compatible TypeScript twin. They read and write the exact same Redis keys and produce byte-identical on-chain calldata; a golden-vector suite pins the shared formats. Pick whichever runtime fits the deployment — they interoperate on the same bus.

oracle-stack (Rust)

One Cargo workspace: feed, dashboard, the two pushers, and shared contracts / pusher-core crates. Sandboxed Rhai calc engine.

oracle-stack-ts (twin)

npm workspace, ethers v6, a QuickJS calc sandbox. Verified live against the Rust bus; calc scripts are JavaScript instead of Rhai.

Quickstart

The feed needs a Redis instance and one config file. From oracle-stack/feed:

# one TOML per deployment; see config/feeds/*.toml
cargo run -p price_feed -- config/feeds/local.toml

# validate a config without connecting to anything
cargo run -p price_feed -- config/feeds/local.toml --check-config

Bring up the console against the same Redis, then a pusher per chain. See Architecture for the component map and the bus key schema, and Pushers for the on-chain onboarding flow.

This site documents the system's shape and wire formats. Per-crate READMEs in the repos carry build details and flags; dashboard/API.md is the console's HTTP contract.