Description: The Snow::earnSnow()
uses a single global variable 's_earnTimer' to track when users can earn free tokens, instead of using a per-user mapping. This creates a race condition where only one user can successfully earn a free token per week across the entire protocol. After one user earns a token, the timer is reset for everyone.
Impact: If any user earns tokens, it prevents all users from earning free tokens for a week. This is likely unintended behavior and significantly impacts the token distribution mechanics. While this doesn't lead to direct fund loss, it severely limits functionality and creates an unfair advantage for whoever manages to call these functions first.
Proof of Concept: Include the following test in the TestSnow.t.sol
file:
Recommended Mitigation: Make the earn timer per user, not global:
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.