A Look at the ENS Name Wrapper

Special thanks to Serenae.eth and Jeff Lau from ENS Labs for sharing their expertise and providing feedback. Thanks also to cthulu.eth and Zadok7.eth from ENS Labs for their help.

Ethereum Name Service (ENS) is the most widely adopted decentralized domain system. The protocol has so far seen 2.8 million names registered by more than 600,000 unique participants – a feat no other decentralized naming system has come even close to accomplishing.

However, ENS is about to become even better with the release of the Name Wrapper smart contract. The new upgrade will bring several new core functionalities that will transform ENS as we know it.

Let’s look at how the Name Wrapper works and why it’s potentially the most impactful upgrade in the history of ENS.

Terminology

  • Fuse – an instrument that handles functionality restrictions and permissions on a child domain. The parent can burn fuses to revoke its permissions and allow certain functionality for the child domain (the child domain can also burn fuses on itself).

  • Parent domain – the domain above a child domain. For example, domain.eth is the parent domain of sub.domain.eth, and sub.domain.eth is the parent domain of sub.sub.domain.eth.

  • Child domain – the domain below a parent domain. For example, sub.sub.domain.eth is the child domain of sub.domain.eth, and sub.domain.eth is the child domain of domain.eth. A “child domain” is synonymous with a “subdomain”.

  • Top-level domain – the domain at the top of the hierarchy. For example, .eth is a top-level domain.

  • Second-level domain – the domain below the top-level domain. For example, domain.eth is a second-level domain.

  • Emancipated domain – a domain state that assures that the owner of the parent domain is unable to affect it until it expires.

  • Locked domain – a domain state that assures that neither the owner of the parent domain nor the owner of any child domain can affect it until it expires. A locked domain is still transferable and can burn fuses.

  • Resolver – a smart contract that stores the records of a domain.

  • Time-to-live (TTL) – a setting that tells the resolver for how long it should cache records under a specific domain.

The Name Wrapper in a nutshell

The Name Wrapper is a smart contract that will usher in two new functionalities:

  • Issuance of child domains as non-fungible tokens (NFTs);

  • Customizable domain permissions.

It’s important to note that the Name Wrapper will support wrapping DNS domains into ERC-1155 NFTs, too. Owners of second-level DNS domains will be able to transfer them and set customizable permissions (burn fuses) for child domains. However, they’ll always be able to take the child domains back via the DNS registrar.

Let’s look at how both of the new functionalities work.

Child domains as NFTs

The first functionality that the Name Wrapper will enable is issuing child domains as NFTs. To see why this is important, we first need to understand how issuing child domains works now.

Currently, all second-level ENS domains are ERC-721 NFTs. This gives the owner of the second-level domain (domain.eth) complete control over it and makes it a tradable asset. On top of that, the owner of the parent domain has the ability to issue child domains (sub.domain.eth).

However, there’s one caveat: The child domains that the owner of the parent issues are not NFTs. This means that the owner of the parent domain has full control over them and can rug the owners anytime they want. Child domains now are also non-tradable and non-transferable.

But that’s where the Name Wrapper comes in and changes the status quo. The smart contract turns all ENS domains at any level into ERC-1155 NFTs. This, combined with the built-in fuse burning system (we’ll talk about that later), gives the owner of the child domain full control over it and makes it unruggable.

Technically speaking, upon wrapping a child domain, the owner gives control of the domain to the Name Wrapper smart contract. In return, the smart contract issues an ERC-1155 NFT representing the wrapped domain. Once a wrapped child domain expires (we’ll talk about expiration later), the domain is unwrapped and the NFT representing the ownership of the child domain is sent to a burn address.

It’s worth mentioning that it’s currently possible to issue child domains as NFTs by creating a customized, ERC-721-compliant registrar contract. This is what Decentraland has done with its dcl.eth domain. We’ll talk about this later.

Customizable domain permissions

The second functionality that the Name Wrapper upgrade will enable is customizable domain permissions. This is achieved by the owner of the parent domain burning fuses or revoking permissions.

Let’s see how fuses work.

Actual fuses. Source: Google.
Actual fuses. Source: Google.

Fuses

Fuses are at the center of the Name Wrapper. Each parent domain has a set of permissions that the owner of the domain can revoke to allow more autonomy and functionality for its child domain. The modification of these permissions comes in the form of burning fuses, or simply put, revoking the said permissions.

Fuses are split into two categories: Parent-controlled fuses and owner-controlled fuses. Parent-controlled fuses can be burned only by the owner of the parent domain. Owner-controlled fuses can be burned by the owners of both the parent and child domains.

Jeff Lau, the lead engineer of the Name Wrapper at ENS Labs, puts it this way: Parent-controlled fuses can be seen as perks for the child domain. Owner-controlled fuses are restrictions for the child domain.

The Name Wrapper upgrade comes with eight pre-defined, non-customizable fuses. It’s important to note that anyone will be able to create custom fuses by interacting directly with the Name Wrapper smart contract.

Let’s see what kind of fuses there are and how they work.

Parent-controlled fuses

There are two parent-controlled fuses. Only the owner of the parent domain can burn the parent-controlled fuses. Both of these fuses are burned automatically for second-level domains.

1. Parent Cannot Control (PCC)

If the parent domain burns this fuse (and only the parent can do that) on the child domain, it’ll revoke all its power over the child domain until it expires (though it’ll still be able to extend the expiration of the child domain even with PCC burned). This makes the child domain Emancipated and thus unruggable.

However, for the parent domain to burn PCC on its child domain and emancipate it, it must first become Locked. To do this, the parent domain needs to burn PCC and the Cannot Unwrap (CU) fuses on itself (we’ll discuss CU later).

For example, sub.domain.eth would need to first have PCC and CU burned on itself to be able to burn PCC on sub.sub.domain.eth. Once sub.domain.eth has both fuses burned and is Locked, then it can burn PCC on sub.sub.domain.eth, this way emancipating it.

This process is a tad different for second-level domains (domain.eth). All new wrapped or registered second-level domains will have PCC burned automatically. Existing second-level domains will also have PCC burned automatically once wrapped. This means that second-level domains need to burn only CU on themselves to become Locked.

2. Is Dot ETH (IDE)

If this fuse is burned, it means the domain has a top-level domain .eth. This fuse is burned automatically.

Owner-controlled fuses

There are six owner-controlled fuses. Both the parent and the child domain can burn the owner-controlled fuses. For the parent domain to burn any of the owner-controlled fuses, it must do it at the same time as burning PCC and CU. If the parent domain only burns PCC and CU, the child domain can burn the owner-controlled fuses on itself.

1. Cannot Unwrap (CU)

If the parent domain burns this fuse on itself, it’ll be unable to unwrap itself. As we said earlier, the parent domain burning PCC and CU on itself makes it Locked. This means that the parent domain becomes unable to rug the owner of the child domain by forcefully replacing it.

A Locked parent domain can then burn CU on the child domain, making it also Locked. However, as we said, burning CU on the child domain only works if it’s burned at the same time as PCC. If the parent domain burns only PCC on its child domain, then it’ll be unable to burn any other fuses on it.

Burning CU is manual when registering any level domain, except for the top-level domain .eth. The top-level domain .eth is automatically put into the Locked state upon deploying the Name Wrapper smart contract with the fuse expiration time set to the maximum.

2. Cannot Burn Fuses (CBF)

If the parent domain burns this fuse on the child domain, the child domain will be unable to burn any other fuses. It “locks open” the set of permissions that had been enabled before burning this fuse and prevents the child domain from burning other fuses.

For the parent domain to burn CBF, it has to do it at the same time as burning PCC and CU. Again, if the parent domain burns only PCC and CU, then it’ll no longer have any ability to modify the child domain. In such a situation, the child domain could burn CBF on itself.

3. Cannot Transfer (CT)

If this fuse is burned, the owner of the child domain will be unable to transfer the domain.

4. Cannot Set Resolver (CSR)

If this fuse is burned, the owner of the child domain will be unable to set a resolver.

5. Cannot Set TTL (CST)

If this fuse is burned, the owner of the child domain will be unable to set a TTL.

6. Cannot Create Subdomain (CCS)

If this fuse is burned, the owner of the child domain will be unable to create new child domains.

