Skip to content

imperviousinc/badass-ens

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 

Repository files navigation

badass-ens

How we created badass.domains

How we set up ENS for decentralized subdomains on our Handshake TLD .badass

Why do this?

ENS uses the orphan .eth TLD which is not anchored in any root zone. The .eth TLD is the ISO for Ethiopia, so it probably won't be included in the ICANN root zone. It is blacklisted on Handshake, so it could be used on Handshake with a plugin. Other "decentralized" domains like Unstoppable Domains (.crypto or .zil) and Namecoin (.bit) also use orphan TLDs that are not anchored in any root zone. If they decide and are able to get the TLD in the ICANN root zone, it is centralized and maganed by ICANN.

By forking ENS and using it on a TLD that is anchored in a decentralized root zone (Handshake), we create truly decentralized subdomains.

Set up

  1. Deploy ENS contracts to Ethereum

The badass repo contains the fork of ENS we deployed for .badass. You can then verify the contract source code on etherscan. Once the code is verified, you can interact with the contracts directly on etherscan, and test, for example, registering a subdomain.

  1. Deploy Subgraphs

We forked the ENS subgraph repo and changed the contract addresses, for example like this line.

  1. Launch custom ENS app

We forked the ens-app and modified it to work with our deployed contracts from step #1 above. This allows for an easier to use web UI for registering and managing .badass subdomains.

  1. hsd plugin to resolve domains

In order to resolve .badass domains, you will need to run hsd with a plugin that resolves ENS using HIP-0005. We have created handover for this.

  1. Remove trust

The .eth version of ENS has keyholders, so it is not truly decentralized. In order to make .badass truly badass (and provably decentralized) we have set the owner of the ENS contract to a burn address 0x0. We used the following geth command for this:

ENSInstance.setOwner("0x0000000000000000000000000000000000000000","0x0000000000000000000000000000000000000000", {from: eth.accounts[0], gasPrice: 125000000000})

We have also done the same with the .badass TLD on Handshake, making it unable to be updated, but renewable by anyone, using the following:

OPTYPE
0x08 // RENEW
OPEQUALVERIFY

You can see an implementation of this here.

Notes

Our app is the first implementation of EIP-1185 (DNS on ENS)

Contributors

HUGE thanks to Kiba Gateaux and Matt Zipkin for their help! Also thanks to all of those who have contributed to open source code for ENS and Handshake!