Skip to main content

Mailbox Contracts

Overview

Mailbox Contracts provide Ethera's cross-rollup message transport layer. They allow contracts on one rollup to communicate intent to another rollup as part of a coordinated cross-rollup action.

In Ethera, mailbox contracts are not just a convenience layer for passing data. They are part of the mechanism that allows independent rollups to participate in one composed action while preserving atomicity and consistency.

What Mailbox Contracts Do

At a high level, mailbox contracts support three responsibilities:

  • Recording outbound messages on the source chain
  • Receiving inbound messages on the destination chain
  • Making those messages available to the contracts that need to consume them during execution

This makes mailbox contracts the bridge between local contract execution on one rollup and coordinated execution across multiple rollups.

How Mailbox Contracts Fit Into Ethera

Mailbox contracts work together with the rest of Ethera's architecture:

  • Shared Publisher coordinates atomic execution across rollups
  • Two-Phase Commit ensures that cross-rollup actions either complete together or abort together
  • Universal Bridge uses mailbox-based communication for asset transfer and settlement flows

Mailbox contracts are therefore not an isolated subsystem. They are one of the core primitives used by Ethera to make cross-rollup coordination possible.

Message Flow

A mailbox-based flow can be understood in four steps:

  1. A contract on the source chain writes an outbound message
  2. Ethera's coordination layer relays that message to the destination chain
  3. The destination chain receives the corresponding inbound message
  4. A contract on the destination chain consumes that message as part of its execution

This lets applications express cross-rollup actions in a form that can be coordinated by Ethera rather than requiring each chain to act independently without shared context.

Why Message Consumption Matters

Mailbox messages are not meant to behave like passive data that any contract can read repeatedly without consequence. In Ethera's bridge architecture, consuming a message is part of the correctness model.

That matters because it helps prevent:

  • Duplicate processing of the same cross-rollup action
  • Inconsistent execution across source and destination chains
  • Ambiguous bridge state during multi-step flows

This is especially important in bridge and settlement paths, where one side of the flow may depend on a message that was produced by execution on another chain.

Mailbox Contracts and Composability

Mailbox contracts are one of the key reasons Ethera can preserve composability across rollups.

On a single chain, one contract can call another contract directly and immediately use the result. Across rollups, that direct execution path does not exist in the same way. Mailbox contracts provide the message layer that allows Ethera to coordinate those dependencies across chains while still treating the broader action as one composed operation.

They are a general coordination primitive for cross-rollup applications built on Ethera.