The earnSnow function uses a single global variable s_earnTimer to manage the one-week cooldown for rewards.
When any user successfully calls earnSnow, the timer is reset for everyone. A malicious actor (or even a regular user) can call this function as soon as the timer expires, effectively locking every other eligible user out of their rewards for another week.
Impact:
High. This is a permanent Denial of Service (DoS) for rewards. An attacker can ensure they are always the only one to receive tokens, or simply prevent anyone from receiving them by automating a call every 7 days.
Replace the global uint256 with a mapping to track cooldowns on a per-user basis.
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.