Per chain: four contracts
Deposits into either escrow append to the MMR. Unlocks verify the
aggregated BLS signature against the registry and the deposit proof
against the counterparty chain’s root.

The relayer: coordinator, not authority
The relayer holds no funds and grants no approvals. Its jobs:- mirror each chain’s MMR and serve trade/route/ad state over the API
- collect the two parties’ co-signatures and reject malformed ones early
- run the background pipeline: aggregate → prove → submit
- sponsor gas for key registrations and unlocks
Background workers
Settlement work is queued, idempotent, and crash-safe:- Aggregator — combines the two BLS signatures once both arrive
- Prover — generates the two deposit proofs (seconds each)
- Submitter — broadcasts the unlocks with retry, stuck-transaction handling, and a circuit breaker; confirms against chain state