The intended behavior is that each user can earn 1 Snow token once every 1 week, individually tracked per address.
The actual implementation uses a single global timestamp (s_earnTimer) to enforce the cooldown, which means that when one user earns Snow, all other users are blocked from earning for one week. This allows any user to effectively block others from using the earnSnow() function by calling it just before others attempt to claim.
Likelihood:
A user will call earnSnow() as soon as the 1-week timer expires
Other users attempting to earn within that week will be reverted due to the shared cooldown
Impact:
Any user can grief the system and block others from earning
Honest users are unable to claim their Snow fairly and individually
Creates unfair access to token rewards, violating per-user expectations
Once UserA calls earnSnow(), the cooldown affects all addresses, not just the one that triggered it. As a result, UserB is blocked, even though they haven't called earnSnow() previously.
The mitigation introduces a per-user cooldown timer by switching from a single uint256 to a mapping(address => uint256). This ensures that each user has an independent earning window and cannot affect other users’ ability to earn Snow. The logic now accurately tracks each user's most recent claim and enforces the 1-week delay only for them.
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.