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:
| Account | Role | Purpose |
|---|---|---|
| Admin | Readonly signer | Authorizes oracle updates. The program compares this signer to the hardcoded admin address. |
| Oracle | Writable | Stores 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 sizeThe generic SDK shape is:
export interface Oracle<T> {
sequence: bigint;
payload: T;
}Update Flow
- The admin signs a transaction containing a Doppler update instruction.
- The instruction data contains the new sequence and serialized payload.
- The program verifies the admin signer.
- The program rejects stale sequence values.
- The program writes the new sequence and payload into the oracle account.