Cross-chain Bridges¶
Overview¶
Cross-chain bridges are protocols that connect two independent blockchain networks, allowing assets and information to be transferred between different blockchains. Since blockchains are typically closed systems (silos) that cannot directly sense off-chain or other chain states, cross-chain bridges solve the interoperability problem between blockchains, enabling assets to flow freely across different networks such as Ethereum, Solana, BSC, and Layer 2s.
Core Mechanism and Principles¶
The core task of a cross-chain bridge is to prove that an event on the source chain (such as asset locking or burning) is genuine and valid on the target chain, and to execute corresponding operations on the target chain (such as asset minting or releasing).
Communication Mechanisms¶
-
Lock and Mint:
- Users lock native assets in a smart contract on the source chain.
- The cross-chain bridge verifies the locking transaction.
- The bridge mints an equivalent amount of wrapped assets (e.g., WBTC) on the target chain.
- For the reverse operation, users burn the wrapped assets on the target chain, and native assets are unlocked on the source chain.
-
Liquidity Pools:
- The bridge establishes liquidity pools holding native assets or stablecoins on both source and target chains.
- Users deposit assets on the source chain.
- After verification, the bridge releases equivalent assets from the target chain's liquidity pool to the user.
- This method is commonly used for stablecoin cross-chain transfers, avoiding the fragmentation problem of wrapped assets.
-
Atomic Swaps:
- Using Hash Time-Locked Contracts (HTLC), allows users to exchange assets peer-to-peer across two chains without trusting a third party. If the trade is not completed within the specified time, assets are automatically refunded.
Verification Models¶
Cross-chain bridge verification methods are mainly categorized into three types based on different trust assumptions:
- Externally Verified: Relies on a group of external validators or multisig holders to reach consensus and sign cross-chain messages.
- Characteristics: Fast speed, low cost, but security depends on the honesty of external validators (e.g., Multichain, Wormhole).
- Natively Verified: The target chain directly runs a light client of the source chain, verifying source chain transactions through block headers and Merkle proofs.
- Characteristics: Extremely high security (trustless), but difficult to develop and high Gas costs (e.g., Cosmos IBC, Near Rainbow Bridge).
- Locally Verified: Based on liquidity networks, only the two parties directly involved in the transaction verify it, typically using hash time locks.
- Characteristics: Peer-to-peer, no global consensus required, but limited to asset swaps and difficult to support general message passing (e.g., Connext, Hop).
Main Types and Classifications¶
- Asset-Specific Bridges: Specifically designed for a particular asset (such as Bitcoin) to enter other ecosystems (e.g., wBTC).
- Chain-Specific Bridges: Officially supported by specific blockchains, connecting the mainnet with its ecosystem (e.g., Polygon PoS Bridge, Arbitrum Bridge).
- Application-Specific Bridges: Cross-chain functionality built into specific dApps (e.g., Thorchain).
- General Message Passing Bridges: Not only bridge assets but also transmit arbitrary data and function calls (e.g., LayerZero, Chainlink CCIP).
Security Risks¶
Cross-chain bridges are a major target for hacker attacks in the DeFi space. Key risk areas include: - Smart Contract Vulnerabilities: Logic errors in contracts leading to asset theft. - Validator Private Key Leaks: External validator node private keys obtained by hackers, forging cross-chain messages. - Centralization Risk: Some bridges have overly centralized validator nodes, creating single points of failure.