No description, website, or topics provided.
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
contracts Require names to be 183 days old before migration Jan 30, 2019
migrations Add migrations Aug 2, 2018
test Require names to be 183 days old before migration Jan 30, 2019
.gitattributes added some stuff Aug 24, 2018
.gitignore Add migrations Aug 2, 2018
.soliumignore added some stuff Aug 24, 2018
.soliumrc.json added some stuff Aug 24, 2018
LICENSE Create LICENSE Aug 6, 2018 Update Jan 17, 2019
package-lock.json Update to Solidity 0.5 and Web3 1.0 Jan 23, 2019
package.json Updated dependencies and fixed indentation Jan 23, 2019
truffle.js Refactored base registrar to incorporate transfer logic Dec 21, 2018

Eth Registrar

Build Status License

Implements an ENS registrar intended for the .eth TLD.


The registrar is separated into several components for simplicity, modularity, and privilege minimisation.


BaseRegistrar is the contract that owns the TLD in the ENS registry. This contract implements a minimal set of functionality:

  • The owner of the registrar may add and remove controllers.
  • Controllers may register new domains and extend the expiry of (renew) existing domains. They can not change the ownership or reduce the expiration time of existing domains.
  • Name owners may transfer ownership to another address.
  • Name owners may reclaim ownership in the ENS registry if they have lost it.
  • Owners of names in the interim registrar may transfer them to the new registrar, during the 1 year transition period. When they do so, their deposit is returned to them in its entirety.

This separation of concerns provides name owners strong guarantees over continued ownership of their existing names, while still permitting innovation and change in the way names are registered and renewed via the controller mechanism.


EthRegistrarController is the first implementation of a registration controller for the new registrar. This contract implements the following functionality:

  • The owner of the registrar may set a price oracle contract, which determines the cost of registrations and renewals based on the name and the desired registration or renewal duration.
  • The owner of the registrar may withdraw any collected funds to their account.
  • Users can register new names using a commit/reveal process and by paying the appropriate registration fee.
  • Users can renew a name by paying the appropriate fee. Any user may renew a domain, not just the name's owner.

The commit/reveal process is used to avoid frontrunning, and operates as follows:

  1. A user commits to a hash, the preimage of which contains the name to be registered and a secret value.
  2. After a minimum delay period and before the commitment expires, the user calls the register function with the name to register and the secret value from the commitment. If a valid commitment is found and the other preconditions are met, the name is registered.

The minimum delay and expiry for commitments exist to prevent miners or other users from effectively frontrunnig registrations.


SimplePriceOracle is a trivial implementation of the pricing oracle for the EthRegistrarController that always returns a fixed price per domain per year, determined by the contract owner.


StablePriceOracle is a price oracle implementation that allows the contract owner to specify pricing based on the length of a name, and uses a fiat currency oracle to set a fixed price in fiat per name.