What Is ENS and How Does It Work?
In short, the Ethereum Name Service (ENS) is a distributed naming service you can use to interact with the Ethereum blockchain. But to truly appreciate the innovation ENS brought to the blockchain, you should first learn some DNS basics.
DNS stands for Domain Name System, which is best described as a decentralized system connecting domain names to IP addresses. This system’s infrastructure consists of DNS nameservers spread worldwide.
Let’s illustrate this with an example. If DNS didn’t exist, every time you wanted to visit YouTube, you would need to type an IP address in your browser. Quite inconvenient, right? Thanks to DNS, you don’t need to remember long strings of numbers and can simply use names instead.
What Is ENS?
Until recently, if you wanted to interact with a blockchain, you had to use long strings of numbers called wallet addresses. This is pretty ironic when you consider how advanced and future-oriented blockchain technology is usually.
That’s precisely where ENS came in and saved the day. Just like DNS, ENS connects names to addresses. In turn, you can register and use a simple name to get paid instead of having to send everyone your wallet address, for example.
Furthermore, since there is no limit to how many ENS domains you can have, you can create separate domains for each use case. For example, you might want to create one for your freelance business payments called nickvoiceacting.eth and another for storing NFTs called nicksnftcollection.eth.
How Does ENS Work?
It works very similarly to regular DNS, but with the addition of smart contracts.
ENS top-level domains (TLD) such as .eth are owned by registrars. These registrars are smart contracts that define rules for allocating domain names. By following those rules, anyone can become a domain owner.
The ENS architecture consists of two main components: Registry and Resolvers.
The ENS registry is a smart contract that stores all domain names and their most vital properties. These properties include the owner’s name, the resolver, and the TTL (time to live), for each domain.
Domain ownership can be assigned to either a user or a smart contract, and the owner can then change all three domain properties.
Once the registry maps a name to a resolver, the resolver then translates that name to an address. This resolving role can be performed by any smart contract as long as it adheres to relevant methods assigned by each record type.
Finally, there are two steps to the resolving process. The registry is first queried to find which resolver is assigned to the name, and that resolver then returns the relevant address.
Published version: Confidential
Task: Explain ENS in simple terms for our internal information system.