Closed c4-bot-7 closed 7 months ago
This is handled off chain, don't consider this a bug. Determining the enter tickets period and when the winning tickets are drawn will be communicated clearly to the end user
0xleastwood marked the issue as satisfactory
jooleseth (sponsor) disputed
Seems that this will be correctly handled and communicated off-chain.
0xleastwood changed the severity to QA (Quality Assurance)
This previously downgraded issue has been upgraded by 0xleastwood
0xleastwood removed the grade
0xleastwood changed the severity to QA (Quality Assurance)
This previously downgraded issue has been upgraded by 0xleastwood
0xleastwood marked the issue as duplicate of #28
0xleastwood marked the issue as satisfactory
Lines of code
https://github.com/code-423n4/2024-02-thruster/blob/3896779349f90a44b46f2646094cb34fffd7f66e/thruster-protocol/thruster-treasure/contracts/ThrusterTreasure.sol#L269-L292 https://github.com/code-423n4/2024-02-thruster/blob/3896779349f90a44b46f2646094cb34fffd7f66e/thruster-protocol/thruster-treasure/contracts/ThrusterTreasure.sol#L83-L96 https://github.com/code-423n4/2024-02-thruster/blob/3896779349f90a44b46f2646094cb34fffd7f66e/thruster-protocol/thruster-treasure/contracts/ThrusterTreasure.sol#L102-L120
Vulnerability details
Impact
Time left for a user to enter tickets and claim the prize is highly uncertain due to
setWinningTickets()
can be called at any time. This may result in a user doesn't have enough time to enter tickets or claim the prize.Proof of Concept
When
enterTickets()
, this requirement should be satisfied:and when
claimPrizesForRound()
, this requirement should be satisfied:The requirement relies on
winningTickets[roundToClaim][0].length
, which is updated throughsetWinningTickets()
, this function can be called any time between start and start + max_round_time:So it's not sure when this function will be called. If it's called very early, a user don't have enough time to enter the tickets, if it's called very late, users may don't have enough time to claim their prize.
Tools Used
Manual Review
Recommended Mitigation Steps
select fixed time for each phase. Like 10 days to enter the tickets, then 1 day to set prize and 3 days to collect the prize.
Assessed type
Other