The main purpose of the Ethereum Name Service (ENS) is to convert machine-readable identifiers like Ethereum addresses into human-readable names.
The web began as a decentralized system based on DNS that allowed anyone to buy, own and manage their domain name and move it from one host to another as needed, with complete control and ownership of all underlying data. But how does a decentralized Web3 naming service work?
The community has shown great interest in ENS, a new naming service built on top of Ethereum. The Ethereum Name Service is a Web3 blockchain system that allows users to set up their own unique and memorable usernames.
Therefore, ENS intends to provide a complementary solution to DNS by using Ethereum smart contracts to govern domain name registration and resolution. The service allows you to assign a single name to all your wallet addresses and decentralized websites (DWebs). “alex.eth”, for example, lets you recognize and quickly find wallet addresses in a distributed environment.
The registry, registrars, and resolvers are three types of smart contracts in ENS, as explained in the following sections.
A single smart contract performs ENS registration and keeps track of all domains and subdomains. The system has been deliberately kept simple, and its sole purpose is to associate a name with the resolver responsible for it. It also stores the following three important data:
- The domain owner: An external account or smart contract can be the owner of the domain. The domain owner can update the resolver and TTL of the domain, transfer ownership of the domain to another address, and change the rights of subdomains.
- Domain name resolvers: The process of converting names to addresses is handled by resolvers. Any contract can become a resolver if it follows certain guidelines.
- ENS Namehash: ENS stores names as hashes generated using the “namehash” method. The name hash is calculated by combining the hash of the top-level part of ENS domain names (known as the “label hash”) with the name hash of the other parts, and then hashing it again.
A registrar is a smart contract that owns a domain name and can assign subdomain names to users depending on rules (e.g. payment). The ENS team used the Vickrey Auction Registrar and the permanent registrar for .eth name registrations.
On May 4, 2017, the ENS team released a smart contract that implements a Vickrey auction to register names longer than six characters. The Vickrey auction is a type of sealed auction where buyers bid without knowing how many other bidders have bid and the auction winner is the highest bidder who only has to pay the second highest amount.
On May 4, 2019, the ENS team introduced the “permanent registrar” instead of the auction registrar for registering names longer than six characters. Perpetual registrar is designed to run indefinitely until the registrar contract is replaced due to a fatal error. Changed the way .eth names are billed to an annual rental payment model where each name is charged $5 per year.
Together with the permanent registrar, the idea of the registrar controller was developed so that name holders could delegate name management. As a result, a Registrar Controller registered Name Resolver and Name Records can be configured as part of the registration transaction, simplifying the process.
Another auction called Short Name Auction for remaining short names with a length of 3-6 started in September 2019. The ENS team used OpenSea, a well-known crypto asset marketplace, as the auction platform, with the English auction as the auction method.
Bids in an English auction are public and bidders can submit numerous bids. The highest bidder gets the name, and the number of deposits equals the first year’s registration fee, which differs significantly from the Vickrey auction period.
The name-to-record mapping is stored in the resolver. The “public resolvers” implemented by the ENS team have eight categories of datasets by default (see image below), but ENS can store any dataset.
The ENS name resolution process is two-stage. First, the user who wants to resolve the name must search the registry for the relevant resolver and then retrieve the resolver’s resolution results.
https://cointelegraph.com/explained/the-concept-and-future-of-decentralized-web3-domain-names Concept and future of decentralized Web3 domain names