Buy, trade, and bridge ENS domains on L2s with the same cheap gas fees you would expect from L2s
One of the most successful products on Ethereum is ENS domains. Not only has it proven itself as a key piece of the future of the internet and decentralized usernames, but it's also one of the products capturing the most fees on Ethereum.
As more activity is moving onto L2s, the one thing that has not moved with them is ENS. There's currently no way to register and trade ENS domains on L2s, therefore users must continue paying L1 gas fees to interact with ENS. Although ENS is already working on supporting L2s using off chain data lookups and wildcard domain names, this doesn't solve the use case of registering top-level domains. This is important, as top-level domains are the most popular use-case of ENS, as well as the primary driver of ENS revenue.
To solve this problem we've built ENS Everywhere, which aims to make ENS domains first-class citizens on Ethereum L2s. Users can request domain purchases on Polygon, Optimism, or potentially more chains in the future. Relayers register these domains on L1, and bridge the ENS NFTs back to L2. And by using our new Bulk Registrar contract (described in detail below), we can provide up to 34% savings.
We believe this project can help make ENS domains more accessible to everyone, and continue to grow Ethereum's L2 ecosystem!
ENSEverywhere is built around a relatively simple idea: users make a "bid" to purchase an ENS domain on L2, then a relayer fills that "bid" by purchasing it on L1 and bridging the domain to L2.
However, this leaves one major issue: if the relayer has to purchase the domain on L1, won't they incur the same L1 transaction fees, which must then be passed along to the purchasers? This is indeed true, however we were able to come up with a solution to significantly reduce the L1 fees, allowing cost savings for users.
When a user normally registers an ENS domain, they must send two transactions: a "commitment", which is just a hash stored on-chain, as well as a "reveal" transaction which completes the registration. This process involves many storage operations, which are the most expensive operations to perform on Ethereum.
We were able to develop a "Bulk Registrar" smart contract, which allows a single commitment to register many ENS domain names. By bundling many domain registrations together in a single transaction, we can significantly decrease the gas costs. For example, if we register 10 domains in a single batch, there's a 25.7% cost savings compared to registering all 10 individually. In fact, even registering 2 domains together has a 9.3% savings!
To be used in production, our registrar would need to be approved by the ENS DAO as a supported registrar. We plan on proposing this to the DAO following the hackathon.
The rest of our system is build on-top of this registrar contract. A domain registration follows the following process:
And that's it! The user now has ownership of an ENS domain on L2, and was able to save money when purchasing the name. If the user wishes, they can redeem this L2 NFT for the primary L1 ENS NFT (although this is not implemented yet).
To facilitate this process we build a simple dapp that walks the user through the process of registereing the domain. The dapp also shows the user all their existing L1 ENS domains (using the NFTPort API), which will allow the user to bridge existing domain names to L2.
One limitation of this protocol in it's current implementation is that, while it allows a user to "own" a domain name on L2, it doesn't allow the user to set values such as the resolved Etheruem address. We plan on solving this using the new EIP-3668 off-chain data lookup standard, which will allow us to store this data on L2.