Skip to content

Spec 09 Chain

Amp edited this page Nov 18, 2026 · 1 revision

Spec 09: Chain Mode

Source: spec/09-chain.md at commit a9f0d61. The file is the source of truth; this page is a summary.

Status: draft 0.2 (2026-11-13), normative for CHAIN mode. 01 §14 wins over this chapter.

What the chapter decides

In CHAIN mode the exchange runs as a blockchain. It uses the same order stream, consensus and replay engine as Spec 05 and Spec 07. This chapter adds what a public chain needs on top of them: a set of five validator operators with keys and bonds, a rotating sequencer role, a low-rate transaction path for everything that is not an order, authentication that works at 1B messages per second, custody through an Ethereum L1 bridge, forced inclusion, slashing, state commitments, light clients, economics, upgrades and a threat model. The sequencer cannot be stopped from front-running at 1 µs. The chapter limits it instead, with rotation, a bond and published fill-quality statistics.

Key decisions

  • Five operators, fifteen nodes. Each operator runs one node in each home. An epoch's committee is the 5 nodes in that epoch's home: N_CHAIN = 5, Q_CHAIN = 4, F = 1, split 3 Rust and 2 Vx (§1, §1.2, §2.1).
  • One sequencer operator per epoch, rotating by e mod 5. Every operator sequences every home once in 15 epochs, or 5 days (§1, §3.1).
  • Key split. The sequencing operator holds K_seq and never K_com. The other 4 hold K_com through a per-epoch committee key. A forged packet needs 2 byzantine operators (§1, §2.4, INV-CHN-KEYSPLIT §17.4).
  • The sequencing operator is never the Simplex leader. Leaders rotate over the other 4, so the leader can always compute the exclusion list (§1, §4.3).
  • Transaction path. Items that are not orders go through the Simplex leader. They take effect at a fixed boundary, FIN_GATE_BLOCKS + 1 (9) book blocks after the last book block in the chain block. The sequencer never runs more than 8 closed blocks ahead of finality, and it halts the book rather than issue a fill that cannot be final within 10 ms (§1, §4.4–§4.6, INV-CHN-TXGATE).
  • A bad tag_com means a bust, not an erasure. Matching replays as it ran. At the boundary, lane ops cancel the session's orders, reverse each affected fill as one net op per (account, book), refund both fees, and pay counterparties from the session's bond. Second-order effects stand (§5.9).
  • Authentication without a signature on every packet. SipHash tag_seq for the sequencer and TESLA-disclosed K_com tags for the committee (§5.1–§5.6). Exclusion lists are a pure function of chain state (§5.7, INV-CHN-EXCL).
  • Custody is an Ethereum L1 bridge contract. It checks 4-of-5 secp256k1 signatures, credits deposits only after L1 finality, releases withdrawals after a 1 h challenge period, and opens an escape hatch if no post is accepted for 14 days (§6.1–§6.6).
  • Bridge signer table owner. The table maps a rotation number to a SignerSet. It is a key table owned by vyrn-epoch (08 §9.5). A set that governance approves activates at the next epoch boundary, every activated set stays readable, and vyrn-chain reads the table through Epochs::bridge_signers (§6.7).
  • Forced inclusion. Clients can send signed packets to the committee members. Under an honest sequencer such a packet is final ≤ 10 ms after it is sent. A censoring sequencer is replaced (§7.1–§7.4).
  • Slashing is automatic for faults that signatures prove (equivocation, double votes, fence violations, double commit votes, bridge equivocation). A withheld handoff is proved by quorum attestation and slashed less (§8).
  • Commitments. A BLAKE3 log hash chain per chain block, a balance sparse Merkle tree and an LtHash of resting orders every 1 s, and a StateCommit signed by 4 of 5 (§9).
  • Front-running is limited by rotation, the sequencer bond and per-sequencer fill-quality statistics computed from certified data (§13).

Key numbers

All §17.1 values are "budgets and governance parameters unless marked otherwise". None of them is a measurement.

Item Value § Kind
Finality of every accepted order FINALITY_MAX_MS = 10 ms §1.2, 01 §14.0 hard maximum
FIN_GATE_BLOCKS (D) 8 closed blocks §17.1, 01 §14.9 fixed by 01
Finality from block start, one fault 8.11 ms (no fault 5.31 ms) §4.8 budget
Order final after it is sent ≤ 8.21 ms §4.8 budget
Bust records leave after the bad packet is sent ≤ 9.16 ms §5.9 budget (bound)
Forced packet, honest sequencer / censoring sequencer ≤ 9.75 ms / ≈ 41 ms §7.4 budget
CHN_OPERATOR_BOND / CHN_SEQ_BOND 20,000,000 / 10,000,000 USDC §17.1 budget/governance
CHN_BUST_COMP_BPS / CHN_DEBT_GRACE_S 10 / 3,600 §17.1 budget/governance
CHN_BOND_PER_MSGRATE 0.01 USDC §5.9, §17.1 budget/governance
CHN_CHALLENGE_S / CHN_ESCAPE_S 3,600 / 1,209,600 §17.1 budget/governance
CHN_ITEM_OPS_PER_BLOCK 16 §4.6, §17.1 budget/governance
ecrecover cost 3,000 gas per signature §6.1 vendor
One L1 slot 12 s §6.4 vendor

Section map

    1. Scope and the chain on one page
    1. Validator set
    1. The sequencer role
    1. State model
    1. Authentication at 1B messages per second
    1. Custody and the bridge
    1. Forced inclusion
    1. Slashing and evidence
    1. State commitments
    1. Light clients
    1. Data availability and sync
    1. Economics
    1. Front-running by the sequencer
    1. Upgrades
    1. Threat model
    1. Interfaces to other chapters
    1. Local definitions
    1. Requests to 01
    1. Open questions

Where 01 §14 overrides or refines this chapter

  • §14.4: the sequencer box never votes. The sequencing operator votes from its validator box (reflected in INV-CHN-SPLIT).
  • §14.9: FIN_GATE_BLOCKS = 8 in both modes. A forced packet under an honest sequencer is final ≤ 10 ms. §14.18 O5 keeps the closed-block count (limit 9.00 ms, margin 0.89 ms) open until B-CHN-3. 09's Request 11 (FINALITY_P99_MS) is stale: 01 §14.9 already says FINALITY_MAX_MS.
  • §14.10, §14.11: add the 0x87 Bust record and INV-CHN-KEYSPLIT, one vote per (epoch, view), and keccak256/EIP-712 only for the parts that face L1.
  • §14.16: the data home is never in F1. Each operator's primary data box is in its F2–F5 facility.
  • §14.19 B: a fill is undone only by a 07 §9.6 revert before finality, or by a bust whose verdict is final with it. Settlement never undoes a final fill; a failure to settle is a custody incident under this chapter's rules, not a Bust. In revert case (e) the sequencer operator is slashed. Spec 12 has the full lifecycle.

Implemented by

vyrn-chain, L1 bridge contracts, vyrn-validator (a stub)

Open questions

The chapter lists 11 open questions (§19). See Open Questions.

Clone this wiki locally