📚 Overview
Implement a robust time-tracking mechanism that handles pool state transitions based on the elapsed time since pool creation. The focus is to ensure that each pool is accurately tracked for a 30-minute window, after which the pool is locked and randomness generation is triggered.
🚀 Requirements
-
Timestamp Tracking:
- Record the creation time for each pool.
- Assign an expiration time exactly 30 minutes after creation.
-
State Transition Check:
- Develop functions to periodically check if a pool has reached its expiration time.
- Trigger pool locking when the 30-minute window elapses.
-
Randomness Generation:
- Once a pool is locked, immediately initiate the randomness generation process.
-
Security Measures:
- Implement protective measures to guard against blockchain time manipulation.
⚙️ Technical Considerations
- Ensure timestamp accuracy and consistency with the blockchain's time source.
- Utilize precise scheduling or polling mechanisms to trigger events exactly at the 30-minute mark.
- Test the system for edge cases such as near-boundary timing issues.
✅ Definition of Done
- A reliable timestamp tracking mechanism is implemented for pool creation and expiration.
- Functions correctly trigger pool locking and initiate randomness generation immediately after the 30-minute period.
- Protective measures against blockchain time manipulation are in place and tested.
- The implementation is in line with FlipNet's existing infrastructure as described in the readme
Let's ensure our solution is secure, precise, and seamlessly integrated with the existing system. 🎯
📚 Overview
Implement a robust time-tracking mechanism that handles pool state transitions based on the elapsed time since pool creation. The focus is to ensure that each pool is accurately tracked for a 30-minute window, after which the pool is locked and randomness generation is triggered.
🚀 Requirements
Timestamp Tracking:
State Transition Check:
Randomness Generation:
Security Measures:
⚙️ Technical Considerations
✅ Definition of Done
Let's ensure our solution is secure, precise, and seamlessly integrated with the existing system. 🎯