2.5 Execution and proofs
The matcher
Each site executes the canonical order with the same matcher. The matcher is a fixed, bounded state machine: the order book, balances, positions, margin and funding of a perpetual exchange. It uses integers only, and its only input is the canonical order. The same input always gives the same output at each site. The margin check is part of the match. The question "can this account pay for this order?" is a few memory reads, not a request to another system.
The matcher runs in software first, with a time of microseconds for each order. For the highest rates, it runs in a second FPGA at each site.
The state root
After each batch, the matcher calculates a state root: one hash of all balances, positions, orders and results. The card puts the state root into the digest. The other sites compare it when they sign.
The certificate
A certificate proves that a batch is final. It contains:
- The digest and the signatures of the quorum.
- The context: the chain, the keys and the rules.
- A commitment to the stamps that set the official times.
Proofs for one value
A Merkle proof is a short chain of hashes from one value to the state root. With it, you can prove one balance, position, order or receipt without the full state. The official client checks these proofs on your computer. A balance that it shows as "proof-verified" agrees with a final certificate.
Readers and replicas
The card streams each final batch to the read server of its site, one way. The full stream is the chain: the orders, the signed stamps, the fills and the certificates. Any person can download it from any site, verify each signature, replay each batch and serve it again. Readers never slow the cards: the cards do not know them.
Snapshots and the bridge
Each 100 ms, the sites sign one root of the full state. A contract on another chain accepts a root with five of six keys, and moves one stablecoin in and out. The same snapshots are the restart points of the sites.
Agent keys
Each bot or AI agent can have its own key with its own nonce sequence. You can revoke one key and keep the others (see 4.3).