Composable Shared Bridge
Overview
The Composable Shared Bridge leverages the Mailbox Contracts to facilitate seamless ERC20 token transfers between different rollups. This bridge enables users to move their tokens across the Compose Network while maintaining the same user experience as traditional cross-chain bridges.
How It Works
The shared bridge utilizes the mailbox contract interface to enable ERC20 transfers:
- Token Locking: When a user wants to transfer tokens from Rollup A to Rollup B, the bridge locks the tokens on Rollup A
- Message Creation: The bridge creates a message through the mailbox contract specifying the transfer details
- Cross-Rollup Communication: The mailbox system delivers the transfer message to Rollup B
- Token Minting: Upon receiving the message, the bridge mints equivalent tokens on Rollup B
This process ensures that ERC20 tokens can be seamlessly transferred between rollups while maintaining the security and composability provided by the mailbox contract system.
Next: Shared Publisher
The Composable Shared Bridge works in coordination with the Shared Publisher to ensure that cross-rollup token transfers are executed atomically. The Shared Publisher coordinates the entire transfer process, ensuring that either the complete transfer succeeds across all involved rollups or fails entirely, preventing any partial transfers that could result in lost or duplicated tokens.