What is Hub-and-Spoke?
Across Protocol uses a hub-and-spoke model where:- Hub (HubPool): Central contract on Ethereum L1 that manages liquidity, validates transfers, and owns all spoke contracts
- Spokes (SpokePools): Lightweight contracts on each supported chain that handle deposits and fills
HubPool: The Central Hub on L1
Core Responsibilities
The HubPool on Ethereum L1 serves as the protocol’s control center:Liquidity Pool
Accepts deposits from LPs who earn fees for providing capital to fund relayer refunds.
Validation Engine
Validates cross-chain transfers using merkle root bundles with optimistic verification.
Pool Rebalancer
Coordinates token distribution across all SpokePools via chain adapters.
Cross-Chain Owner
Owns and administers all SpokePool contracts across all chains.
Liquidity Management
The HubPool manages liquidity for all supported tokens:- Liquid Reserves: Tokens available in the HubPool for immediate use
- Utilized Reserves: Tokens sent to SpokePools for relayer refunds
- LP Fee Rate: Continuous fee distribution using exponential decay (0.0000015e18 per second)
- Exchange Rate: LP token value increases over time as fees accrue
Root Bundle Validation
The HubPool uses merkle trees to validate cross-chain activity:- Pool Rebalance Root: Instructions for sending tokens from HubPool to SpokePools
- Relayer Refund Root: Merkle proofs for relayer refunds on each chain
- Slow Relay Root: Merkle proofs for slow fills when no relayer filled the deposit
SpokePools: Lightweight Spokes on L2s
Core Responsibilities
SpokePools on each chain are responsible for:Accept Deposits
Users lock tokens in the SpokePool and emit a
FundsDeposited event that relayers monitor.Deposit Flow
- Lightweight: Minimal logic to reduce gas costs on L2s
- Event-Driven: Deposits emit events that off-chain relayers monitor
- Merkle Proofs: Refunds and slow fills use merkle proofs to validate against roots
- Pausable: Admin can pause deposits or fills in emergencies
Cross-Chain Ownership
The HubPool on L1 owns all SpokePool contracts across all chains through a cross-chain ownership model:Admin Function Call
HubPool owner calls
relaySpokePoolAdminFunction(chainId, functionData) on HubPool.Cross-Chain Message
Adapter sends message through the chain’s native bridge (Arbitrum Inbox, OP Messenger, etc.).
- Arbitrum: Uses address aliasing (
AddressAliasHelper.applyL1ToL2Alias()) - Optimism/Base: Verifies via
CrossDomainMessenger.xDomainMessageSender() - Polygon: Checks
FxChild.processMessageFromRoot() - zkSync: Validates via zkSync bridge messaging
UUPS Upgrades
All SpokePools use UUPS (Universal Upgradeable Proxy Standard) for upgrades:- Deploy new SpokePool implementation
- Call
relaySpokePoolAdminFunction()on HubPool withupgradeTo(newImplementation) - Message bridges to L2 via chain adapter
- SpokePool verifies admin and upgrades to new implementation
- Storage and address remain unchanged
Pool Rebalancing
The hub-and-spoke model enables efficient pool rebalancing:Why Rebalancing is Needed
Why Rebalancing is Needed
Relayers fill deposits on destination chains using their own capital. The HubPool must periodically send tokens to SpokePools to refund relayers. This process is called “pool rebalancing.”
How It Works
How It Works
- Data worker monitors all chains and calculates net token flows
- Data worker proposes a root bundle with pool rebalance leaves
- After challenge period, HubPool executes leaves to send tokens to SpokePools
- Relayers claim refunds on their chosen chains using merkle proofs
Optimization
Optimization
Net flow calculation means tokens only move when needed. If a chain has excess tokens, they can be sent back to HubPool or redirected to deficit chains.
Benefits of Hub-and-Spoke
Centralized Liquidity
All LP capital pooled on L1 for maximum capital efficiency. No fragmentation across chains.
Simplified L2 Logic
SpokePools are lightweight with minimal logic, reducing gas costs and attack surface.
Unified Governance
Single point of control on L1 for all protocol parameters and upgrades.
Optimistic Verification
Challenge period on L1 ensures security without expensive on-chain verification.
Flexible Scaling
Easy to add new chains by deploying a SpokePool and chain adapter.
Efficient Rebalancing
Net flow calculations minimize unnecessary token transfers.
Related Documentation
Architecture
Overview of the complete system architecture
Protocol Flow
Step-by-step guide through the protocol flow
Roles
Learn about different participants in the protocol