Overview
TheUniversal_SpokePool is a novel SpokePool variant that uses storage proofs and the Helios L1 light client instead of canonical bridges for cross-chain admin verification. This enables deployment to any chain without requiring chain-specific bridge integrations.
Contract: contracts/Universal_SpokePool.sol
Key Characteristics
- Light-client verification: Uses Helios to verify L1 state instead of canonical bridges
- Storage proofs: Validates calldata was stored by HubPool on L1
- HubPoolStore: Dedicated L1 contract where HubPool stores execution data
- Replay protection: Nonce-based to prevent message replay
- Emergency admin: Multisig owner can execute if light client fails
- CCTP support: Integrates Circle CCTP for USDC transfers
- OFT support: Supports LayerZero OFT tokens
- Bridge-agnostic: No canonical bridge integration required
Inheritance
- Uses
OwnableUpgradeablefor emergency admin functions - Inherits base
SpokePoolfunctionality - Inherits
CircleCCTPAdapterfor USDC bridging
Constructor
_adminUpdateBufferSeconds: Minimum time since last Helios update before owner can emergency execute (e.g., 24 hours)_helios: Address of Helios L1 light client contract_hubPoolStore: Address of L1 HubPoolStore contract_wrappedNativeTokenAddress: Address of WETH on this chain_depositQuoteTimeBuffer: Max age for deposit quote timestamps_fillDeadlineBuffer: Max future offset for fill deadlines_l2Usdc: Circle USDC address (or 0x0 to disable CCTP)_cctpTokenMessenger: Circle TokenMessenger contract for CCTP bridging_oftDstEid: LayerZero endpoint ID for OFT messaging_oftFeeCap: Maximum fee for OFT transfers
Initialization
_initialDepositId: Starting deposit nonce_crossDomainAdmin: L1 HubPool address (used for validation, not cross-chain messaging)_withdrawalRecipient: Address receiving bridged tokens (typically an OFT or CCTP endpoint)
Architecture
Flow Overview
-
HubPool stores data on L1:
-
Off-chain agent fetches data:
- Sees
StoredCallDataevent from HubPoolStore - Waits for Helios to sync past that block
- Calls
executeMessage()on Universal_SpokePool
- Sees
-
SpokePool verifies and executes:
- Checks storage proof via Helios
- Validates nonce hasn’t been used
- Delegatecalls the provided calldata
Storage Proof Verification
Storage Slot Calculation
keccak256(key, slotIndex) - standard Solidity mapping slot calculation
Constant:
Admin Verification
_requireAdminSender()
validateInternalCalls Modifier
executeMessage() or adminExecuteMessage().
Calldata Execution
Emergency Admin
adminExecuteMessage()
- Owner (multisig) can execute messages if Helios stops updating
- Must wait
ADMIN_UPDATE_BUFFERseconds since last Helios update - Prevents owner from bypassing light client in normal operation
- Example buffer: 24 hours
Token Bridging
_bridgeTokensToHubPool()
- CCTP for USDC: Circle’s Cross-Chain Transfer Protocol
- LayerZero OFT: For tokens with configured OFT messengers
- No canonical bridge: Deliberately not implemented to remain chain-agnostic
State Variables
Events
Errors
Helios Interface
getStorageSlot(): Fetches storage value with light client proof verificationheadTimestamp(): Returns timestamp of latest verified L1 block
Unique Features
- Light-client based: First SpokePool to use storage proofs instead of canonical bridges
- Chain-agnostic: Can be deployed to any chain without custom bridge integration
- Helios integration: Uses Ethereum light client for L1 state verification
- HubPoolStore: Separate L1 contract stores execution data
- Emergency admin: Multisig fallback if light client fails
- Bridge restrictions: Only supports CCTP and OFT, not native bridges
- Nonce-based replay protection: Prevents message replay attacks
Architecture Notes
- HubPool writes calldata hashes to HubPoolStore on L1
- Off-chain agents monitor
StoredCallDataevents - Agents wait for Helios to sync, then call
executeMessage() - Contract verifies storage proof matches expected hash
- Calldata is delegatecalled to execute admin function
- Owner can emergency execute if Helios stops updating for >ADMIN_UPDATE_BUFFER
- No canonical bridge means tokens must use CCTP or OFT
- This design enables deployment to chains without Across-supported canonical bridges
Security Considerations
- Light client assumptions: Security depends on Helios light client correctness
- Storage proof validity: Helios must correctly verify Ethereum consensus
- Replay protection: Nonces must be unique and checked
- Emergency admin risk: Owner must be a trusted multisig with proper time locks
- Target validation: Prevents execution of calldata intended for other contracts
- Delegatecall safety: Calldata executed in context of this contract (requires careful HubPool validation)
Deployment Considerations
- ADMIN_UPDATE_BUFFER: Set to high value (e.g., 24 hours) to prevent owner abuse
- Owner: Must be reputable multisig (e.g., Across DAO multisig on this chain)
- Helios deployment: Requires Helios light client deployed on target chain
- HubPoolStore: Single shared contract on L1 for all Universal_SpokePools
- Token support: Only tokens with CCTP or OFT support can be bridged
Related Contracts
- SpokePool - Base contract
- HubPoolStore - L1 contract that stores calldata for storage proof verification (see source code)
- Helios - L1 light client contract for proof verification