.png)
https://levelup.gitconnected.com/why-you-need-a-eth-domain-name-b16762fd16b4
Created with Canva Design. Credit: Author.
I was learning about applications of blockchain technology, how smart contracts, third-gen cryptos, and IPFS work, then I came across the Ethereum Name Service (ENS). The idea of ENS seemed pretty obvious to me, but I found that only a few people actually use it. So, I took it upon myself to share it with the world and save them some money and time.
In the early days of the internet, users had to type a long string of characters just to visit a webpage. This IP address looked something like this 142.250.183.46 Can you recognize which website it is?
That’s google. Copy that address and paste it in a browser to confirm.
Domain Name Service (DNS) provided a way to convert the human-readable address to a long, unreadable string of IP address that is readable by the computer. These services keep a track of all the domain names and provide the right IP address when requested.
Where does ENS come in?
The same problem which plagued the early web haunts web 3.0 now. To transfer crypto from one account to another requires a relatively long and cryptic address, which is impossible to remember and easy to mess up.
Unlike visiting websites, where if you mess up the IP address you can retype it again with no consequences; if you mess up the crypto address, you can lose the transferred amount. What’s worse is that now the recipient is angry because he did not receive the payment, and now the sender is broke.
The Ethereum Name Service (ENS) is a distributed, open, and extensible naming system based on the Ethereum blockchain.
ENS is a lookup system that converts the long unreadable address to something like shubhpatni.eth (you can actually send some eth there 😉). So, you can send ETH or any other cryptocurrency registered by the recipient to this address, and it will automatically send the money to the desired crypto account.
Note: Make sure to check if the recipient has registered the address for the cryptocurrency you want to send. You can check it by visiting https://app.ens.domains/name/{reciepient_name.eth}
ENS has a registry smart contract that keeps track of all domain names, sub-domains, owners, resolvers, etc, and allows the owner to change this data. The registry is the backbone of ENS.
The other key component of ENS is the resolver. Resolvers are responsible for translating names into addresses. So, a resolver must handle different types of data such as cryptocurrency addresses, IPFS content hash, user profile, avatar, etc. If need be, we can also add other data types through the EIP standardization process, with no changes in the ENS registry or any other resolvers.
How resolver and registry work together?
Getting data from ENS is a two-step process. First, we need to find the correct resolver from the registry. To do this, we pass the ENS domain name to the register, which returns the address of the resolver. Now, we ask for the desired data from this resolver.