Optimising character count in text records

ENS ‘text records’ are subject to fee based on the character count of any individual text record. In this context, there are at least two trivial fields where the fees can be reduced significantly: the eth.ens.delegate field and the avatar field.

  1. eth.ens.delegate field: The expected string input is https://discuss.ens.domains/t/ens-dao-delegate-applications/815/[INDEX] where only the [INDEX] part is relevant. Remaining trivial part should be appended by the Resolver contract.

  2. avatar field: There are several ways of shortening the long OpenSea, IPFS or Arweave hashes to shortened urls. This can again be untangled by the Resolver contract.

1 Like

Agreed this is a waste - but applies only to the relatively tiny number of delegates. We didn’t think deploying a new contract everywhere and requiring frontend support was worth it.

Definitely merits consideration; something like a multicodec could be appropriate.

1 Like

While I agree that the delegate field only applies to a few addresses, the second issue of shortening avatar hashes will probably make it worthwhile to push both changes in the same commit while you are at it. It also signals optimality that the Devs have given due diligence to minimising gas footprint. In fact, the delegate field prepending is far easier to implement both front- and back-end than multi-codecs for the avatar field. This will also push ENS to standardise text records as well to some extent, which is a step in the right direction. In the long run, it will help remove the maintenance overhead somewhat.

More relevant thoughts:

I wanted to first have an NFT as my avatar but then I thought that if I have to change it at some point, I will need to edit the text record again. Unless these URIs are short and standardised, I’ll likely be paying significant gas fee each time. This will disincentivise users from changing their web3 NFT avatars which is not a desirable constraint. To circumvent this, they might choose to opt for web2 https:// symlinking (as I am doing right now with my records; my avatar points to a permalink on a web2 domain that I own). By shortening the avatar web3 hashes, we’ll be encouraging more users to choose NFTs or web3 domains. I am sure you have thought of this but just wanted to think out loud for a minute.