Overview
The Hub is a smart contract on the Relay Chain that serves as the central ledger for the protocol. It tracks the ownership of all funds deposited into Depository contracts across every supported chain. Implemented as an ERC6909 multi-token contract, the Hub can represent any deposited asset (ETH, USDC, SOL, etc.) from any chain as a token balance. When the Oracle attests that a deposit or fill occurred, the Hub updates balances accordingly.How It Works
The Hub maintains a global balance sheet:- When a user deposits into a Depository, the Oracle attests this, and the Hub mints a corresponding token balance for the user
- When a solver fills an order, the Oracle attests this, and the Hub transfers the balance from the user to the solver
- When a solver withdraws from a Depository, the Oracle attests this, and the Hub burns the corresponding balance
Actions
The Hub processes three types of actions, all triggered by the Oracle:| Action | Trigger | Effect |
|---|---|---|
| MINT | User deposit attested | Creates token balance for the depositor |
| TRANSFER | Solver fill attested | Moves balance from user to solver |
| BURN | Solver withdrawal attested | Removes balance (funds already claimed) |
Real-Time Settlement
A key advantage of the Hub model is real-time, per-order settlement. Every order settles individually as soon as the Oracle attests the fill. There is no batching window or settlement delay. This is possible because settlement happens on the Relay Chain, where gas is extremely cheap (~$0.005 per settlement). In contrast, protocols that settle on origin chains must batch orders to amortize the high gas costs, forcing solvers to wait hours before they can reclaim capital. Benefit for solvers: Immediate balance updates mean solvers can track their available capital in real-time and make withdrawal decisions based on current inventory needs, rather than waiting for batch cycles.Token Representation
The Hub uses the ERC6909 standard (multi-token) to represent deposited assets. Each unique combination of asset and origin chain gets a token ID on the Hub. For example:- ETH deposited on Optimism → token ID
X - ETH deposited on Base → token ID
Y - USDC deposited on Arbitrum → token ID
Z
ERC20View) for standard wallet compatibility.
ERC6909 Interface
The Hub implements the full ERC6909 interface, including:balanceOf(owner, tokenId)— Check a user’s or solver’s balance for a specific tokentransfer(receiver, tokenId, amount)— Transfer Hub tokens between addressesapprove(spender, tokenId, amount)— Approve another address to spend tokens- Operator system — Grant an address full control over all token balances
- EIP-712 permits — Gasless approval signatures
While the Hub supports direct transfers between addresses, in practice most balance changes come from Oracle attestations (MINT, TRANSFER, BURN) rather than user-initiated transfers.
Source Code
The Hub contract (RelayHub.sol) is part of the settlement-protocol repository and deployed on the Relay Chain.