ERC-4972 Name Owned Account (NOA) (Name-Owned Account)

Draft · Accounts & wallets · created 2022-04-04

A standard that links one smart contract account to each human-readable name in a name service like ENS, letting the name owner deploy and control that account.

Why it is needed

A name by itself cannot carry any context. In current name services, a name merely points to an address and cannot itself hold assets or information. This standard is an extension of name services that aims to give names rich context by providing each name owner with a smart contract account ready for immediate use. This would make it possible to hold assets and information on behalf of a name node, and open up new use cases such as transferring that account and its assets and information together whenever ownership of the name node is transferred. It also proposes that this could help with the broader adoption of smart contract accounts.

What to implement

In depth

The three components of an NOA

An NOA consists of three parts. First, a human-readable name as defined by ERC-137. Second, an owned account, a smart contract account whose address is derived from the name. Third, the owner of the name, who can deploy and operate that account. The ownership structure is that the name owner owns the name node, and the name node owns the owned account, with this ownership guaranteed by the name service.

The name service side interface, INameServiceRegistry

The core interface a name service must support is INameServiceRegistry. The function ownedAccount(bytes32 node) takes a name node and returns the address of the account owned by that node. It handles the forward lookup from name to account.

The account side interface, INameOwnedAccount

The interface an owned account must support is INameOwnedAccount. name() returns the name node mapped to this account address, and nameService() returns the address of the name service contract where that name is registered. To achieve a one-to-one mapping from name to NOA, each NOA must hold its own name node information, and these two functions allow tracing back from the account to the name node and performing operations such as verification at the name service. Through this, an NOA can be traced back to the actual owner who owns the name node.

Deterministic address generation based on CREATE2

Creating an NOA is handled by a factory contract, which may be the name service itself. Deployment must use CREATE2, not CREATE. For the address to remain deterministic, all NOAs must share the same initcode and the same factory contract. Using the name node as the salt guarantees a one-to-one (bijective) correspondence between a name and its owned account.

Compatibility with ERC-137

Names under this standard follow the scheme defined by ERC-137 (the ENS naming system), and the name registry interface is compatible with ERC-137. It is structured as an extension layered on top of existing name services.

Note on proposal status

This ERC is in Draft status. Since it is a proposal whose specification may still change, you should check the latest original text before implementing or referencing it.

Original ERC · ← ERCs