TRADING
Order & Settlement
Order lifecycle
- Client opens escrow from a shielded note and prepares the order
- ↓ Client produces the eligibility proof and encrypted payload
- ↓ Matcher admission (proof, market, policy, epoch and root checks)
- ↓ Durable admission + prover hand-off
- ↓ Prover opens the private section → OPENED
- ↓ Matching and batch settlement, or a terminal exit
Admission checks
- The eligibility proof verifies against the frozen on-chain verifier.
- The Merkle root is a recent ordinary (ring) root of the pool.
- The market configuration hash and the fee and scale policy versions are registered.
- The epoch is the current epoch and its public key matches the registry.
- The order has not expired.
- The
orderTaghas not been admitted before (duplicate protection).
Snapshot and canonicality
- Capture one block snapshot (number and hash)
- ↓ Perform every admission read at that same block
- ↓ Re-check that the block is still canonical
- ↓ Commit admission + prover hand-off
If the chain reorganizes the snapshot block, an RPC read fails or the database is unavailable, admission fails closed and nothing is committed. A newer block is never mixed into an attempt; a new submission takes a new snapshot.
Settlement and terminal consumption
Matched orders settle in batches verified on-chain. Settlement, cancel-reclaim, expiry-reclaim and emergency exit each consume the escrow’s terminal nullifier, so an escrow ends exactly once.
Retries
Hand-off to the prover is retried on transient failures with the same orderTag; deterministic rejections are final; an admitted order is never admitted twice.