In a time-based logic like declareWinner
, correctness depends on precise comparison against the grace period deadline.
This introduces a 1-second window of ambiguity at the exact moment of expiry. If block.timestamp == lastClaimTime + gracePeriod
, the winner cannot be declared, even though the grace period should be considered expired.
Worse, an attacker could manipulate or mine a block at that exact timestamp, stalling winner declaration for a block.
The current implementation uses:
Likelihood:
Very likely in active networks with small gracePeriod
values (e.g., < 1 min).
Block producers (especially in testnets or low-difficulty chains) can influence block.timestamp
.
Impact:
Prevents timely winner declaration.
Can be exploited to delay game resolution, especially if combined with front-running or selfish mining.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.