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?