The Snow.sol contract uses a single global timer variable, s_earnTimer , which is reset every time any user calls the buySnow function. This allows a criminal to perform a cheap continuous griefing attack that causes a DoS on the earnSnow function, preventing all other users from ever earning tokens.
The intended behavior is for a user to be able to claim one free S token by calling earnSnow one week after their last purchase or their last claim. This mechanism is meant to be a primary way for users to acquire tokens over time.
The issue is that the contract uses a single s_earnTimer state variable to manage the earning cooldown for all users. This timer gets overwritten by any call to buySnow. An attacker can repeatedly call buySnow with a minimal amount just before the one week cooldown expires, perpetually resetting the timer and trapping all other users in a state where they can never successfully call earnSnow
Likelihood:
An attacker calls the buySnow function with a minimal amount just before the one-week cooldown period is set to expire.
This attack is inexpensive and can be easily automated with a script to ensure the earnSnow function is permanently blocked for others.
Impact:
A core feature of the protocol is disabled for all legitimate users. This denies them access to one of the two intended methods of acquiring Snow tokens.
The attack degrades the user experience and undermines the token's distribution model, potentially causing users to lose faith in the project.
The earning cooldown timer should be tracked on a per-user basis. This can be achieved by changing s_earnTimer from a single uint256 to a mapping(address => uint256). This ensures that one user's activity cannot affect another user's ability to earn tokens.
When buySnow is successfully called, the global timer is reset. This inadvertently affects the earning of snow as that particular action also depends on the global timer.
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.