The snow token should have a recurring free claim once per week, independently of whether users buy tokens or not.
The current implementation resets the s_earnTimer if the buySnow function is called.
Likelihood:
This flow will occur whenever the user buys snow tokens, which is often.
Impact:
The user will not be able to claim their free tokens if they want to buy snow and stake more often than once per week in the protocol.
Alice calls earnSnow and claims her free snow token, setting s_earnTime to block 1000(as an example).
Two days later, Alice decides she wants to buy more snow tokens and calls buySnow, setting s_earnTime to block 2000.
After one week from block 1000, Alice tries to call earnSnow but gets her tx reverted because now she has to wait until one week from block 2000.
Remove the s_earnTime set in buySnow.
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.