Ethereum Name Service – How it works

In this Ethereum tutorial, we will discuss the importance of Ethereum Name Service. Additionally, we are going to cover the following topics in this tutorial.

  • What is Domain Name System
  • What is Ethereum Name Service
  • Who developed the Ethereum Name Service?
  • History of Ethereum Name Service
  • How Ethereum Name Service Works
  • Architecture of Ethereum Name Service
  • Process of buying an ENS name
  • Introduction to ENS DAO
  • What is ENS Token

What is Domain Name System

All information that we are accessing through the internet is stored on some device. Every device available on the internet has a specific IP address. And this unique address allows other internet-connected devices to locate and access information.

Now, it is quite difficult for humans to remember each numeric IP address. So, here comes the use of DNS, which stands for Domain Name System.

DNS helps to converts human-readable domain names such as into numeric IP addresses such as that devices use to communicate.

What is Domain Name System
DNS Example

Consider the whole Domain Name System as a phone book for the web that manages the mapping between numbers and names. DNS servers convert name requests into IP addresses, allowing users to choose which server they want to visit.

Read Ethereum Wallets & How Ethereum Wallet Works?

What is Ethereum Name Service

Similar to how the Domain Name System helps to use the human-readable names for access to any device on the web.

The Ethereum Name Service is a decentralized solution to access addresses on the Ethereum network.

The Ethereum Name Service is an Ethereum based, open, distributed extendable naming system.

The goal of ENS is to translate human-readable names like ‘john.eth‘ into machine-understandable identifiers like Ethereum addresses.

Ethereum Name Service Example
Ethereum Name Service Example

However, ENS is not just a smart contract on Ethereum; it is a complete Decentralized application that provides naming services.

Moreover, ENS is also accompanied by a set of DApps for registering, managing, and bidding names.

Read What is Mining in Ethereum and How does Ethereum Mining Works

Who developed the Ethereum Name Service?

Nick Johnson proposed ENS on April 4, 2016. And the development of Ethereum Name Service also started in early 2017 under Nick Johnson in Ethereum Foundation.

However, in 2018, ENS became a distinct organization and is managed by the Singaporean non-profit True Names LTD.

History of Ethereum Name Service

In this section, we will deep dive into the history of ENS and understand how it came into existence.

Even before the existence of Ethereum, Namecoin was created with the goal of creating a Decentralized Domain Name System. It was started as an open-source experiment that aims to improve certain internet infrastructure components including DNS.

However, in “Ethereum White Paper” from 2013, Vitalik Buterin highlighted a decentralized naming system similar to Namecoin as one of the conceivable applications that may be built on Ethereum.

After some time, Nick Johnson suggested an Ethereum Name Service proposal in EIP 137 in April of 2016. And after one year, the first version of ENS was released on May 4, 2017, and become a huge success.

In 2019, ENS went through many updates. For example, it started supporting decentralized websites built on the IPFS and Swarm. ENS also enabled multi-coin compatibility in October 2019, allowing users to save any cryptocurrency address.

Moreover, ENS also provided functionality for users to generate their text record keys in March 2020.

Read Ethereum Nodes and Clients

How Ethereum Name Service Works

Now that we got a clear idea about the origin of Ethereum Name Service, next it’s time to learn how Ethereum Name Service works.

However, to understand the working of Ethereum Name Service, we need to understand the architecture of ENS.

Architecture of Ethereum Name Service

The Ethereum Name Service consists of two main elements, the first is the ENS Registry, and the second is the Resolvers.

However, both of these components are Ethereum smart contracts. Let’s discuss each component in detail.

Architecture of Ethereum Name Service
The architecture of Ethereum Name Service

1. ENS Registry

As discussed earlier, the ENS registry is a smart contract that keeps track of all domains and sub-domains registered on ENS. Moreover, it also retains some crucial details regarding each domain. These details include:

  1. The domain owner
  2. The domain’s resolver
  3. The amount of time it takes for all entries in the domain to be cached.

The domain owner can either be a smart contract or an external user account. Moreover, a domain owner has the ability to change domain and subdomain ownership and even configure TTL and resolver.

In a nutshell, the ENS registry is purposefully simple, with the primary purpose of mapping a name to the resolver.

2. Resolvers

Resolvers are the second most important component of Ethereum Name Service. And these are smart contracts that are in charge of converting names into addresses.

Moreover, in ENS, any smart contract that follows the appropriate criteria can operate as a resolver.

