The buySnow()
function lacks validation that prevents users from purchasing zero tokens, allowing transactions that serve no practical purpose but still update the global timer affecting other users.
The Snow contract does not validate that the amount parameter in buySnow()
is greater than zero. This allows users to execute token purchases for zero tokens, which:
Makes no logical sense from a business perspective
Wastes gas on meaningless transactions
Updates the global earning timer, preventing other users from earning tokens
Creates vectors for griefing attacks, where malicious users can intentionally call the function with zero amounts to disrupt the protocol
This missing validation is particularly problematic when combined with the global timer vulnerability, as it provides an easy way for attackers to reset the timer without having to spend any funds on actual token purchases.
Impact: Low
Allows meaningless transactions that waste gas
Contributes to the global timer vulnerability by providing an easy reset method
Could confuse analytics and monitoring systems with zero-value purchases
Likelihood: Medium
Could occur by user error or be intentionally exploited
Requires minimal technical knowledge to exploit
No special conditions needed to trigger
src/Snow.sol
Add zero amount validation:
This simple check prevents zero-amount purchases, ensuring that all transactions serve a meaningful purpose and preventing users from easily manipulating the global timer without acquiring tokens.
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.