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.

ERC-2544 proposes wildcard subdomain resolution for the Ethereum Name Service (ENS).

This article translates, summarizes, and expands on the following proposal.

More EIP explainers:

Overview

The original ENS name resolution process consists of two stages. An ENS client first applies the namehash algorithm to the domain name to obtain its node. It then queries the ENS registry contract to find the resolver associated with that node. If a resolver is configured, the client passes the same node to it to retrieve an address or another record.

If no resolver is configured, the original process stops. ERC-2544 proposes extending this behavior:

  • Remove the leftmost label of the domain name, such as alice from alice.example.eth, and compute the node for the remaining name, example.eth.
  • Query the ENS registry for a resolver associated with that node.
  • If one is found, use the original full name's node when requesting the record from that resolver.

Repeat the process until a resolver is found or the search is exhausted.

ERC-2544 also defines a unified resolve() method that enables more flexible name resolution.

Motivation

Wallet providers, exchanges, and dApps may want to issue personalized subdomains to their users, such as alice.wallet.eth. Configuring a separate ENS registry record for every subdomain is expensive for applications with a large user base.

Users would also have to wait for an on-chain resolver configuration transaction to be submitted and included in a block before using their subdomain, adding friction to onboarding.

Wildcard resolution allows a parent domain's resolver to dynamically produce records for subdomains without their own configured resolver. Examples include:

  • Returning a predicted contract address (a counterfactual address) computed using CREATE2.
  • Returning a fixed fallback address.
  • Implementing other dynamic resolution strategies.

The proposal does not require changes to the ENS registry or existing resolvers. Legacy ENS clients continue to behave as before, while newer clients can support wildcard resolution.

Specification

Definitions

  • namehash
    • The ENS name hashing algorithm defined by EIP-137.
  • dnsencode
    • DNS wire-format name encoding based on section 3.1 of RFC 1035.
    • The overall length restriction is removed. The empty name or root is encoded as a single zero octet.
  • parent(name)
    • Returns the name with its first label removed.
    • For example, parent('foo.eth') = 'eth'.
  • ens
    • The ENS registry contract on the current network.

For EIP-137, see the following article.

ERC-137: Understanding the Ethereum Name Service

Interface

ExtendedResolver.sol
interface ExtendedResolver {
    function resolve(bytes calldata name, bytes calldata data) external view returns(bytes);
}

A resolver implementing this interface is expected to return true when its supportsInterface() function is called with the interface ID. The historical draft reproduced in the original article uses the placeholder 0xTBD.

Finding a resolver

An ERC-2544-compatible ENS client searches for a resolver as follows:

  1. Initialize currentname = name.
  2. Retrieve the resolver using ens.resolver(namehash(currentname)).
  3. If the resolver is not the zero address, return it and stop.
  4. If the name is empty ('' or '.'), return null and stop.
  5. Otherwise, set currentname = parent(currentname) and return to step 2.

Name resolution fails if the search finds no resolver.

Resolving a record

Once a resolver has been found, an ERC-2544-compatible client resolves the record as follows:

  1. Prepare ABI-encoded calldata for the desired record function, such as addr().
  2. Call resolver.supportsInterface(0xTBD) to determine whether it implements the proposed extended interface.
  3. If supported, call resolver.resolve(dnsencode(name), calldata) and decode the result.
  4. Otherwise, use the ordinary resolver function call, such as resolver.addr(...), according to the historical proposal.

Important: the function and arguments passed to the resolver must be based on the original full name, not the ancestor currentname where the resolver was found.

Pseudocode

javascript
function getResolver(name) {
    for(let currentname = name; currentname !== ''; currentname = parent(currentname)) {
        const node = namehash(currentname);
        const resolver = ens.resolver(node);
        if(resolver != '0x0000000000000000000000000000000000000000') {
            return resolver;
        }
    }
    return null;
}

This function checks each successive parent name for a configured resolver, removing labels from the left.

javascript
function resolve(name, func, ...args) {
    const resolver = getResolver(name);
    if(resolver === null) {
        return null;
    }
    const supports2544 = resolver.supportsInterface('0xTBD');
    let result;
    if(supports2544) {
        const calldata = resolver[func].encodeFunctionCall(namehash(name), ...args);
        result = resolver.resolve(dnsencode(name), calldata);
        return resolver[func].decodeReturnData(result);
    } else {
        return resolver[func](...args);
    }
}

This function checks whether the resolver supports the extended interface and chooses the corresponding resolution method. It uses resolve() for an extended resolver and an ordinary function call otherwise.

These snippets are historical pseudocode, not a production-ready ENS client. In particular, the interface ID is a placeholder, and the ordinary record call must receive the original node when its ABI requires one.

For modern integrations, consult the current ENS extended-resolution specification (ENSIP-10) rather than treating this historical draft and its pseudocode as normative. In particular, wildcard lookup through a parent resolver requires support for the extended resolver interface.

Rationale

ERC-2544 aims to introduce wildcard resolution with minimal changes to existing ENS infrastructure. It reuses existing algorithms and registry operations, including namehash, to limit the implementation burden on ENS client developers and maintainers.

Wildcard resolution had long been requested by the ENS community. The proposal addresses scaling constraints and makes personalized ENS names more practical.

The new resolve() function receives the unhashed name in DNS wire format together with the calldata required for the record request. The resolver can inspect individual labels and implement dynamic behavior. For example, a name such as id.nifty.eth could be resolved to information about the owner of an NFT. A resolver given only the namehash cannot recover the original labels from that hash.

Resolvers that do not need dynamic behavior can retain individual record functions, such as addr(), without implementing resolve().

DNS wire encoding is used because length-prefixed labels can be extracted and manipulated efficiently. Dot-separated strings instead require scanning for delimiters.

Compatibility

Legacy ENS clients implementing EIP-137 do not support wildcard resolution and therefore cannot resolve records that depend on it. Clients supporting the extended resolution mechanism can handle both existing ENS records and wildcard records.

If a resolver also uses resolve() for directly configured names, it should continue responding appropriately to legacy clients calling ordinary record functions such as addr(). This helps preserve interoperability.

Security

Incorrect client behavior

An incorrectly implemented client could select the wrong resolver or proceed despite receiving the zero address when no resolver exists. Such mistakes can cause unintended behavior.

Accidental transfers with wildcard resolvers

A wildcard resolver may dynamically generate valid addresses for unregistered subdomains. Consequently, a mistyped name can still resolve successfully, increasing the risk of sending funds to an unintended recipient.

Applications should consider:

  • Validating names on the client side.
  • Designing recovery mechanisms where feasible for funds accidentally sent to dynamically generated addresses.

Applications that assume the absence of a subdomain resolver

Some applications might rely on a particular subdomain having no configured resolver. Wildcard resolution can violate that assumption by allowing an ancestor's resolver to return a record.

The historical proposal's authors were not aware of applications relying on this behavior, but it remains a possible compatibility consideration.

Citation

Nick Johnson (@arachnid), 0age (@0age), "ERC-2544: ENS Wildcard Resolution [DRAFT]," Ethereum Improvement Proposals, no. 2544, February 2020. [Online serial]. Available: https://eips.ethereum.org/EIPS/eip-2544.

Conclusion

ERC-2544 describes how ENS could support dynamically resolved subdomains by discovering a resolver on a parent domain and supplying the original name to that resolver.

Questions are welcome via Twitter @cardene777.

Other publications:

https://chaldene.net/