Doppler
Concepts

Oracle Model

Understand the admin account, oracle account, sequence number, and payload.

Doppler keeps the on-chain model intentionally small: one hardcoded admin signer updates one oracle account owned by the generated program.

Accounts

Each update instruction uses two accounts:

AccountRolePurpose
AdminReadonly signerAuthorizes oracle updates. The program compares this signer to the hardcoded admin address.
OracleWritableStores the current sequence number and fixed-size payload bytes.

The program enforces two feed-specific constants:

  • the admin address
  • the payload size

This keeps runtime checks simple. The SDKs handle the field-level payload schema, while the program treats the payload as fixed-size bytes.

Account Data

An oracle account stores:

8 bytes   sequence as little-endian u64
N bytes   payload bytes, where N is the generated payload size

The generic SDK shape is:

export interface Oracle<T> {
  sequence: bigint;
  payload: T;
}

Update Flow

  1. The admin signs a transaction containing a Doppler update instruction.
  2. The instruction data contains the new sequence and serialized payload.
  3. The program verifies the admin signer.
  4. The program rejects stale sequence values.
  5. The program writes the new sequence and payload into the oracle account.

On this page