The Snow::earnSnow
function uses a single global timestamp (s_earnTimer
) to enforce a one-week cooldown for minting new tokens. As a result, the first user to call Snow::earnSnow
in a given week prevents all other users from earning Snow tokens until the cooldown expires.
This limits the earning of snow tokens to only the first user who calls the Snow::earnSnow
in a given week. All other users will be blocked until the This restricts Snow token earnings to only the first user who calls Snow::earnSnow within a given week.
Ashley calls the Snow::earnSnow
function.
The s_earnTimer
is updated to the current block timestamp.
Jerry attempts to call Snow::earnSnow
, but the call fails because the one-week cooldown has not yet expired.
To fix this, we should use a mapping instead of the s_earnTime
variable to keep track of timestamp for each individual users that calls the Snow::earnSnow
instead;
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.