The Snow token contract allows users to earn one free token per week, with a timer mechanism to enforce this limit.
The earnSnow function violates the Checks-Effects-Interactions (CEI) pattern by updating the state variable s_earnTimer after making an external call to _mint. This creates a potential reentrancy vulnerability if the contract is modified to use a token standard with hooks.
Likelihood:
The vulnerability is not exploitable in the current implementation as the standard ERC20 _mint function does not have hooks that enable reentrancy.
The vulnerability would only become exploitable if the contract is modified to use a token standard with hooks (like ERC777) or custom callbacks are added.
Impact:
If exploitable, an attacker could mint multiple tokens when they should only be allowed one per week.
This would dilute the token supply and violate the intended tokenomics of the protocol.
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.