The earnSnow
function does not prevent multiple earnings within 1 week because it uses a single global timer **s_earnTimer
**for all users instead of tracking individual user timestamps. As a result, any user can call earnSnow
multiple times to mint tokens repeatedly without waiting.
Likelihood:
This issue occurs whenever multiple users interact with the contract, as the cooldown timer is shared globally.
Users can bypass intended weekly cooldowns to mint multiple tokens.
Allows double or multiple token earnings per week, potentially inflating token supply unfairly.
Can lead to economic imbalance or abuse of token minting.
Any user can repeatedly call earnSnow()
immediately after another user did, because the cooldown is not tracked per user.
Change s_earnTimer
to a mapping to track each user's last earn time individually, and update the function:
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.