Snow::earnSnow()
Function Uses Shared s_earnTimer
Allowing Only One Address To Earn Snow Per WeekAll addresses should be able to call the Snow::earnSnow()
function during the farming phase once a week to earn Snow tokens before the airdrop.
When the first address calls the function, the Snow::s_earnTimer
variable is updated for the whole contract, thus disallowing any other address from calling this function to earn Snow tokens.
Likelihood: High
This is a common function that everyone has access to and would use before the airdrop.
Impact: High
This would effectively cause a Denial-of-Service as others who legitimately want to earn Snow tokens would cause a revert.
The following test was added to TestSnow.sol
to demonstrate the issue.
Instead of all addresses sharing a single s_earnTimer
variable, a mapping can be used for each address to store the last claimed time for each address.
Under earnSnow()
:
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.