I am trying to understand the namecoin protocol. As can be read in the namecoin documentation, in order to register a domain, you need to execute the following steps:

  1. Execute the command name_new, this pre-oders a domain name.
  2. Execute the command name_firstupdate, this finalizes the registration, name becomes public.

Why does this second redundant step exist? Wouldn't it make more sense to merge these two commands, and enable users to finalize a registration by updating a domain directly when registering it with name_new?

1 Answer 1


The reason is to prevent frontrunning: When a victim registers abc.com, the attacker might notice the TXN with the name_new abc.com request on Namecoin's P2P network. Then, he might issue the same request but with a higher TXN fee, and "steal" the domain from the victim, who was trying to register.

The solution is simple:

  1. Rather than sending name_new abc.com requests that reveal the domain, send a name_new SHA256(r, 'abc.com') request that commits to the domain without revealing it. This way, an attacker learns nothing about what domain is being registered.
  2. Reveal the domain later using a name_firstupdate r, abc.com request which reveals the domain, preventing people from stealing it. By this point, the attacker can do nothing because abc.com has already been assigned ownership using the name_new request.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.