The airdrop contract allows eligible users to claim Snowman NFTs by proving their entitlement via an EIP-712 signature and a Merkle proof based on their Snow
token balance.
However, the Merkle leaf is constructed dynamically using the user's current Snow
token balance (via balanceOf
) instead of a fixed amount determined at the time of snapshot, as welle as the signature through `getMessageHash` .
If the balance of the user changes, This results in invalid signature and proof mismatches and failed claims.
Impact:
Likelihood:
A Merkle tree snapshot is generated using a fixed balance at a specific time, and a user changes their balance after snapshot but before claiming.
A signature is made by a specific receiver before a change with its Snow balance.
Impact:
Users are **unable to claim **their Snowman NFTs if their balance changes even if they were eligible at snapshot time.
Airdrop becomes inaccessible to a significant portion of users who moved tokens, breaking the trust and usability of the system.
An attacker may attempt to transfer small portions of tokens to invalidate the evidence and make it more difficult, or even impossible, to claim the airdrop.
Add the following test in TestSnowmanAirdrop
Here, Bob, our malicious attacker, transfers token to Alice to make the signature verification and merkle proof invalid
Contract will revert with SA__InvalidSignature()
The reason is because the signature is checked with getMessageHash
which uses the live balance
Verify amount
via Merkle proof instead of computing it from balanceOf
.
Change the function getMessageHash too to take the amount in parameter instead of using the live balance
Require also to fix M01- s_hasClaimedSnowman is not checked in claimSnowman
Claims use snow balance of receiver to compute the merkle leaf, making proofs invalid if the user’s balance changes (e.g., via transfers). Attackers can manipulate balances or frontrun claims to match eligible amounts, disrupting the airdrop.
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.