The earnSnow function in the Snow contract should allow everyone to earn Snow tokens once every week.
Users cannot earn Snow tokens weekly because when someone buys Snow tokens using the buySnow function, the s_earnTimer is reset. This forces users or even snowToken buyers to wait another week before they can earn Snow again, preventing them from earning free tokens every week.
Relevant Github link:
Likelihood:
When someone buys Snow tokens using the buySnow function, the s_earnTimer will be reset. Thus preventing others or even themselves from earning free Snow tokens every week.
Impact:
Users are prevented from earning free weekly Snow until another full week passes
Reduces participation in the system
This test demonstrated when someone buys Snow tokens, others are prevented from earning free Snow tokens until another week has passed
Reset s_earnTimer in buySnow, prevent others from earning free Snow tokens, s_earnTimer is not needed for people buying Snow tokens so can be removed.
Relevant Github link:
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.