To serve records of different types like IPFS hash or cryptocurrency address, a resolver needs to perform some methods. However, the resolvers and ENS registry do not require any modification for any new record type.

In ENS, the process of resolving a name just includes 2 key steps.

  1. First, find out which resolver is in charge of the name
  2. And then query that resolver for the answer

Namehash in ENS

Now, using the human-readable names with the ENS could be inefficient. So, Ethereum Name Service uses 256-bit cryptographic hashes instead of human-readable names.

And for this, ENS utilizes Namehash, a procedure to extract the hash from a name while maintaining its hierarchal features. So, instead of using john.eth, ENS will use the Namehash of john.eth that is “0x94d585592f8147856d80df2b7fa04d7f1ae8d031403445a2fdda50b752a1f29b.”

Namehash helps to create a unique hash of any legitimate domain. Moreover, it is also feasible to derive the namehash of any subdomain without evening handling the original name.

And this attribute enables ENS to provide a hierarchical system without having to deal with human-readable text strings.

Read What is Cryptocurrency

Process of buying an ENS name

After understanding how Ethereum Name Service works, next, we will discuss the process of buying an ENS name.

The whole ENS system works in a completely decentralized manner on Ethereum. And the distribution of new domains under the “.eth” top-level domain (‘ethereumdots.eth‘) is managed via an auction system. Moreover, anybody can participate in the auction to reserve a domain.

To assign new names, ENS uses the “Vickery auction” mechanism, and this mechanism mainly consists of 3 phases.

Process of buying an ENS name
Process of buying an ENS name
  • Bidding Phase:
    • The whole process starts when an individual places a bid on a name they want to buy in an auction.
    • This begins a three-day clock for other individuals to bid on the name.
    • During this time, bid information is hidden and no one can see the name and amount of the bid.
  • Reveal Phase:
    • Following the conclusion of the three-day auction, a two-day “reveal” phase begins.
    • During this time, all bidders must reveal the contents of their bid; if they don’t, their entire bid will be lost.
    • However, if someone’s bid isn’t the highest, they’ll get their money back, minus a 0.5 percent charge that will be burnt.
  • Declaring the winner:
    • The individual who reveals the highest bid at the end of the two-day reveal window is declared the winner.
    • Moreover, they only have to pay the second-highest bidder’s sum. This sum is assured under a contract for the duration of the successful ownership of the name.
    • However, to get a refund, the winner has to allocate control of the name in ENS and also issue a “finalize” transaction.

Read Introduction to Solidity

Introduction to ENS DAO

Ethereum Name Service (ENS) is a community-owned and operated public utility. However, ENS recently took a big step toward becoming a decentralized autonomous organization (DAO).

And for this implementation, they are distributing $ENS tokens to every ENS domain holder who held the domain on or before October 31st, 2021.

But before understanding what is ENS DAO, we should understand what is a Decentralized Autonomous Organization.

A Decentralized Autonomous Organization (DAO) is an organization that follows a decentralized structure, and there is no central authority. The foundation of a DAO is open-source code that is owned by the organization’s members.

And the organization’s rules and policies are put into the code. Therefore there is usually no management structure or board of directors.

Now, to update the code, the DAO conducts a community voting. And this allows DAOs to improve and grow over time.

In the case of ENS DAO, it utilizes a delegation model as the core foundation. In this model, voters select their representatives as delegates.

And with this, individuals can then present their improvements to other users, who can help them by delegating their tokens.

Read What is Bitcoin and how does it work

What is ENS Token

As discussed in the previous section, the Ethereum Name Service is becoming a decentralized autonomous organization (DAO). And for this, ENS is distributing its token commonly known as $ENS tokens.

A $ENS token is an Ethereum based governance token for a decentralized autonomous organization (DAO). And it will push ENS support forward while keeping it open and decentralized.

Now, those who held ownership of ENS domain names will receive a quarter of the total ENS token supply as an airdrop. However, the token amount will be determined based on multiple factors like the length of time someone had an ENS domain.

Moreover, the ENS tokens were also retained in large quantities for their community treasury, core contributors, and other parties in much smaller numbers.

So, in this tutorial, we have discussed the importance of Ethereum Name Service. Additionally, we also covered the following topics in this tutorial.

  • What is Domain Name System
  • What is Ethereum Name Service
  • Who developed the Ethereum Name Service?
  • History of Ethereum Name Service
  • How Ethereum Name Service Works
  • Architecture of Ethereum Name Service
  • Process of buying an ENS name
  • Introduction to ENS DAO
  • What is ENS Token

Related Ethereum tutorials: