How to integrate ENS in DApp? Understand these three methods

There are already more than 200 services integrated with ENS, so this article wants to show how dApps can make good use of ENS.

In our document, we listed three main ways to integrate ENS. Here we also use the same expression.

Resolve ENS domain name

The first step in supporting ENS in an application is to make your application understand the ENS domain name, and support the use of ENS domain names wherever addresses are needed. This is especially useful for wallet services.

1619775512180690Please see the analysis result on

Etherscan is one of the most commonly used Ethereum-related websites, where you can review all your transactions and account balances. In addition to searching for ENS domain names, a feature that few people know about is that their URLs also support ENS domain names, so you can directly enter “/address/matoken.eth” in the address bar.


When someone asks my Ethereum address, I always give them my ENS domain name, but not everyone knows what ENS is and how to use this name. If you have many Ethereum addresses, giving the complete Etherescan URL with your domain name will be a good bibimbap to bridge the gap in knowledge. It’s very easy for you. Just enter or copy the URL with your domain name. You don’t need to always remember which address is used for what, and people who want to interact with you don’t need to know what ENS is.

Reverse analysis

The second level of ENS integration is reverse resolution, which displays the ENS domain name where your application displays the address.

This feature can be implemented on three levels.

The user’s ENS name will be displayed when logged in

Uniswap will display your ENS name as your username. This is another case where ENS helps users distinguish clearly when using multiple Ethereum addresses, because which account you are using will be clearly displayed.


Display the ENS name of the owner/creator of the asset

This feature is closely related to the NFT market. Each NFT market has its own username system, but your username on Foundation cannot be displayed on other NFT platforms (such as OpenSea and Rarible).

But the ENS name displayed on the KnownOrigin platform can also be displayed on OpenSea. In other words, the ENS name is a portable user name.



However, not all NFT platforms provide such support, but it is very useful for NFT artists because they need to build a brand and identity on the chain.

If you are playing on an NFT platform that has not yet integrated ENS, please suggest that they integrate ENS, because this is your autonomous identity! No ENS, no name on the chain!


Display the ENS name in a series of Ethereum addresses

The list of Ethereum addresses may be a history of transactions, or a list of asset owners, a list of DAO members, a list of voters, etc.

Snapshot prioritizes the user name selected by the user on their platform when displaying the voting results, but if there is no such dedicated user name, it will return the ENS name.


Let users name themselves

The final step of comprehensive ENS integration is to help users associate the ENS domain name with the resources created or managed by your application. It can take two forms:

domain registration

Let your product get an ENS name, and allow users to easily register subdomains, and your users can name the resources created in your dApp.

Many wallet services, such as Argent and Authenticreum, have helped users create subdomains under product domain names, but the recent high gas/eth price makes the whole thing unsustainable because they have to help users pay for gas (we are developing the L2 specification , Can alleviate the difficulties in it). Status does not allow users to obtain domain names for free, but sells them to users at the price of SNT tokens.


A more novel approach comes from Decentraland. They will not only  dcl.eth issue subdomains under their main domain names, but also convert these domain names into NFTs. Just like  .eth top-level domains, users can buy and sell these subdomains on secondary markets such as OpenSea.


Domain name update

Provide users with a simple way to allow them to point their existing domain names to resources created in your application so that they can reassign their domain names.

SnapShot also uses ENS in this way, such as .


They use ENS plain text records wherever you specify IPFS endpoints.


Other: cross-chain support

Although we already support parsing the address types of the blockchain in 100, we still need the wallet service to integrate our functions so that users can use it.

TrustWallet is one of the first multi-chain specific wallets to support us, so you can send BNB to  vikmeup.eth.


Another use for supporting ENS is when your application is deployed on the sidechain/L2. is a kind of NFT Tuya service, deployed on the xDAI sidechain, and they have integrated ENS.


We are currently developing the L2 approach, and the advantage of this architecture is that anyone can query the ENS name on L1, but can update the ENS record on L2 to save gas.

Although we have not found an easy way to update ENS records from the side chain, it is still a good integration method to be able to read ENS information directly on L1.

to sum up

We showed a number of dApp cases that integrate ENS and provide a good experience for end users. Although it is difficult to support all three levels, all wallets should support “1. Resolve ENS domain name”, all DeFi projects should support ” 2.1 Display ENS name under user login status “, and all NFT platforms should support ” 2.2 Display ENS name of the asset owner/creator “.

Source link:

Leave a Reply
Related Posts

Digital Village on VeChain raises $4M for scalable Metaverse

Metaverse developer Digital Village has raised $4 million in funding from L’Oréal’s venture capital fund BOLD and the British Fashion Council. Digital Village, in partnership with VeChain (VET), “is building a metaverse that is scalable, sustainable, and collectively prosperous.” Following the announcement,…
Read More