How to deal with expired names?

Hey guys,

I’m building an app where users are able to buy certain subdomains for domains which I currently own. What I want to know is what is the recommended way to deal with expiry and communicate expiry to my database?

The current solution I am thinking of is using Chainlink Automation which calls a function to keep checking whether all domains with my contract are expired (using a loop), and to emit events if there are any expired. However this would cause problems if multiple domains expire around the same time.

What is the recommended way for dealing with this?


This doesn’t need to be on chain. I don’t know how you’ve set up your subdomain contract, but you could simply have a ‘web2’ microservice that calls your contract to get the expiry dates and then drops the subdomain owner an email as appropriate…

You could maintain a ‘web2’ database of subdomains and expirations to minimise unnecessary contract calls and use the contract purely as a final source of truth.

1 Like