ERC-7673 Distinguishable Emoji Address Notation (Distinguishable base256emoji Addresses)

Review · Other · created 2024-04-01

A notation standard that displays and accepts account addresses as 20 emojis instead of hexadecimal. It is easier to tell apart at a glance than a long hexadecimal address, making it harder to spoof with a similar-looking address.

Why it is needed

An Ethereum address is a 42-character hexadecimal string starting with 0x. Humans struggle to distinguish such long strings, and are especially prone to mistaking addresses as identical if only the first and last few characters match. Attackers exploit this weakness by mass-generating (mining) addresses that resemble the victim's counterparty at the start and end, then injecting fake ERC-20 Transfer events into the transaction history. This technique lures users into copying the fake address when copying an address from their transaction history. According to the original text, such address spoofing attacks have caused tens of thousands of ether and countless tokens to be sent to the wrong place, with fake events wasting network resources and complicating blockchain accounting. Converting addresses into a form that is easier for humans to distinguish reduces the very incentive for this kind of attack.

In depth

Three rules the UI must follow

This standard requires three things of the user interface. First, it SHALL display account addresses as base256emoji strings instead of hexadecimal. Second, wherever a user enters an address, it SHALL accept base256emoji strings as input. Third, when exactly 20 consecutive emoji are all valid base256emoji characters, it is RECOMMENDED (SHOULD) that they be recognized and interpreted as an address. Requirement-level keywords are interpreted per RFC 2119 and RFC 8174.

The base256emoji encoding table

Defines a table mapping each byte value from 0 to 255 to one emoji. Value 0 is 🚀 (U+1F680), 1 is 🪐 (U+1FA90), and 255 is 🥂 (U+1F942). Because an Ethereum address is 20 bytes, it is represented by exactly 20 emoji. The table allows bidirectional conversion between base256emoji and hexadecimal, keeping it compatible with the existing scheme.

Why emoji of all things

Existing attempts like the ERC-55 checksum tried to reduce copy errors but did not shorten the address itself. Any base-256 scheme can halve the character count, and emoji were chosen among such schemes because they are the easiest for people to distinguish. Among several proposed base-256 emoji encodings, base256emoji was adopted because it is the encoding already accepted into the multibase registry.

Used only for addresses, not other data

This standard does not recommend using base256emoji for other byte strings such as transaction hashes or calldata. Transaction hashes are not currently being spoofed, and calldata is best interpreted via its ABI. Using emoji only for addresses also has the side effect of making an address easy to spot among other information on screen.

Reference implementation and validation conditions

The Python reference implementation provides two functions, encode_address and decode_address. encode_address checks that the input is a string of length 42 starting with 0x, then converts it two hex digits at a time into emoji. decode_address checks that the emoji string has length 20, then converts each emoji back into two hex digits and prepends 0x. If the conditions are not met, it returns None. The original text also includes 9 test cases, such as 20 🚀 corresponding to an address of the form 0x0000...1fA1c.

A proposal still under review

The status of this ERC is Review. It has not yet been finalized and its content may change, so it is best to check the latest original text before implementing.

Things to watch out for

Original ERC · ← ERCs