Overview
TheGnosisBridgeFacet enables bridging of ETH and ERC20 tokens from Ethereum mainnet to Gnosis Chain (formerly xDai Chain) using the official Gnosis bridge infrastructure.
Contract Interface
Functions
startBridgeTokensViaGnosisBridge
Bridges tokens from Ethereum to Gnosis Chain.Standard bridge data containing transaction details
swapAndStartBridgeTokensViaGnosisBridge
Performs a token swap on Ethereum before bridging to Gnosis Chain.Standard bridge data
Array of swap operations to execute before bridging
Usage Example
Bridging DAI to Gnosis (becomes xDai)
Bridging ERC20 Tokens
Swap and Bridge
Events
LiFiTransferStarted(BridgeData bridgeData)- Emitted when bridge transfer is initiatedLiFiTransferCompleted- Emitted when transfer completesAssetSwapped- Emitted when using swapAndStart variant
Notes
- This facet only supports bridging FROM Ethereum mainnet TO Gnosis Chain
- DAI bridged to Gnosis becomes xDai (the native gas token)
- Other ERC20 tokens are bridged to their wrapped/mapped versions on Gnosis
- Bridging typically takes a few minutes for finality
- The bridge uses the Arbitrary Message Bridge (AMB) for ERC20 tokens
- Tokens must be approved before bridging
Token Bridging
DAI → xDai
DAI from Ethereum becomes xDai (native token) on Gnosis Chain with 1:1 ratio.Other ERC20 Tokens
ERC20 tokens are bridged using the OmniBridge, creating wrapped versions on Gnosis Chain.Bridge Times
- Ethereum → Gnosis: ~5 minutes
- Gnosis → Ethereum: ~5 minutes + challenge period