Introduction

Hi, I'm cardene, a software engineer and technical writer focused on blockchain and AI.

I've also authored Japanese technical books on specification-driven development with LLMs and decentralized application (DApp) development.

I also build and publish a variety of tools, libraries, and open-source projects.

This article covers ENSIP19, which proposes a consistent, secure way to resolve the relationship between addresses and names in ENS across Ethereum and EVM-compatible chains.

This article translates, summarizes, and expands on the specification below.

I have also covered various EIPs, BIPs, SLIPs, CAIPs, and ENSIPs.

Overview

ENSIP19 standardizes reverse resolution and primary name resolution for all coin types and defines a consistent resolution process across the multichain Ethereum ecosystem. Reverse resolution means looking up a human-readable name from an address, while primary name resolution determines the principal name associated with an address.

The aim is to standardize address identification so that Ethereum and its compatible chains (EVM-compatible chains) can use the same name consistently, regardless of which chain is involved.

Motivation

ENS was originally proposed as a way to resolve Ethereum addresses by name (ENSIP1).

See the following article for more on ENSIP1.

[ENSIP1] How ENS Registration and Updates Work

ENSIP9 subsequently introduced the concept of coin types, assigning a specific coin type to Ethereum addresses.

See the following article for more on ENSIP9.

[ENSIP9] How ENS Supports Multiple Chains

ENSIP11 also defined an algorithm for converting between chains and coin types.

See the following article for more on ENSIP11.

[ENSIP11] How ENS Identifies EVM Chains

Meanwhile, ENSIP3 proposed reverse resolution for Ethereum addresses, but there was no generalized reverse resolution mechanism for arbitrary coin types.

See the following article for more on ENSIP3.

[ENSIP3] How ENS Associates Names with Ethereum Addresses

As EVM-compatible chains have become widely used to scale Ethereum, a common default name is needed across the Ethereum ecosystem. This enables consistent identity resolution on any chain. In particular, because EVM-compatible chains use the same address format, chain-independent addresses are useful across Ethereum. Examples include externally owned accounts (EOAs) and deployment addresses determined by specific algorithms.

Furthermore, as smart contract accounts (SCAs) become more common and address derivation methods vary between chains, multiple addresses will often be associated with a single ENS identity. This creates a need for common reverse resolution and primary name resolution across Ethereum.

Specification

ENSIP19 standardizes primary name resolution in ENS to support Ethereum's multichain environment. Primary name resolution takes an address and a coin type as inputs and verifies the canonical name associated with that address. Ultimately, it determines whether an address can be reliably associated with a particular name.

Terminology

The inputs are address bytes (addressBytes) and a coin type (coinType). The address is represented in lowercase hexadecimal, and the coin type is a number defined by ENSIP9. Ethereum mainnet uses coinType = 60, and testnets such as Sepolia use the same number.

See the following article for more on ENSIP9.

[ENSIP9] How ENS Supports Multiple Chains

ENSIP11 allows a coin type to be derived from an EVM chainId (the identifier that distinguishes one chain from another). For example, chainId = 2 corresponds to coinType = 0x80000002.

See the following article for more on ENSIP11.

[ENSIP11] How ENS Identifies EVM Chains

The chainFromCoinType() function, which derives the chain from the coin type, is defined as follows. The original pseudocode retains its Japanese wording.

javascript
chainFromCoinType(coinType)
  if coinType == 60 → return 1
  if 0x80000000 ≤ coinType ≤ 0xffffffff → return coinType ^ 0x80000000
  それ以外 → return 0

For example, Ethereum mainnet uses coinType = 60 → chainId = 1, while coinType = 0x80000002 → chainId = 2.

Algorithm Flow

Primary name resolution consists of two stages.

Reverse Resolution

The first stage looks up a name from an address. A reverse name (reverseName) is constructed according to the coin type.

  • Ethereum (coinType = 60) [addressAsHex].addr.reverse
  • Default chain (coinType = 0x80000000) [addressAsHex].default.reverse
  • Other coin types [addressAsHex].[coinTypeAsHex].reverse

