Skip to content

Implement Time-Tracking Mechanism for Pool State Transitions #6

@onlydustapp

Description

@onlydustapp

📚 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

  1. A reliable timestamp tracking mechanism is implemented for pool creation and expiration.
  2. Functions correctly trigger pool locking and initiate randomness generation immediately after the 30-minute period.
  3. Protective measures against blockchain time manipulation are in place and tested.
  4. 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. 🎯

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions