Ethereum Name Service Explained


Written by:

(tonal music) – In this lesson we’re
going to learn about ENS, or Ethereum Name Service, and
how it helps us provide more human readable names for our dapps. ENS is a project within the
Ethereum dev community, whose goal is to create
a decentralized domain name registry for the decentralized web. Today, we use DNS servers
to resolve our dot com domain names to IP addresses, but a centralized name registry
like DNS, is vulnerable to spoofing and denial of service attacks. Since ENS is built on top
of the Ethereum block chain, it is decentralized
and doesn’t suffer from the same vulnerabilities and DNS. ENS started out on the
Ropsten Testnet, but launched on the mainnet in May 2017. The initial proposal describing
ENS and its registration spec, are EIP137 and EIP162 respectively. The Ethereum address of
the main ENS contract is visible on their website,
and we can even go and take a look at its source code on etherscan. One thing to note in the
source code, is that ENS actually maps hashes of
domain names to addresses, not the actual domain name itself. This is to prevent spamming
when registering a new domain, as the name is
never visible in the contract, only it hash. This is also a storage
optimization because hashes take up a constant amount
of space, no matter the length of the domain name. ENS is used to resolve human
readable dot eath domain names to Ethereum account
addresses, smart contract addresses, IPFS or swarm
contact hashes, and even more interesting use
cases in the future that we haven’t thought of yet. ENS domain names will be
a big step in bringing mass adoption, as dealing
with long hexadecimal strings can be daunting to the
average person, and the strings are just not easy
to remember and pass around. Another issue that ENS
tries to solve, is that of domain squatting, people
buying domains because they think it will be valuable
in the future, and just sitting on it and never
actually doing anything with it. This is a popular strategy
in the world of DNS to make good money, as long
as you bought the domain name first, you can sell
it to whoever you like for whatever price. ENS tries to counter this
with some techniques like using a vickerey auction to give the rights to a domain name. The idea behind the
auction process, is that the party willing to pay
most for the domain, will be the one that probably needs it most, this prevents squatters
from buying another brand’s domain name early and just sitting on it. With this auction process,
the brand would also have a chance to bid on the domain name. A big difference here from
DNS is that you are not actually buying the domain name in ENS, you are simply locking up
ether in a smart contract that gives you rights to the domain for a certain amount of time. If you let go of the
domain name, your locked up ether is returned to you. This is in contrast with
DNS where you don’t get any money back after your domain expires. There are several ways
you can register a domain on ENS, even through command
line, but we’re going to see the simplest way,
which is through their dap at You should give their website
a read, but one important thing to note, is that the current name registrar is temporary. It’s expected that one
to two years from now, a permanent registrar will
be deployed with more improvements and techniques
to prevent squatting. The current temporary
registrar is to create community awareness, and
serve as an initial testing of the concept. Once the permanent registrar
is deployed, all domains from the current registrar
will be moved over. There’s also a certain
set of rules to follow for ENS domain names, like being at least seven characters long. This is also a strategy
to prevent squatters from getting the value of short
name domains early on. As the project evolves
and gains awareness in the community, shorten domain names will become available for auction. To register a domain name,
you would first check whether its even
available, if not, the site will let you know when
it comes up for renewal. If it is still available, you
begin a smart contract auction for the domain by sending
the maximum amount of ether you’re willing to bid. The minimum amount for a
bid is currently .01 ether, which is less than 10 dollars. The auction lasts for
three days and anyone can submit a bid, but the bid
is concealed so that no one can see its value. Before sending any ether,
make sure your metamask is unlocked so the website
can detect your account. After the auction ends, the
two day reveal phase begins, during which anyone who
submitted a bid, must reveal the details of their bid. If you fail to reveal within
those two days, your bid is lost and the ether is unrecoverable. If your bid wasn’t the highest
revealed bid, your money is returned to you, minus a .5% fee. Whoever reveals the highest
bid by the end of the reveal phase is the winner,
but they only pay the amount of the second highest bid. This gives the winner
rights to the domain name for at least a year, after
which they can choose to relinquish it and get
back their locked ether, or keep the ether locked
to continue owning it. ENS also allows for subdomains
that can map to different Ethereum addresses, as well as transferring ownership of domains. You could also use the ENS
source code to run your own private name registry
that serves your own daps. A current limitation of ENS
domains, is that they are not supported by popular
web browsers, like Chrome, which uses DNS, however, work is currently underway to enable popular
browsers to understand ENS names without having
to update the browser. To learn more about building
blockchain applications check out our online
guides and courses available at!

One Reply to “Ethereum Name Service Explained”

  1. Tosho says:

    can you make a comparison with NameBazaar? And will those min 0.01 ETH will be reduced in future considering the price increase?

Leave a Reply

Your email address will not be published. Required fields are marked *