The intended behavior of the buySnow function is to require users to purchase Snow tokens at least once in order to become eligible for periodic free rewards via earnSnow.
However, the function does not validate that the amount parameter is greater than zero. This allows a user to call buySnow(0) without paying any ETH or WETH, while still resetting the s_earnTimer. As a result, the user becomes eligible to repeatedly claim free Snow tokens via earnSnow without ever purchasing any tokens.
Likelihood: High
Any user can call buySnow(0) without providing ETH or WETH.
The call successfully updates s_earnTimer, enabling access to earnSnow.
Impact: High
Users can farm unlimited Snow tokens without spending any funds.
The token’s economic model and incentive structure are completely broken.
Honest users are diluted by attackers minting tokens at zero cost.
The following test demonstrates that a user can earn Snow tokens without spending any ETH or WETH:
Add a non-zero validation for the amount parameter at the beginning of buySnow:
This ensures that users must pay at least once to become eligible for earning Snow tokens and prevents free token farming.
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.