Oryn splits responsibilities across services. The contracts enforce settlement. The orderbook coordinates intent and state. Watchers keep the database aligned with on-chain events. Solvers provide liquidity.
Components
| Component | Owns | Does not own |
|---|
| App | User flow, wallet calls, quote selection | Settlement guarantees |
| Quote service | Prices, route selection, quote expiry | Escrow state |
| Orderbook | Order records, deterministic vault addresses, status reads | Custody of funds |
| Contracts | Claim, cancel, bridge dispatch rules | Quotes or UI state |
| Relayer | Gas-assisted destination claim submission | Quote validation or custody |
| Watcher | On-chain event ingestion | User intent creation |
| Solver | Destination liquidity and source-side claim | User wallet control |
The orderbook is coordination infrastructure. The contracts are the settlement boundary. When debugging, always separate “what the API says” from “what the chain has finalized.”
Data flow
- Quote service returns a route and exact amounts.
- Orderbook consumes the quote and records the two escrow intents.
- App and solver initiate the source and destination escrows.
- Watchers update order state from contract events.
- Relayer submits the destination claim when the user reveals the secret.
- Solver claims the source escrow using the revealed secret.
Why this split exists
| Requirement | Design response |
|---|
| Users should not trust the orderbook with funds | Funds live in escrow contracts. |
| Solvers need deterministic addresses | Factories compute vaults from immutable parameters. |
| UIs need readable state | Watchers turn chain events into orderbook fields. |
| Claims should work without user gas on destination | Relayer validates and submits claim transactions. |
| Avalanche L1 settlement needs bridge routing | Hop vaults call ICMBridgeFactory after secret verification. |