Bidding on ENS

Steps to owning your name

Ryan Le
4 min readMar 24, 2018

Securing a name through the Ethereum Naming Service (ENS) can be a barrier to entry for many. Unfortunately, ENS domains are pointless if people can’t buy them. In this post we’ll take a look at the process getting and configuring your name — without accidentally losing your money. If you are curious as to why you’d want one of these domains, Matt covers the big picture in an earlier post here. If you just want a name, check out the app to make buying and managing a name easy. Let’s get started!

The steps to obtaining a name are:

  1. Open the auction - day 0
  2. Submit a bid - day 0–2
  3. Reveal your bid - day 2–5
  4. Claim your name - day 5+

Pretty simple, right? But there are many ways where you can mess up. For example, if you forget to reveal your bid you lose your money — all of it! You can also forget a piece of data, like your salt or the name you bid on, and then it’s impossible to use the name. Or, if you bid on a popular name but don’t hide your bid, someone else may come in and bid just over you to win the auction.

ENS domains are pointless if people can’t buy them

Getting Started

Start by opening an auction. There are two functions you can use — startAuctions and startAuctionsAndBid. Use startAuctions. The reason you want to avoid startAuctionsAndBid is because it is easier to see your bid amount and guess the name you’re bidding on. Additionally, be sure to open an auction on several names at the same time to throw any would be name poachers off your sent. The more people who bid the smart way, the harder it will be for name poachers to win :-).

Next, you need to actually bid — and make sure to bid within 48 hours of starting the auction. Seal a bid by putting together your address, name hash, intended bid value, and a salt (save these somewhere, you’ll need them below!). Once you’ve created the bid submit it. Pro tip, send the bid transaction from a different address than from the address you sent the open auction transaction. Don’t bid immediately after opening the auction — wait a bit. This makes it harder for others to guess what you’re bidding on and how much you bid.

It’s now 2 days since opening the auction and it’s time to reveal your bid. If you’ve done a good job hiding what you’re bidding on in steps 1 and 2 above, you won’t have a lot of competition and you’ll win your name. It’s important to reveal the bid in the appropriate time frame or you’ll lose your money — you only have 3 days after the auction closes to reveal. To reveal, we give the registrar the parameters we used to seal the bid earlier (address, name hash, value, and salt) and call unsealBid. If you have a bid lower than the highest bid, you lost and you will be refunded immediately. Never fear, you can always try again on another name. If you have the highest bid at the end of the auction then you are the winner.

Now that the auction is over the last step is to claim ownership by ‘finalizing’ the auction. This part is simple, finalize the auction using the finalizeAuction function on the registrar from the address you sent the bid from.

Now on to setup! You can set up and configure a resolver to let others send money to your name and have it resolve to your address. Refer to this nifty diagram:

Rough diagram of ENS

The Resolver is a Smart Contract that lets others know what to do with your domain name. Although you can write your own resolver with added functionality, ENS provides us with a free to use Public Resolver. We just need to let the ENS Registry know that we want to use it by setting up the Public Resolver. You do this in two steps.

First, call setResolveron the ENS registry that tells ENS “this name points to this resolver” — in this case, it’s pointing to the Public Resolver. Now that the resolver is set, we can set the address we want the name to point to. Call setAddr on the Public Resolver contract. Once you define the address people can send ether to .eth name and it will go to your account on most wallets!

It’s my personal mission, after having experienced the pains on ENS to make this process simple.

WHEW! Hopefully the overview was helpful enough where you were able to register a domain name and get it set up. If you’d like an easier way to pick up and manage a name go check our website at BuyethDomains. We make the purchase easy and allow you to manage the name using smart contracts on the blockchain. Oh yeah, and don’t forget to set it up with your twitter :-).

--

--