Esc

    Get started

    Architecture

    How a price moves from the venues through a node to the SDK or the web proxy, what each part does, and why the nodes do not talk to each other.

    The oracle has three parts: independent nodes, a registry on the Internet Computer, and software on the consumer side. Each node reads the venues, computes prices, signs them and serves them. The consumer verifies the signed updates of several nodes and takes the median.

    The data path

    text
      Venues: Binance, Bybit, OKX, Coinbase, Kraken, Deribit, Hyperliquid, Bitfinex, KuCoin, MEXC, Bitstamp, Bitget, Gate, Lighter, dYdX, Toobit
         │  WebSocket market data; Toobit over REST, once a second
         ▼
      ┌─ Node (one of N) ─────────────────────────────────────────────────┐
      │                                                                   │
      │  ingest ─────▶ aggregate ─────▶ sign ─────▶ serve                 │
      │  decode,       price, conf,     node key,   /v2/ws: listed        │
      │  reconnect     status           secp256k1   clients, encrypted    │
      │                                                                   │
      └────────────────────────────────────────────┬──────────────────────┘
                                                   │ signed, sealed frames
                           ┌───────────────────────┴───────────┐
                           ▼                                   ▼
                Rust SDK (oracle-client)                Web proxy (oracle-proxy)
                verify each frame,                      the SDK as one listed client,
                median over the quorum                  plain JSON on /v1/ws
                           │                                   │
                           ▼                                   ▼
                          App                        TLS reverse proxy ──▶ browser
    
      Registry canister on the Internet Computer: the signed lists of nodes and clients.
      Each node, the SDK and the proxy fetch it and check its IC certificate.

    A price takes six steps:

    1. The node receives a venue message, decodes it, and stamps it with the time of receipt on its own clock.
    2. The node turns the newest quotes of all venues of a feed into one price, one conf and a status.
    3. The node signs the update with its secp256k1 key.
    4. The node seals the signed frame once with the current broadcast key, and sends the same bytes to every subscriber.
    5. The SDK opens the frame, verifies the signature against the registry, checks the sequence and the age, and takes the median across the nodes.
    6. The app reads the price, its conf and its status.

    The web proxy is one more consumer. It runs the SDK as one listed client and serves the result to browsers as JSON. A reverse proxy in front of it terminates TLS.

    The parts

    The node

    One operator runs one node: the oracle-node binary, one config file, and one secret seed. The config file lists the feeds, and the node derives its venue subscriptions from them. The seed is encrypted at rest. Two keys come from it: the secp256k1 key, whose address is the node's id, and an ed25519 key for venues that verify ed25519.

    The node serves prices, venue reports and books on /v2/ws to listed clients only, encrypted. /v2/feeds, /v2/registry and /v2/health are open and carry no price. The fanout keeps one slot for each feed and subscriber, and a newer update replaces an older one that waits. A consumer therefore sees state, not every transition.

    A node refuses to start when the registry does not list its address.

    The registry canister

    The registry is the trust root for membership. It is a canister on the Internet Computer that lists which addresses are nodes and clients now, and which addresses were nodes before.

    • The canister signs each version with a threshold ECDSA key on secp256k1. No governance private key exists anywhere.
    • The consumer pins the address of that key, fetches /registry.json over HTTPS, checks the IC certificate, and verifies the signature.
    • Governance is the controller set of the canister, and the only caller of every update method except push. Each node calls push as the anonymous identity: the signed frames are the credential, and the node holds no IC identity.

    See Registry.

    The Rust SDK

    oracle-client is the consumer side. It connects to every listed node, verifies each update, and resolves one price for each feed.

    • The verifier checks one update: the signature, the registry membership, the sequence number, the age and the timestamps.
    • The resolver takes the median of the nodes, with a conf that is never narrower than half the spread between the nodes.
    • The SDK refuses a quorum below three nodes unless you accept the risk explicitly.

    See Rust SDK.

    The web proxy

    oracle-proxy serves verified data to web clients. A browser cannot keep a client API key, so it cannot use /v2/ws. The proxy is one listed client: it runs the SDK with the signature checks and the quorum, and serves JSON on one plain WebSocket, /v1/ws. The node signatures stop at the proxy, so a browser trusts the operator of the proxy. See Web proxy API.

    Why nodes do not talk to each other

    Each node is an independent attestor. There is no consensus, no leader and no distributed key generation. This is the most important design decision. The table compares it with a leader-based consensus design:

    Property Independent signers Leader or OCR consensus
    A node fails The consumer sees N−1 signers and continues. The round stalls until a view change.
    A node is added Governance approves the entry in the registry canister. A reconfiguration protocol runs.
    The network between nodes partitions No effect. The nodes never communicate. Loss of liveness.
    Trust The consumer chooses its own quorum. The consumer must trust the aggregate that the network computed.
    Code to write Almost no distributed-systems code. A large amount, with bugs.

    The cost is small. The consumer verifies M signatures and takes a median. The bandwidth is M times redundant. For an off-chain feed this is the correct trade.