Attacker can call the buySnow
function with parameter amount=0 always, so that the variable s_earnTimer will constantly be updated to block.timestamp
When a user want to call the earnSnow
function, thes_earnTimer != 0 && block.timestamp < (s_earnTimer + 1 weeks
will always be true and will revert, causing Dos attack.
No body can use the earnSnow
function
Likelihood:
high
Impact:
high
Jerry can always call the buySnow with amount = 0 ,and update the s_earnTimer variable.
Victory wants to earnSnow,but revert
remove s_earnTimer = block.timestamp;
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.