EIPs Explained

ERC-7965 · Draft · ERC · 2025-06-06

ERC-7965: Proof-based Broadcast in ERC-7786 Gateways

A draft set of ERC-7786 message attributes (route, inclusionProof, targetBlock) and broadcast rules that let cross-chain gateways verify messages with cryptographic proofs of the source chain's state instead of trusting relayers or multisigs.

What problem does it solve?

Most cross-chain bridges and messaging layers rely on someone to vouch for a message: a validator set, a multisig or an optimistic challenge window. Each adds trust assumptions and a point of failure.

A different approach is to prove the message: show, with a storage or event inclusion proof, that it was committed in the source chain's finalized state, and check that proof on the destination against a state commitment the destination already trusts (for example via a shared settlement layer). ERC-7786 gives a common sendMessage interface for gateways but does not say how to carry proof data or routing. ERC-7965 fills that gap with standard attributes, and also defines finer-grained broadcast targets.

How it works

Proof attributes. Gateways that support them must return true from supportsAttribute for their selectors:

Attribute Meaning
route((bytes,bytes,uint256)[]) Verification path from destination back to source. Each hop: address to call, proof for that step, required version (0 = any). Multi-hop is allowed.
inclusionProof(bytes) Proof that the message exists in the source chain's committed state (e.g. storage or event proof).
targetBlock(uint256) Optional. Source block (or equivalent commitment) the proof refers to, for freshness or finality checks.

Verification. The destination gateway walks the route, verifying each block-hash (or state-commitment) transition with its proof and checking versions. It then uses inclusionProof to show the message is in the source state reached at the end of the route, optionally checks targetBlock, and delivers the message. Results may be cached.

Broadcast granularity. Using ERC-7930 interoperable addresses as the recipient:

  • empty address on a given chain: every address on that chain;
  • empty chain reference with a chain type (e.g. eip155): every chain of that type;
  • all fields zero: everything the gateway supports.

Existing proof systems such as ERC-7888 broadcasters can expose an ERC-7786 interface using these attributes without changing their core design.

Sample code

Sending a proof-backed broadcast to every address on chain ID 42161 (adapted from the spec):

struct Hop { bytes gateway; bytes proof; uint256 version; }

Hop[] memory hops = new Hop[](1);
hops[0] = Hop(routeGateway, stepProof, 0); // 0 = any verifier version

// ERC-7930 recipient: eip155 chain 42161, empty address = broadcast
bytes memory recipient = abi.encodePacked(
    uint16(1),      // version
    uint16(0x0000), // chain type: eip155
    uint8(2),       // chain reference length
    uint16(42161),  // chain reference
    uint8(0)        // address length 0 -> all addresses
);

bytes[] memory attributes = new bytes[](3);
attributes[0] = abi.encodeWithSignature("route((bytes,bytes,uint256)[])", hops);
attributes[1] = abi.encodeWithSignature("inclusionProof(bytes)", proofData);
attributes[2] = abi.encodeWithSignature("targetBlock(uint256)", blockNumber);

gateway.sendMessage(recipient, abi.encode("priceUpdate", asset, price), attributes);

Things to know

  • Status: Draft. Attribute names, encoding and semantics may still change.
  • A multi-hop route is only as secure as its weakest hop. Evaluate every verifier in the path.
  • Proofs should only be built against finalized blocks to avoid reorg attacks. Because a proof can attest to a very old message, receivers should apply their own freshness or replay checks unless the gateway commits messages immutably.
  • Broadcast messages can be relayed and executed by anyone, so receivers must validate the source and content themselves.
  • Gateways may store commitments immutably (e.g. using ERC-7201 namespaced storage), but this is not required.

#cross-chain #interoperability #messaging #proofs #erc

Details

Authors
Ernesto García (@ernestognw)
Status
Draft
Type
Standards Track / ERC
Created
2025-06-06
Requires

Machine-readable: Markdown · JSON