← Back to home

Omnichain ENS

ENS + LayerZero: Register an ENS subdomain from any chain using LayerZero

Screenshots

Omnichain ENS screenshot 1
Omnichain ENS screenshot 2
Omnichain ENS screenshot 3

Problem Statement

ENS recently introduced Durin, a dApp designed to simplify L2 Names registration on L2s. It achieves this by deploying a smart contract on an L2 to manage subdomains.Inspired by this, we aimed to extend its functionality using LayerZero, enabling the registration and trading of subnames as NFTs across multiple blockchains. With this setup, a subdomain name on one blockchain could still update the registry where its information is stored by making an lzSend call.While the idea was promising, we encountered challenges and couldn't fully implement it. The one success we had was setting up data on the L2, including a contenthash that's accessible via eth.limo!You can check it by yourselves: https://evmcrispr.d-www.limo.eth.

Solution

The LayerZero solution is built around three key smart contracts:L2Registry: This contract serves as a foundational registry, similar to the one ENS provided, but without the NFT functionality. It acts as a simple registry that can be updated by its owner.L2Registrar: The L2Registrar owns the L2Registry and handles updates to the registry. It can process updates from the same chain as the L2Registry or from other chains. Implemented as a LayerZero OApp, its counterpart is the OmniRegistrar—a contract on another chain connected to the L2Registrar. The OmniRegistrar sends messages to register or update the L2Registry remotely.Omniname: These are the NFT contracts deployed and interconnected across multiple chains. They manage the ownership of each subdomain and are designed to integrate seamlessly with the NFT ecosystem. Omniname implements the ERC721 interface for NFT compatibility and the ONFT standard from LayerZero, enabling native bridging across chains.The resulting code has lots of mistakes, as it is very difficult to implement a crosschain solution in only 2 days, but it have been fun to experiment with it, and we think we came up with a good architecture for this particular scenario.

Hackathon

ETHGlobal Bangkok

2024

Prizes

  • 🏆

    Blockscout Explorer Big Pool Prize

    Blockscout

Contributors