1

I’m trying to create a raffle system, where a smart contract will be holding a nft until a specific timestamp is passed. The timestamp is set at contract creation. I’m trying to think of some mechanism to check the time and draw a winner if the raffle is expired.

My initial thought was having an event loop in the backend server fetching the current unix timestamp and comparing it with the contract’s unix. But I’m trying to keep things as decentralized as possible and I’m unsure about the security of that.

What could I do to check this, in the safest manner possible?

2 Answers 2

0

There may be more recent/relevant solutions but I have used Ethereum Alarm Clock in the past with good results.

0

this is exactly a use case for Gelato Automate from Gelato Network, you create a task and set when should be executed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.