EIPs Explained

ERC-7828 · Review · ERC · 2024-11-27

ERC-7828: Interoperable Names

A human-readable chain-specific address format, <address>@<chain>#<checksum> (for example alice.eth@base), where chain names are resolved onchain via ENS under on.eth, so users stop sending funds to the right address on the wrong chain.

What problem does it solve?

Ethereum mainnet and hundreds of L2s share one address format. A bare 0xFe89…44b7 does not say which chain it is meant for, so funds can end up at an address on a chain where the recipient has no access. ERC-7930 fixed this for machines with a compact binary "Interoperable Address" that bundles chain and address, but that binary blob means nothing to a person.

ERC-7828 defines the text form people read and type. It also replaces the centralised off-chain list of chain names with an onchain ENS registry, where base or ethereum map to canonical chain identifiers.

How it works

Format: <address>@<chain>#<checksum>

  • <address>: a raw address in its chain's native format, or an ENS name such as alice.eth. A value containing . is treated as ENS and resolved for the target chain, using ENS multichain address resolution (ENSIP-9/11).
  • <chain>: either a CAIP-350 identifier such as eip155:1 or bip122:0000…1e93, or, if it contains no :, a label under on.eth. The on.eth resolver returns the ERC-7930 binary chain identifier for <label>.on.eth under the data key interoperable-address; ethereum.on.eth should return 0x00010000010100. Reverse lookups (chain-label:<interop address> on reverse.on.eth) return one canonical label, even when aliases such as op and optimism both exist.
  • #<checksum> (optional, recommended for raw addresses, not for ENS names): the first 4 bytes of keccak256 over the ERC-7930 fields ChainType ‖ ChainReferenceLength ‖ ChainReference ‖ AddressLength ‖ Address (the version field is left out), as 8 uppercase hex characters.

Examples from the spec:

0xFe89cc7aBB2C4183683ab71653C4cdc9B02D44b7@eip155:1#80B12379
0xFe89cc7aBB2C4183683ab71653C4cdc9B02D44b7@ethereum#80B12379
wallet.ensdao.eth@ethereum
bc1qwz2lhc40s8ty3l5jg3plpve3y3l82x9l42q7fk@bitcoin#597D21A1

Sample code

Computing the checksum for an EVM address (ethers v6):

import { keccak256, concat, toBeHex, getBytes } from "ethers";

function checksumEip155(address: string, chainId: number): string {
  const ref = getBytes(toBeHex(chainId));       // minimal big-endian bytes
  const addr = getBytes(address);               // 20 bytes
  const data = concat([
    "0x0000",                                   // ChainType: eip155
    toBeHex(ref.length, 1), ref,                // ChainReferenceLength, ChainReference
    toBeHex(addr.length, 1), addr,              // AddressLength, Address
  ]);
  return keccak256(data).slice(2, 10).toUpperCase();
}

checksumEip155("0xFe89cc7aBB2C4183683ab71653C4cdc9B02D44b7", 1); // "80B12379"

Things to know

  • Status is Review: the format is close to settled but may still change.
  • Earlier proposals for chain-specific addresses include ERC-3770 (shortName:address).
  • Normalise ENS names (ENSIP-1/15) to avoid look-alike spoofing, and be wary of address poisoning when users paste raw addresses.
  • ENS resolvers can change, and wildcard resolvers can return dynamic data, which is one reason checksums are not used with ENS names.
  • Implementations must always be able to convert between this text form and the ERC-7930 binary form.

#addresses #multichain #ens #ux #interoperability

Details

Authors
Sam Kaufman (@SampkaML), Marco Stronati (@paracetamolo), Yuliya Alexiev (@yuliyaalexiev), Jeff Lau (@jefflau), Sam Wilson (@samwilsn), Vitalik Buterin (@vbuterin), Teddy (@0xteddybear), Joxes (@Joxess), Racu (@0xRacoon), Skeletor Spaceman (@0xskeletor-spaceman), TiTi (@0xtiti), Gori (@0xGorilla), Ardy (@0xArdy), Onizuka (@onizuka-wl), Lumi (@oxlumi), Moebius (@0xmoebius), Thomas Clowes (@clowestab), Prem Makeig (@nxt3d), Mono (@0xMonoAx), Orca (@0xrcinus)
Status
Review
Type
Standards Track / ERC
Created
2024-11-27
Requires

Machine-readable: Markdown · JSON