EIPs Explained

ERC-7888 · Draft · ERC · 2025-02-18

ERC-7888: Crosschain Broadcaster

A draft standard for trustless rollup-to-rollup messaging: publish a 32-byte message into a Broadcaster's storage on one chain, then prove it on any other chain that shares a common ancestor using chained storage proofs.

What problem does it solve?

Rollups are multiplying, and they run on different stacks with different ways of committing their state to a parent chain. There is no simple, unified, trustless way for a contract on one rollup to learn something that happened on another. Intent protocols, multichain governance and oracles each build their own.

ERC-7888 proposes one shared pattern: messages are written to storage on the source chain, and any destination chain that can follow the chain of state commitments back to a common ancestor (usually Ethereum) can verify them with storage proofs. No extra transaction on L1 and no gas tokens on intermediate chains are needed.

How it works

Each chain deploys a singleton Broadcaster and a singleton Receiver.

  • Broadcaster: a publisher calls broadcastMessage(bytes32 message). The contract stores block.timestamp in slot keccak(message, msg.sender) and emits MessageBroadcast. The same publisher cannot broadcast the same message twice (nonces are left to the application).
  • StateProver: a contract that knows one one-way link between a home chain and a target chain (for example L2 → L1, or L1 → L2). It can read the target's state commitment directly when running on the home chain (getTargetStateCommitment), verify it from a proof elsewhere (verifyTargetStateCommitment), and verify a single storage slot against a commitment (verifyStorageSlot). A state commitment is a bytes32 such as a block hash (recommended), state root or batch hash.
  • StateProverPointer: an upgradeable pointer that stores the code hash of the current StateProver. Rollup internals change, so proving logic must be replaceable; new provers must keep the same home/target chains and a higher version().
  • StateProverCopy: because pointers reference provers by code hash, an identical copy can be deployed on any chain and used locally.
  • Route: a list of pointer addresses from the local chain to the remote chain, e.g. L2 → Ethereum → another L2 → an L3. The Receiver walks the route, proving one state commitment after another, then proves the Broadcaster's storage slot at the end.

Remote accounts are identified by a Remote Account ID: a cumulative keccak hash of the route's pointer addresses plus the remote address, so no reliance on (non-unique) chain IDs.

Sample code

A publisher and a subscriber, based on the spec's burn-and-mint example:

// SPDX-License-Identifier: CC0-1.0
pragma solidity ^0.8.20;

interface IBroadcaster {
    event MessageBroadcast(bytes32 indexed message, address indexed publisher);
    function broadcastMessage(bytes32 message) external;
}

interface IReceiver {
    struct RemoteReadArgs {
        address[] route;     // StateProverPointer addresses along the route
        bytes[] scpInputs;   // inputs for each StateProver / copy
        bytes proof;         // final storage-slot proof
    }
    function verifyBroadcastMessage(RemoteReadArgs calldata args, bytes32 message, address publisher)
        external view returns (bytes32 broadcasterId, uint256 timestamp);
}

// Source chain
contract Publisher {
    IBroadcaster immutable broadcaster;
    uint256 nonce;
    constructor(IBroadcaster b) { broadcaster = b; }

    function announce(bytes calldata payload) external {
        broadcaster.broadcastMessage(keccak256(abi.encode(payload, nonce++)));
    }
}

// Destination chain
contract Subscriber {
    IReceiver immutable receiver;
    address immutable publisher;        // Publisher address on the source chain
    bytes32 immutable broadcasterId;    // Remote Account ID of the source Broadcaster
    mapping(bytes32 => bool) public done;

    constructor(IReceiver r, address p, bytes32 id) { receiver = r; publisher = p; broadcasterId = id; }

    function consume(IReceiver.RemoteReadArgs calldata args, bytes32 message) external {
        require(!done[message], "processed");
        (bytes32 id, ) = receiver.verifyBroadcastMessage(args, message, publisher);
        require(id == broadcasterId, "wrong broadcaster");
        done[message] = true;
        // ... act on the message
    }
}

Things to know

  • Status: Draft. Interfaces and names may still change.
  • Messages are only 32 bytes; publishers typically broadcast a hash and emit an event with the full data so it can be reconstructed.
  • The Receiver does not track which messages were consumed. Subscribers must do their own replay protection.
  • Only finalized state is used, so delivery time is the sum of finalization delays along the route. The standard guarantees a message can be read, not that anyone will read it.
  • Whoever controls a StateProverPointer can stall or forge messages. The spec expects the pointer owner to be the same party that already controls the relevant chain's commitment storage, so no new trust is added.

#crosschain #rollups #messaging #interop #storage-proofs

Details

Authors
Henry Arneson (@godzillaba), Chris Buckland (@yahgwai)
Status
Draft
Type
Standards Track / ERC
Created
2025-02-18

Machine-readable: Markdown · JSON