Overview
TheOptimism_SpokePool is deployed on Optimism mainnet. It extends the Ovm_SpokePool base contract and adds custom bridging logic for Synthetix-related assets like SNX, which use a specialized bridge instead of the standard OP Stack bridge.
Contract: contracts/Optimism_SpokePool.sol
Key Characteristics
- Extends Ovm_SpokePool: Inherits OP Stack cross-domain messaging and standard bridge logic
- Custom SNX bridge: Implements special handling for Synthetix Network Token (SNX)
- CCTP support: Inherits Circle CCTP integration from Ovm_SpokePool
- Standard OP Stack patterns: Uses CrossDomainMessenger for admin verification
Inheritance
- Inherits
Ovm_SpokePoolwhich provides OP Stack bridging functionality - Inherits
CircleCCTPAdapterthrough Ovm_SpokePool for USDC bridging
Constructor
_wrappedNativeTokenAddress: Address of WETH on Optimism_depositQuoteTimeBuffer: Max age for deposit quote timestamps_fillDeadlineBuffer: Max future offset for fill deadlines_l2Usdc: Circle USDC address on Optimism (or 0x0 to disable CCTP)_cctpTokenMessenger: Circle TokenMessenger contract for CCTP bridging
Initialization
_initialDepositId: Starting deposit nonce_crossDomainAdmin: L1 HubPool address_withdrawalRecipient: Address receiving bridged tokens on L1 (typically HubPool)
l2Eth to Optimism’s predeploy ETH address (0xDeadDeAddeAddEAddeadDEaDDEAdDeaDDeAD0000).
Admin Verification
_requireAdminSender()
Inherited from Ovm_SpokePool:
- Checks that the cross-chain message sender (via L2CrossDomainMessenger) is the HubPool
- Uses Optimism’s
CrossDomainMessengercontract at predeploy address MESSENGERconstant:0x4200000000000000000000000000000000000007
Token Bridging
_bridgeTokensToHubPool()
-
SNX tokens: Use Synthetix’s custom bridge
- Bridge address:
0x136b1EC699c62b0606854056f02dC7Bb80482d63 - SNX address:
0x8700dAec35aF8Ff88c16BdF0418774CB3D7599B4 - Calls
withdrawTo()directly on SynthetixBridgeToBase
- Bridge address:
-
All other tokens: Delegate to parent
Ovm_SpokePool._bridgeTokensToHubPool()- USDC via CCTP (if enabled)
- WETH unwrapped to ETH then bridged via L2StandardBridge
- Other ERC20s via L2StandardBridge or custom token bridges
Synthetix Bridge Interface
- Synthetix uses a specialized bridge that predates the standard OP Stack bridge
- The interface is non-standard (no L1 token parameter, different function signature)
- SNX is a native L2 token on Optimism with different bridging requirements
Contract Constants
Inherited Features from Ovm_SpokePool
Standard Bridge Integration
For non-SNX tokens, inherits from Ovm_SpokePool:ETH/WETH Handling
CCTP USDC Bridging
Custom Token Bridges
For tokens with custom bridges (e.g., DAI):Pre-Execute Hook
Admin Functions (Inherited)
setL1GasLimit()
setTokenBridge()
setRemoteL1Token()
bridgeERC20To() calls.
Unique Features
- SNX-specific handling: Only major override from base Ovm_SpokePool
- Minimal additions: Most functionality inherited from Ovm_SpokePool
- Predeploy addresses: Uses Optimism’s standard predeploy contracts
- Virtual override: Allows further customization by child contracts (e.g., Base_SpokePool)
Architecture Notes
- Optimism_SpokePool is a thin wrapper around Ovm_SpokePool
- The only custom logic is SNX bridge integration
- Uses OP Stack’s CrossDomainMessenger for admin verification
- Inherits multi-bridge support (CCTP, standard bridge, custom bridges)
- The
virtualkeyword on_bridgeTokensToHubPool()allows chains like Base to further customize
Related Contracts
- SpokePool - Base contract
- Optimism Adapter - L1→L2 message relay from HubPool
- Ovm_SpokePool - Parent contract with OP Stack logic (see source code)