Architecture

| Layer | Role |
|---|---|
| Contracts | Intent escrow, SBBO admission, certificate verification, fee splitting, settlement enforcement. The only authoritative state. |
| Coordinator | Off-chain quote collection, solver auction, solution validation, certificate signing. No on-chain authority. |
| Indexer | Checkpoint subscriber that decodes protocol events into Postgres + Redis. Feeds the coordinator and dashboards. |
| Solvers | Compete to fill intents. Route through CoW matching, internal inventory, or external venues (Cetus, DeepBook). |
| SDK | Generated TypeScript bindings (@reiy-finance/contracts-sdk) for building transactions against the contracts. |
Solution
Reiy follows the batch-auction pattern established by earlier CoW protocols - intents, solver competition, CoW matching - but introduces structural changes that remove trusted operators and eliminate griefing vectors:- Benchmarks are executable bids, not passive reference quotes: always settlement-ready, no separate liveness path.
- Bonds scale with committed scores (
bond >= score x grief_factor), not fixed. Griefing costs more than it extracts: no ban lists or reputation needed. - Every phase is permissionless: epoch advancement, bid submission, allocation selection, even the fallback path. No trusted operator required beyond Sui validators.
Intents (protected trade instructions)
An intent is an escrowed on-chain asset plus a constraint (minimum payout, deadline, slippage). Unlike signed orders that must be executed as-is, intents give solvers flexibility with partial fills, routing across venues, or CoW matching, as long as the user’s minimum is met. This flexibility is what makes batch auctions efficient.Batch auctions
Multiple intents are grouped into timed auction cycles (epochs). Solvers compete during each epoch by submitting bids: executable settlement plans that commit to specific scores and bonds. Batching enables:- CoW matching: Alice sells A for B, Bob sells B for A. They cross inside the batch with zero slippage.
- Competitive pricing: Solvers bid to offer the best surplus; users benefit from the competition.
- Uniform pricing: All intents in the same pair receive equal proportional improvement above their floor.
Off-chain coordination, on-chain settlement
The protocol splits work: the coordinator runs the auction off-chain (low latency, low cost), while settlement is enforced on-chain by Move contracts. The coordinator has no authority over user funds. It collects bids, ranks them, and signs certificates, but final settlement is always verified by the contracts.PairBenchmarks (executable benchmarks)
Benchmarks are derived from competing pair-scoped bids submitted by solvers, not from standalone reference quotes. Each PairBenchmark is a set of executable bids: always settlement-ready, always fallback-selectable. This removes the need for a separate reference quote liveness path.Score-scaled bonds
The required bond scales with the solver’s committed score:bond >= score × grief_factor. High-score bids require proportionally more collateral. This makes grief attacks economically self-limiting without needing cooldown timers, ban lists, or reputation systems.
Uniform surplus ratio (EPSR)
All intents in the same directed pair receive equal proportional improvement above their floor, checked within a configurable tolerance (1–5 bps). This guarantees fairness within each pair: no solver can give one user 10% improvement and another 0.1% in the same batch.Protocol guarantees
| Guarantee | How it’s enforced |
|---|---|
| Safety | Funds stay in contract escrow unless cancelled or settled. Settlement is verified by Move; the coordinator cannot override. |
| Fairness | SBBO prevents bad minimums. Benchmark protection ensures no intent receives less than the best per-pair reference. EPSR ensures equal treatment within each pair. |
| Liveness | Epoch advancement is permissionless: anyone can call advance_epoch(). Fallback paths handle solver failure and missing allocations. |
| Economic security | Score-scaled bonds deter griefing. Slashing recovers bonded value on failed settlement. |
Trust model
| Component | Trusted? | Why |
|---|---|---|
| Move contracts | Trusted | They enforce all protocol rules. No privileged escalation path. |
| Coordinator | Not trusted | Can refuse to sign certificates (liveness grief), but cannot steal funds or force invalid settlements. |
| Solvers | Not trusted | Bonded and scored. Each solver is economically accountable. |
| Indexer | Not trusted | Read-only; stale or incorrect data can be detected by cross-checking against the chain. |
| Sui validators | Trusted | Standard Sui consensus and execution integrity. |
Related Topics
How Reiy Works
End-to-end flow from intent to settlement.
Glossary
Quick reference for all terms and parameters.