How it works
Key properties
- Assets never bridge. The bond stays on Ethereum. The USDC stays on Avalanche. No wrapping, no synthetic representations.
- Both legs settle or neither does. The atomicity gate on the coordinator chain verifies all locks before dispatching any releases.
- Independent deposits. Neither party locks first. Both deposit independently to their local escrow. This eliminates the “who goes first” problem.
- Permissionless timeout. If either deposit fails or the deadline passes, anyone can trigger timeout. Deposits are returned on all chains.
Settlement flow
1. Bilateral instruction submission
Both parties submit instructions as normal. Thechain_id field in each party’s details and legs indicates which chain their assets are on:
2. Settlement created across chains
After matching, the settlement is registered on the SettlementCoordinator (coordinator chain). The escrow contracts on each chain are informed of the expected deposits.3. Parties deposit to their local escrow
Each party deposits to the escrow contract on their own chain. The seller deposits bond tokens to the Ethereum escrow. The buyer deposits USDC to the Avalanche escrow.4. LayerZero messaging
Each escrow contract sends a lock confirmation to the SettlementCoordinator via LayerZero. The coordinator collects confirmations from all chains.5. Atomicity gate
The coordinator checksallLegsDeposited(). This only returns true when ALL legs on ALL chains have confirmed deposits. No releases happen until this condition is met.
6. Release
The coordinator dispatches release instructions to all escrow contracts via LayerZero. Each escrow releases deposits to the intended recipients:- Bond tokens on Ethereum go to the buyer’s Ethereum address
- USDC on Avalanche goes to the seller’s Avalanche address
Timeout and rollback
If any deposit is missing when the deadline arrives: Timeout is permissionless. Any party can trigger it after the deadline, ensuring funds are never locked indefinitely regardless of KeyStone’s availability.Supported chains
Cross-chain settlement is a Phase 2 feature. Phase 1 operates on a single chain (Sepolia testnet, then L2 mainnet). The architecture supports any EVM-compatible chain with LayerZero integration. The coordinator chain can be any EVM chain - it is not tied to a specific blockchain.Cross-chain settlement requires LayerZero messaging, which adds approximately 100,000 gas per message (4 messages for a 2-chain settlement: 2 lock confirmations + 2 release dispatches).