The system computes the namehash of this reverse name and calls INameResolver.name to retrieve the name. If no name is registered, the address is considered to have no primary name. The system also checks whether the retrieved name actually resolves to the same address.

Forward Resolution

The second stage resolves the name obtained through reverse resolution back to an address and checks whether it matches the input address. A name is accepted as the primary name only when both the reverse and forward resolution results agree.

The call differs depending on the coin type.

  • Ethereum: IAddrResolver.addr(node)
  • Other coin types: IAddressResolver.addr(node, coinType)

If the resolved address does not match the input address, the address is considered to have no primary name.

Multichain Support

The design is intended to work consistently not only on Ethereum itself but also across EVM-compatible chains.

A default reverse registrar (default registrar) is deployed on L1 (Ethereum mainnet) to manage a default name shared across chains. Individual registrars may also be provided for particular chains. In particular, rollup chains that post state to L1 have their own chain-specific resolvers.

For example, a chain with chainId = 2 uses the following name.

text
b8c2c29ee19d8307cb7255e1cd9cbde883a267d5.80000002.reverse

If the resolution result matches the address, that name is the primary name. If the chain is not a rollup, the default resolver handles the request instead, applying the default name.

Default Address Handling

Under the compatibility rules of ENSIP9, the default address is returned when no address has been registered for a particular coinType. Specifically, when chainFromCoinType(coinType) > 0, if addr(node, coinType) has no value, the result of addr(node, 0x80000000) must be returned.

Compatibility

Relationship with ENSIP10

ENSIP19 does not modify the resolution procedure of ENSIP10 itself. The established name resolution process is unchanged, so systems that support ENSIP10 can continue to use it. The difference is the introduction of a new registrar (a name management contract).

See the following article for more on ENSIP10.

[ENSIP10] How Automatic Subdomain Resolution Works in ENS

Handling the ENSIP3 Reverse Registrar

ENSIP3 performed reverse resolution by assigning a resolver to [addressAsHex].addr.reverse. However, ENSIP19 recommends replacing it with a more flexible resolver that supports defaults. If the old resolver remains in use, it cannot fall back to the default name. The resolver must therefore be updated to a default-aware version or unset.

Default Addresses and Existing Resolvers

Many existing resolvers do not support default address handling. Adding such support requires redeploying the contract. Alternatively, manually registering the same address for all coin types can reproduce the behavior of a default. This maintains compatibility with older implementations.

Deprecation of Reverse Name Avatars

ENSIP12 introduced a mechanism for setting an avatar based on a reverse name even without an ENS name. However, this mechanism has seen very little use. ENS names can now be obtained for free, reducing the barrier to having an ENS name and making this mechanism unnecessary. As a result, new reverse resolvers do not support the text() function or avatar configuration.

See the following article for more on ENSIP12.

[ENSIP12] How ENS Provides Centralized Avatar Management

Removing the Convention of Using Mainnet as the Default

ENS has historically followed an implicit convention of using the mainnet address as the default for other chains. This is prone to misunderstandings and is particularly dangerous now that smart contract accounts (SCAs) are widespread. For example, an SCA on mainnet cannot necessarily use the same address on another chain. Clients must therefore remove mainnet-as-default behavior entirely.

Risk in a Practical Example

Consider user A attempting to send assets from chain C to user B. User B has an SCA on mainnet.

  1. User A enters user B's mainnet address.
  2. The application displays the mainnet primary name associated with that address, and user A proceeds with the transfer, believing it is safe.
  3. However, SCAs may be created differently on different chains, and there is no guarantee that the same address can be used on chain C.
  4. As a result, the assets are sent to an address user B cannot access and become unrecoverable.

To prevent this situation, mainnet addresses must no longer be treated as the default for other chains.

Conclusion

This article covered ENSIP19, which proposes a consistent and secure way to resolve relationships between ENS addresses and names across Ethereum and EVM-compatible chains. I hope this explanation was helpful.

If you have any questions, feel free to contact me via Twitter DM.

Twitter @cardene777

I also publish content on other platforms.

https://chaldene.net/