The SnowmanAirdrop::claimSnowman()
function contains a critical flaw in how it reconstructs the Merkle tree leaf during verification. It uses the user’s live Snow token balance at the time of claiming instead of a fixed amount that was originally committed in the Merkle tree:
This introduces a major inconsistency. The Merkle tree was generated off-chain using a static snapshot of eligible addresses and their corresponding amounts. However, if a user’s balance has changed between that snapshot and the actual claim, even by 1 token, the computed leaf will not match the original Merkle proof, and the claim will fail.
Eligible users can be unfairly denied their airdrop claim due to minor balance changes (e.g. additional purchases, transfers, or earnings).
Delegated claim systems become unreliable, as users cannot be guaranteed to maintain the exact balance until a relayer submits the claim.
This breaks the determinism of Merkle-based verification and can severely degrade user experience and trust.
Merkle tree was generated assigning each eligible user an amount = 1.
Alice has 5 snow tokens during claiming period
Alice calls the claimSnowman()
function and it fails due to SA__InvalidProof
.
Instead of dynamically computing the amount, we explicitly pass the amount
to the getMessageHash
function. This ensures that the signed message reflects the correct, fixed claim amount.
We also need to update the claimSnowman
function to accept the amount
parameter and pass it through to getMessageHash
. This removes reliance on dynamic state within the verification logic.
Alternative Solution: Enable Partial Claims
For a more flexible and user-friendly design, we can support partial claims by introducing a mapping that tracks how much each user has already claimed. This prevents users from claiming more than they’re entitled to while allowing them to claim in multiple transactions.
Add Tracking for Claimed Amounts
Users can claim multiple times up to their maximum entitled amount.
The system validates that claimed + new amount ≤ entitlement
.
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.