ERC-8117 Leading-zero compressed address notation (Anti-Poisoning Compact EVM Address Format)
Draft · Accounts & wallets · created 2025-12-30
A notation convention that compresses long runs of leading zeros in an EVM address into a count, as in 0x0₁₁, so that fake addresses that match only at the start and end but differ in the middle (address poisoning) can be distinguished at a glance.
Why it is needed
Because wallets display addresses in truncated form, such as 0xd28b… 6922, showing only a few characters at the start and end, users develop a habit of checking only those few characters. Attackers exploit this habit by generating, within seconds, fake addresses that match only at the start and end while the middle 32 characters are completely different, and planting them in the victim's transaction history via zero-value transfers. If the victim copies an address from their transaction history and sends funds, the assets go straight to the attacker. This is becoming harder to detect because gas optimization and CREATE2 address mining are producing more addresses with 7, 11, or 14 consecutive leading zeros, and counting zeros by eye is error-prone and tedious. One real incident caused $68 million in losses, and losses across the ecosystem as a whole have accumulated to hundreds of millions of dollars.
In depth
Trigger condition for application
It is RECOMMENDED (SHOULD) to apply this notation when there are 4 or more leading zero nibbles (n≥4) after 0x. n is the total count of zeros from the start of the address body up to the first non-zero nibble. This standard covers only leading zeros; repeated characters in the middle or at the end, or repeated non-zero characters, are out of scope. However, the industry is encouraged to follow the same subscript and parenthesis convention in those cases as well.
Subscript notation (Mode A)
After 0x0, append n using a Unicode subscript digit (U+2080 to U+2089), followed by the rest of the address. For example, 0x000000000004444c5dc75cB358380D2e3dE08A90 (11 leading zeros) is displayed as 0x0₁₁4444c5dc75cB358380D2e3dE08A90. This is recommended for environments that can render Unicode, such as wallets, block explorers, and mobile apps.
Parenthesis notation (Mode B)
A method of appending (n) after 0x0 using ASCII parentheses. Example: 0x0(11)4444c5dc75cB358380D2e3dE08A90. This is recommended for environments where Unicode rendering is not guaranteed, such as developer consoles, log files, copy-paste, and trading bot alerts. This notation is already a de facto standard used in trading bots and messenger alerts.
Case sensitivity and EIP-55 compatibility
Compression is applied only when the ASCII characters are completely identical, and cannot be applied to sections with mixed case (e.g. aAaA). The uncompressed remaining characters retain their original case exactly, preserving EIP-55 and EIP-1191 checksum integrity.
Backward compatibility and safeguards
This standard is only a display-layer rule and does not change the address data itself. Wallets MUST revert the compressed notation back to the original hexadecimal before signing or sending a transaction. Since parentheses and Unicode subscript characters are not valid hexadecimal characters, if a user pastes a compressed address directly into a legacy system, it is rejected as an input error rather than being processed as an incorrect address.
Rationale for the threshold and choice of subscript/parentheses
When there are fewer than 4 leading zeros, they are easy to count by eye and the benefit of compression is small; once there are 4 or more, reliable visual verification becomes difficult, so the threshold was set at 4. Subscripts were chosen because they match the established convention of denoting a 'count,' as in the chemical formula H₂O, and do not conflict with the exponentiation meaning of superscripts. Parentheses were chosen because they were already in use in trading bot and messenger alert notation, and unlike curly braces, they are not specially interpreted by shells, making them safe for copy-paste.
Proposal status
This proposal is currently in Draft status, not yet finalized, and its content may change or be abandoned.
Things to watch out for
- Ensuring notation legibility: Subscript or parenthesis notation must render clearly and legibly. If it is too small or faint, the purpose of this standard is undermined.
- Preventing confusion between subscripts and regular digits: 0x0₇ must not look like 0x07 due to the font or rendering method; a font that clearly distinguishes subscript digits from regular digits must be used.
- Validating pasted input values: Applications that accept address input should prioritize standard hexadecimal parsing, and inputs containing parentheses or subscripts should either be decompressed before processing or rejected as invalid input.
- Entropy preservation: This standard applies only to the low-information leading-zero segment; the remaining non-zero nibbles, which carry the address's uniqueness, are always displayed in full, preserving the information needed for security verification.