- A source defines one value: what to read (an HTTP API, a contract call or a Solana account), how to decode it, how to compute the value, and how the value becomes 32 bytes. It is identified by its
sourceId, the hash of its canonical form. - A feed is a source at one quorum (
signaturesRequired) under one registry version. Rounds are keyed by feed: at most one round per feed every 100 ms. - A Solana
Feedaccount holds the latest verified value that one submitter wrote for a source at one quorum.
Feed account is created the first time someone submits an attestation for it.
Source
A source is one JSON document with up to four typed inputs (http, evm, starknet, svm), a transform over exact decimals, assertions, a declared 32-byte output and an optional median tolerance policy. The SDK fills in the defaults, so the common case is one call:
The full format, every operator and the limits are on Source format. Reading chain state is covered in Chain data sources, and combining several inputs with rules in Policies.
Source ID
- The canonical form is UTF-8 JSON with object keys sorted, no whitespace, and every number written as a string. It is a strict subset of RFC 8785 (JCS).
- The same source gives the same
sourceIdfor everyone, on every chain. It contains no owner, payer, quorum or chain. - Derive it with the SDK (
source.idHex, orderiveSourceIdHex(doc)) or the MCPderive_source_idtool rather than hashing by hand: one differing byte gives a different source. - The gateway and the nodes recompute it from the source you send, and the SDK rejects a response that names a different
sourceId.
sourceId reaches the chain. Verifiers treat it as an opaque 32-byte value, so a consumer pins the sourceId it expects.
Feeds and rounds
A round is keyed by its feed,(sourceId, signaturesRequired, registryVersion), and by its timestamp, which the gateway takes from its own clock rounded down to a 100 ms tick:
- A feed runs at most one round per tick, so at most 10 rounds per second. Requests for the same feed inside one tick share that round: the nodes run it once and every caller receives the same attestation. Each caller still spends its own quota unit or payment.
- One consumer gets one round per tick per feed. A second request by the same consumer (or x402 payer) for the same source and quorum in the same tick is answered with HTTP
409; retry after one full tick, 100 ms plus a small jitter. The SDK and the MCP round tools do this for you. - There is no idempotency key. A retried request is a new round.
Exact and tolerance mode
By default a round is exact: every signing node must produce the identical 32 bytes. Design exact sources around settled data:- Prefer finalized values over live-drifting ones, and for chain reads a block old enough to be final.
- Avoid per-request timestamps, request IDs and unstable ordering in the response.
- Point the decoder at exactly the field you need, and use
assertto refuse a response that does not look right. - Do not read a Solana account that changes every slot (an AMM pool, an order book) in exact mode. Nodes a slot apart would disagree and the round would fail.
aggregationis part of thesourceId, so a source’s tolerance settings cannot change without changing its identity.- The round needs
signaturesRequiredof at least 3, and the output must beint256. - The optional
maxDeviationAbsadds an absolute band, for values near zero. See Aggregation.
Values
The signedvalue is always 32 bytes, and the source’s output says what they mean:
- Numeric sources declare their scale in
output.decimals;value / 10^decimalsis the number.int256is two’s complement. boolis0x…01or0x…00,bytes32is left-padded bytes,string32is right-padded UTF-8.- For data that is not a number or is longer than 32 bytes (a signature, a document, several readings), use the
keccak256output. The signed value is then the hash, and the round’s response carries the bytes that were hashed (up to 1 KB) asvaluePreimage. The gateway keeps no copy, so keep the response if you need the preimage. A submitter can pass a preimage of up to 256 bytes tosubmit_attestation, which checks it and marks the feedHash; the preimage itself is not stored on chain. - The gateway also returns a human-readable rendering of the value (
valuein the response,result.valuein the SDK). It is not signed. Use the signed 32 bytes,payload.value. - Decode a value only after verifying the attestation or validating the
Feedaccount address.
Solana feed account
The account stores no decimals: the scale comes from the source. Reading a feed is free and needs no subscription. Verify on Solana shows how to read one from TypeScript or from your own program.