Skip to main content

Bridge Contracts

The Ethera bridge is implemented across multiple contracts, each responsible for a specific part of the asset transfer lifecycle.

Overview

The current bridge architecture supports three main routes:

  • Deposits from Sepolia into Ethera rollups
  • Transfers between Ethera rollups
  • Withdrawals from Ethera rollups back to Sepolia

Relevant Contracts

Sepolia Bridge

ComposeL1Bridge is the Layer 1-side bridge for deposits from Sepolia into Ethera rollups. It also finalizes withdrawals back to Sepolia by releasing canonical assets to the recipient.

Rollup Bridge

L2ComposeBridge is the rollup-side bridge for deposits arriving from Sepolia and withdrawals returning to Sepolia. It finalizes inbound deposits on the rollup and initiates the withdrawal path back to Sepolia.

Rollup-to-Rollup Bridge

ComposeL2ToL2Bridge is the rollup-to-rollup bridge entry point for ETH, ERC20, and CET transfers between Ethera rollups. It coordinates send and receive operations through the mailbox layer.

Settlement Contracts

ComposePortal, ComposeERC20Lockbox, and ComposeETHLockbox form the settlement layer used during deposits and withdrawals involving Sepolia. They escrow canonical assets on deposit and participate in withdrawal proving and finalization.

These contracts are referenced throughout the Layer 1 and rollup bridge flows but are not documented as separate bridge pages yet.

Route Summary

Deposits from Sepolia

  1. The user calls ComposeL1Bridge on Sepolia
  2. ETH or canonical ERC20 is escrowed on Layer 1
  3. A message is relayed to L2ComposeBridge
  4. The rollup finalizes the deposit
  5. The recipient receives native ETH or CET on the destination rollup

Transfers Between Rollups

  1. The user calls ComposeL2ToL2Bridge on the source rollup
  2. The bridge writes the send message into the mailbox layer
  3. The destination rollup consumes the bridged message
  4. The destination receives the correct token representation

Withdrawals to Sepolia

  1. The user calls L2ComposeBridge on the source rollup
  2. CET is burned on the rollup for ERC20 withdrawals
  3. A withdrawal message is sent back toward Sepolia
  4. The withdrawal is later proven and finalized through ComposePortal
  5. The canonical asset is released on Sepolia