Skip to main content
The four messages a maker signs, as the executor hashes them. Walkthrough: Stream prices.

Domain

Structs

Field order is encoding order.
Type strings, verbatim from the contracts:
The types object for viem or ethers signTypedData:
The anchor message is signed with primaryType: "AnchorBatch": one signature covers every entry.

Prices and sizes

An anchor entry signed for WETH to USDC at 2000e6 prices USDC to WETH at 1e36 / 2000e6 = 5e26. You do not sign the reverse direction separately. Offset rung price, evaluated onchain at fill time:
Board controls add their discount to the same sum. Age fade adds ceil(sqrt(widenPpmPerSqrtSecond^2 * age)) ppm, with age counted from the anchor’s timestampMs on an offset ladder and from the ladder’s own timestampMs on a price ladder, or from the commit when timestampMs is ahead of it. A controls commit does not restart the age. A rung whose discount reaches 1e6 drops off with every deeper rung. Without its first rung the board stops quoting. Skew applies only to offset ladders; a price ladder ignores anchors.

Validation rules

The stream rejects a message that fails any of these. The executor skips it and emits CommitRejected.

Nonce rules

A message with a key at or below the stored one is skipped onchain and returns STALE_NONCE on the stream, including after expiry. An anchor message returns STALE_NONCE only when every entry in it is stale. Unix milliseconds fit every limit; microseconds and nanoseconds do not fit the depth nonce. Nonces are per board, so one value can be reused across pairs and directions. A depth commit resets the fill count; anchors and controls leave it unchanged. board() reports the pair’s latest timestampMs as anchorNonce.

Wire format

Responses and error codes

An anchor message is accepted or refused as a whole. An entry for an unregistered pair or an expired entry refuses the message.

Limits