Normal behavior dictates that each user should have their own 1-week cooldown between using the earnSnow() function to mint 1 Snow token for free.
However, the restriction is enforced by a single global state variable s_earnTimer. Once any user calls it, the timer is updated for everyone in the protocol.
Likelihood:
This will occur the moment any single user in the protocol legitimately calls earnSnow(), updating the global timer and locking out everyone else.
Impact:
The protocol suffers from a persistent Denial of Service (DoS) for farming free Snow tokens, as only 1 user across the entire blockchain can earn snow per week.
This proof of concept demonstrates how the global timer blocks all other users. It begins by having an innocent user (innocent1) successfully call earnSnow(), claiming their 1 Snow token. Immediately after, a completely different user (innocent2) attempts to call the same function. Because s_earnTimer was updated globally by the first user rather than specifically for their own address, the second user's legitimate transaction reverts with S__Timer(), locking them—and everyone else—out of the yield for the next week.
Recommended Mitigation: Use a mapping(address => uint256) to track the timestamp of the last claim for each individual user instead of a single global variable.
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.