The mapping s_hasClaimedSnowman
is not used to prevent duplicate claims
Normal Behavior
The s_hasClaimedSnowman
mapping should be used to prevent a user from claiming the airdrop more than once. Before processing a claimSnowman()
, it should be checked whether the user has already received their airdrop and revert if so.
Issue
Although the mapping s_hasClaimedSnowman[receiver] = true
is updated after each claim, it is never checked before allowing a new call to claimSnowman().
This means the mapping has no real functional effect.
What prevents repeated claims is that the Snow
token balance is zero after the first attempt, but this is an indirect consequence and not an explicit protection.
Likelihood: LOW
Although there is no risk of loss of funds (the contract checks the balance before transferring), leaving an apparently protective but inactive mapping can lead to confusion or bad practices in the future. It is a missed opportunity to strengthen the security of the claim process.
Impact: LOW
It does not negatively impact funds or system stability, but it breaks the principle of code clarity and intent. It can give a false sense of security and make future developers assume that duplicate protection is already implemented.
Add a conditional check at the beginning of the claimSnowman()
function to ensure that a user cannot claim the airdrop more than once. While the contract currently sets a flag (s_hasClaimedSnowman[receiver] = true)
after claiming, it does not check this flag before proceeding with another claim. Adding this guard clause will enforce idempotent airdrop logic, prevent unnecessary executions, and clarify the role of the mapping.
The claim function of the Snowman Airdrop contract doesn't check that a recipient has already claimed a Snowman. This poses no significant risk as is as farming period must have been long concluded before snapshot, creation of merkle script, and finally claiming.
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.