If you have browsed Twitter/other social media channels recently , you may have noticed few individuals with <some Text>.eth as tag in their profile. Ever wonder what that is?
The .eth addresses are similar to having an ownership of a domain - similar to a website. However, unlike websites corresponding to IP, .eth corresponds to the Public address of the Blockchain account.
ENS is a naming service built on top of Ethereum. It uses Smart contracts to create look-up directory & aims to make interacting with crypto projects simpler. The ENS is similar to DNS(Domain Name System) which helps resolves website name to IP addresses.
ENS is not intended to replace DNS instead become complementary to it. In the early days of internet , you had to type in the IP address( string of numbers) for accessing online resources. DNS provided a mechanism to only remember simplified texts ( www.google.com) instead of random numbers( 142.250.72.100). You can navigate to
https://dnschecker.org/ & type any domain in the “DNS look-up” section to view the IP address mapped for the domain.
Cryptocurrency applications requires you to similarly work with long numbers as your public address.
How does DNS work?
Every time you type a website name & press enter, the browser request for translation of the text name into IP address. Post availability of IP address only, the requests goes out to relevant server for resource request. DNS can be imagined as a large DB with 2 columns - Information(Domain name) & IP.
However, in order to create a new website or avail a new domain name, we need to make entry onto that Large DB as new row containing the website name as Information & its corresponding IP. This is where ICANN comes in.ICANN provides top level domains (.com or .org) to a separate entity called registrars who in turn sell the subdomains under such top level domains ( TLDs). ICANN & Registrars maintain this DNS DB as well.
As you can imagine, DNS records are stored on centralised servers & are vulnerable to attacks & censorship.
How does ENS work?
Each ethereum address represent an account & hence can have its own ENS name.
ENS is built on ethereum & hence added records are immutable. None controls ENS data at a centralised server & hence more secure & private compared to DNS.
ENS simply maps information to a name in a secure & decentralised manner.Essentially, your name of choice is mapped to your public address in an immutable & censorship resistance manner.
Once completed, the acquire names can be used to for sending cryptocurrencies to it.Similar to DNS, an owner can have subdomains under it. For example, Bikesh.eth can have subdomains such as wallet.Bikesh.eth, website.Bikesh.eth etc.
On a technical level, ENS is simply 2 smart contracts -
The registry which contains the mapping of “Name” to “informations” such as you public address. The registry has 3 pieces of information embedded- Domain Owner(an external user or a smart contract itself), Domain Resolver &Active time for the domain & its subdomains.
In summary , the registry itself is a smart contract which has ownership of certain domains( say .eth) & can issue subdomains under it( Bikesh.eth) as per specified rules. An owner can transfer the ownership to another or specifically assign owners for certain subdomains.
The resolver which resolves incoming translations requests for Names to Informations. For each record type you would want as Information to be stored ( say Ethereum public address , Content Hash), resolve must be implemented as per guidelines.
The names in ENS are 32 bytes hashes instead of the original Name text itself.This ensure that even if names are arbitrary & varying in length, in ENS the storage is standardised. Hashing provides security to the name itself.
The algorithm used for transforming “names” into hashes is called NameHash.
For a name, say Website.Bikesh.Eth, first the name is broken into individual labels after removing . from the name. hence, the 3 labels are - (Website),(Bikesh),(Eth).
NameHash is now applied on the labels. NameHash is defined recursively so that Hash of the subdomain can be derived from the hash of the parent domain and the name or Hash of the subdomain.
How do get my ENS Name?
In case you are newbie to crypto, probably using a wallet which allows you to select a ENS name while signing it.However , you will only receive the subdomain of an already owned subdomain by the Wallet provider. For example, argent owns argent.XYZ as domain & you will receive, say, Bikesh.Aregnt.xyz as your ENS name.
Alternately , you can directly obtain your own domain name, say, Bikesh.Eth & link it your wallet address.
ENS is technically NFT ( non-fungile tokens) . hence, you can transfer the ownership or even sell it on various NFT marketplaces for a price. In the early days on internet, fortunes were made around registering domains in advance on certain desired keywords & later selling it for a premium. We are likely to witness similar event for ENS domain names as well.
You can connect your DNS domain name as well directly to your ENS name. Hence, i can directly type my DNS name for receive or sending crypto currencies.
Follow the below steps to avail your own .eth domain :-
Go to ens.domains & click on “launch app” button. The below given screen will appear.
Type the text for your ens name - say angryman. it will first display if the name is available or not. Similar to DNS , if the domain is already owned by someone else, you will be unable to use that specific domain name.
As you can see, angryman is available for registration.
If we try for a very common or desired word, most likely it is already registered. For example, Satoshi.eth is registered till 04/05/2024.
For the available names, you can pay $5 per year for 5 + character eth names. For 4 & 3 character names, the charges are $160 and $640 per year respectively. This is because 4 & 3 character words are limited & hence more valuable.
However, registering the name is a transaction the ethereum blockchain & gas fee also needs to be paid.
You will need to select the number of years for which you would like to register. As you can see below, for 1 year - the charge is $5. however, due to high gas prices, the total cost comes to $183.25.
You can increase the number of years to any maximum number.Minimum is 1 year though.
The “request to register” button will be activated once your wallet with requisite ether balance is connected.
The registration itself is a 3 step process involving 2 unique transactions.First the intent to register ens name is professed without revealing the actual name itself. This is done to avoid front running attack from miners wherein they view the name & register it first instead.
The network then waits for 1 min.
The 3rd step can be completed within 24 hours of completion of first step.
Click on now activated “Register” button. Once transaction is completed, you are done with registration of name.
“Manage” button will appear at this stage.
After clicking on it, you will see that the address used for the registration has been assigned to the name already.
You can also go through this below video to understand the steps in detail.
The Decentralised Web
ENS or broadly decentralised naming services is a crucial component of Web3. Censorship resistance websites are key theme behind web3 & ENS along with IPFS( a decentralised file storage system) is aiming to make it reality.
You can go to https://almonit.eth.link/#/ to browse all the decentralised websites i.e. instead of a central server on a cloud, it is distributed across multiple computers worldwide. The above website can be accessed simply with domain almonit.eth if you have metamask enabled. Otherwise, as displayed above, .link must be added to to be able to access it with browsers.
Currently .eth as domain name is the most widespread. However, as the integration between ENS & DNS progresses, user will be able to port their DNS domain names on ENS seamlessly.Hence, you domain name ABCD.com can be linked to ABCD.Eth & even cryptocurrencies can be sent to it.
Alternate Decentralised Name Services
There are other decentralised naming services such as Namecoin, Blockstack & handshake.
Stats
Etherscan
Since ENS is deployed on ethereum as Smart contract & Smart contracts have its own address, you can view the transactions on publicly on https://etherscan.io/address/0x314159265dd8dbb310642f98f50c066173c1259b
Once you land here, you will be to view other chains wherein ENS is deployed as well. Notice the number 4 on text b below.
Once you click on it, it displays the other chains where it is deployed.