The buySnow()
function updates the global s_earnTimer
variable, which is used to control the cooldown period for the earnSnow()
function. This creates a critical flaw where purchasing tokens interferes with the free token distribution mechanism, effectively making free tokens unavailable to all users.
In Snow.sol
- buySnow()
:
And in earnSnow()
:
Since token purchases are likely to occur more frequently than once per week (normal market activity), the earnSnow()
function becomes permanently inaccessible, converting the protocol into a purchase-only system.
Natural market activity blocks free distribution:
Users regularly purchase Snow tokens via buySnow()
(expected normal behavior)
Each purchase updates s_earnTimer = block.timestamp
Before a full week passes, another user makes a purchase
This resets the timer, preventing anyone from using earnSnow()
The cycle continues indefinitely with normal trading activity
Intentional blocking of free tokens:
Attacker monitors blockchain for approaching 7-day periods since last buySnow()
Just before the week expires, attacker makes a minimal token purchase
This resets the timer and blocks all free token earning for another week
Attacker can maintain this with minimal cost (just gas fees and minimal token purchase)
Normal market activity makes earnSnow()
permanently unusable
The intended dual mechanism (buy vs earn) becomes purchase-only
Users cannot access the promised free token distribution method
Example scenario:
Delete the timer mechanisms from buySnow()
function
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.