One of the projects on Ethereum that is rapidly gaining prominence in the crypto world is Ethereum Name Services (ENS).
Ehe objective of this project is to build a fully decentralized domain registration system (DNS) and sovereign identity. To do this, ENS makes use of Ethereum technology and ERC-721 tokens to create a single directory of identities and data that can be publicly consulted and verified.
But what is behind all this? How can it help us and how can this project change the way we interact with blockchain and services outside of it?
Beginnings of the Ethereum Name Services (ENS) project
Before delving into the ENS, it is necessary to first know what a DNS is. The DNS system is one of the fundamental technologies in the functioning of the Internet. Thanks to this system we can quickly find the IP address of a service or web page that we want to access.
Let us remember that there are billions of connected devices on the Internet and each of these devices communicates with another through an address that is possible using the TCP/IP protocol. TCP is a data transmission protocol, that is, it allows the computer to know how, when and in what form to send data to another computer connected to the Internet. While IP (Internet Protocol Address), is a series of numbers that uniquely identify each computer on that network.
These IP addresses (at least in version 4 or IPv4, since IPv6 are completely different), are written as four sets of numbers ranging from 0 to 255, using the format xxxx Thus, for example, a valid IP for a computer would be the IPv4 address, 142.250.64.142, which belongs to YouTube.
But how is it possible that "youtube.com" becomes 142.250.64.142? Well, that is where the DNS come into action, since they act as if it were a telephone directory or platform that is dedicated to translating the names of a website into an IP with which to locate the web server. This allows users to quickly and easily access services hosted on servers connected to the Internet. And, just like numbers in a phone book, IPs must be registered so that they can be located and delivered to whoever requests them. This is how the DNS is the "Internet address book", a very practical guide, because if it did not exist we would have to remember all those numbers to be able to access our favorite sites.
Now, this thing about DNS and the IP addresses they store is a lot like blockchain networks. Think about it for a moment: when you send cryptocurrencies to an address this could be translated into “get the money you send to X given address”. And while it's not about sending data from one node to another specific node, the concept can be extrapolated to be useful to us in other ways. For example, a DeFi protocol is made up of hundreds of smart contracts, smart contracts that interact with others, each with its own address. This makes it a complex task to maintain this entire system, because after all we are used to simply reading words, but not cryptocurrency addresses like it would be: 0x9d74a588ee218ce229becb41bcca40b38a96d836, let alone hundreds of them.
In that case, why not register readable names and associate them with a specific address in order to facilitate this task? That is precisely what ENS does. Ethereum Name Service (ENS) was born as a large decentralized system that works on Ethereum and its function is the same as a DNS. Basically, it serves as a great notebook or container for any information. An information that is stored in the Ethereum blockchain and that we can reference and search freely and without censorship.
Ethereum Name Service is a project that began in 2016 promoted by Nick Johnson and Alex Van de Sande. However, it was not until April 2018, when the service was publicly launched. Since then ENS has become one of the largest sovereign identity and DNS services in the crypto world.
Goal of the Ethereum Name Services (ENS) project
The main objective of Ethereum Name Services (ENS) is to provide the necessary infrastructure for the construction of much more accessible and easy-to-use Web 3.0 services, along with the construction of an infrastructure that serves to control sovereign identity, personal blockchain addresses or business.
Thus, just as the DNS became a fundamental part of the Internet, ENS seeks to become a fundamental part for the construction of Web 3.0 and its services, being a decentralized hub that allows the connection of different parts of the network to take advantage of the full potential of Web 3.0 technology, while improving its security and ease of use.
Why do we need DNS over blockchain?
However, this objective of ENS leads us to ask ourselves the question: Why do we need DNS services on blockchain? We know that a blockchain is an accessible, verifiable and decentralized data structure. Thus, network data is replicated to each network node without the need for a central authority. Everyone has the possibility to read its content, add data and even join the network.
In the current DNS system this works in a more or less similar way, except that the system is not fully centralized, but federated. Thus, each network (formed by ISPs or Internet Service Providers) is capable of executing DNS services on which its users depend. In a few words, ISPs have full control of the DNS and therefore of what their users can or cannot access from their networks.
Hence, in many governments or companies, the easiest way to censor something "annoying" is by rewriting the DNS records that users can access to deny them access to the site or service they are looking for. This is a bug in the Internet DNS system, a known bug that has no solution, except changing the DNS or running your own, although this is not a complete solution, since:
- In the first case, you continue to depend on a third party.
- Running a fully authoritative DNS server is complex and doesn't save you from a determined government or company simply banning your access to the DNS replication service you use.
This is where DNS over blockchain comes into play. Since all the DNS information is recorded in the blockchain, it is enough to run a complete node of the network, to have access to all the DNS records that are stored in said blockchain. You can explore and use those logs whenever you want, and keeping them up to date depends only on keeping your node connected. Also, you can use a VPN, services like Tor or I2P, SSH Socks5, Proxies or any other means to keep that synchronization active at all times, even if the company or government uses active and passive means to avoid it.
After all, blockchain technology fulfills several DNS needs, among which we highlight:
- Availability. A decentralized, peer-to-peer network cannot be stopped. It could replace or complement Anycast infrastructures.
- Integrity. The consensus protocol of a Blockchain guarantees, by nature, the integrity of the data. In addition, the data cannot be modified. These properties would eliminate the need for DNSSEC and its famous key renewal ceremony.
- Confidentiality. Requests made to read Blockchain data can be encapsulated in an HTTPS channel. This works in the same way as the DNS over HTTPS (DoH) protocol. Today there are few DoH resolvers, so the traffic is centralized around a limited number of actors. The use of a Blockchain would offer the possibility of querying any node in the network, thus limiting centralization and SPF (single point of failure).
- The data included in the DNS zone files, i.e. the configurations of the domain names, could therefore be distributed on a blockchain. Thus, each actor (registries, registrars) could interact directly with this blockchain to manage domain names. This is the idea of DNS in Blockchain.
- Ability to create new zones and domains, and work in a complementary way to the current DNS system. Using this technology, it is possible to associate additional domain names to the existing ones and it is even possible for the system to complement the current DNS. Domain names (TLDs) such as .bit, .zil, .crypto, .eth, are just a sample of this ability. In addition, technologies equivalent to DNSSEC or DoH can also be used to ensure the adequacy of data and services.
How does Ethereum Name Services (ENS) work?
Ethereum Name Services (ENS) works thanks to a series of smart contracts on the Ethereum blockchain. The system is quite simple: ENS smart contracts allow users to interact with the system through a powerful DApp in which they can capture all the data they want to register within the system.
Thus, in a nutshell, ENS is autonomous from its own base of operation. ENS allows direct interaction between users and the registration system, allowing the registration of domain names, addresses and other data, directly, and translating all this data into natural language.
The structure of the Ethereum Name Service (ENS)
ENS owes its operation to three points, which are:
- ENS Registry
- solvers
- Register
The purpose of the ENS Registry is to maintain a list of the domains and subdomains registered in the system. Basically, it is in charge of controlling the storage of information to avoid the existence of two domains using the same name, but pointing to two different addresses. Basically, this system is a domain manager and is responsible for maintaining the first line of security within the system.
On the other hand, the Resolver is a series of smart contracts. Its function is to search for resources associated with domain names. In other words, a Resolver is in charge of receiving the search request for a domain name, carrying out said search and granting the data that has been stored in the system. Thus, Resolvers seek to direct traffic and take us to the resources we want. These resources associated with domain names can be from a contract address, a hash, or IP addresses, among others.
Finally, we have the Registrars, which are the smart contracts that own the domains and issue subdomains of the domains to the users following a set of rules defined in said contracts.
How to use Ethereum Name Services (ENS)?
Using ENS is quite simple, just have a MetaMask wallet configured and enter the ENS DApp.
From there, if you want to register a domain or identity, you simply have to indicate the identity to register (eg: bit2meacademy.eth) and it will appear:
In this case, as you can see, the address to register is available and the cost of a registration. For example, for 1 year, that cost is $16,52 and must be paid in ETH. From here you can register the name you want, you just have to enter the name and click on “Request To Register”. This begins the beginning of the registration of the domain you wish to register.
At this point you will only have to complete the payment of the commission and the registration payment to finish the process.