Expired Korean milk. Don't let this happen to your domains. Source: Google.
Expired Korean milk. Don't let this happen to your domains. Source: Google.

Expiration time

Parent domain owners (and only them) have to set an expiration time when burning fuses on child domains. The expiration time:

  1. Must be equal to or shorter than that of the parent domain;

  2. Can only be increased;

  3. Applies to all fuses at once;

  4. Is only applicable to Emancipated and Locked child domains.

Each child domain’s expiration depends on its parent’s expiration time. Everything starts with the second-level domain:

  1. Second-level domain domain.eth burns CU on itself to become Locked and able to burn fuses on child domains. The expiration time of CU and other fuses it might burn on itself can be equal to or shorter than its registration time (plus 90 days of grace period).

  2. Once domain.eth burns fuses on itself, it can issue a child domain sub.domain.eth and burn fuses on it. The expiration time of sub.domain.eth fuses can be equal to or shorter than that of its parent domain.eth.

  3. sub.domain.eth can then issue its own child domain sub.sub.domain.eth and burn fuses on it. Again, the expiration time of sub.sub.domain.eth fuses can be equal to or shorter than its parent sub.domain.eth.

If the second-level domain (domain.eth) expires, it’ll stay wrapped. If someone then re-registers it, the old wrapped NFT will be burned and a new one will be minted at the time of registration. The child domains the expired second-level parent domain had issued will stay functional but without the granted permissions (fuses get unburned). The new owner of domain.eth will be then able to burn fuses again on the child domains or simply leave them untouched.

There are no renewal fees associated with extending the expiration time on child domains. However, it’s important to note that it’s best to register second-level domains for a longer period of time if one wants to issue child domains with customizable permissions and avoid fuse expiration fuss.

Use cases

Now that we know how the Name Wrapper works, let’s see how it can be applied. The most obvious use case that the smart contract enables is issuing child domains to sell – or rather rent – them to others.

For example, imagine if you have smith.eth. There are millions of people whose name or surname is Smith. You could:

  1. Extend smith.eth for a hundred years;

  2. Issue child domains with PCC and other fuses burnt for a hundred years;

  3. Put them on sale or contact those interested directly.

The power of the Name Wrapper allows john.smith.eth, adam.smith.eth, barbara.smith.eth, and millions of other Smiths to have complete ownership of their child domains.

This is similar to what Decentraland has done with its dcl.eth domain, just without the Name Wrapper. The project has deployed its own custom smart contracts to issue child domains to its users for a fee and even has a dedicated marketplace for trading. Loopring, Argent, and others have done the same, only for free.

There’s a gazillion of other possible use cases that the Name Wrapper enables. For example:

  • Proof of exclusive membership. Child domains are transferred to those belonging to a private club (member.privateclub.eth).

  • Employee identification. bob.design.apple.eth and jen.design.apple.eth work in the same team but their best friend tom.partnerships.apple.eth works in a different one. However, they all receive their salaries via their respective child domains.

  • Brand promotion. A project can issue a set of child domains, transfer them to the most loyal customers (sara.loreal.eth), and ask them to resolve it to their address. The brand can then send some tokens as a gift to the customer and incentivize her to shop using sara.loreal.eth. Clumsy but possible.

  • Rentals. Someone literally opened an apartment by verifying they’re the owners of the domain. You could essentially issue child domains like room1.hotel.eth with an expiration time equivalent to the stay time. The guest would then need to use the child domain to open and lock the room.

These use cases are just scratching the surface. We’ll see the real stuff once the Name Wrapper is released and widely adopted.

Parting thoughts

The Name Wrapper is one hell of an upgrade. As we’ve seen, it fundamentally changes how ENS child domains are managed, and opens up a whole spectrum of possibilities.

The Name Wrapper is expected to be released in early 2023. Let’s hope it arrives sooner rather than later!

References

  1. ENS Name Wrapper GitHub.

  2. ENS Town Hall Q3 2022.

Subscribe to umede
Receive the latest updates directly to your inbox.
Mint this entry as an NFT to add it to your collection.
Verification
This entry has been permanently stored onchain and signed by its creator.