claimSnowman builds the Merkle leaf from the receiver's current Snow balance instead of the amount allocated in the Merkle tree, so anyone can block a user's claim by changing their balance.
As I understand the contract's logic, the Merkle root is meant to record who is eligible and for how much.
The mistake is that the contract does not check the amount allocated to the user in the Merkle tree. Instead, it checks the current Snow balance in their wallet.
Because Snow is a normal ERC20 token, anyone can send Snow to any address. An attacker can send 1 wei of Snow to a victim, so the victim's balance no longer matches the tree and their claim reverts with SA__InvalidProof. Even the user themselves can break their own claim by buying or earning more Snow after the tree was built.
Likelihood: High. Sending 1 wei of Snow costs almost nothing, and it can also happen by accident when a user earns or buys more Snow.
Impact: Medium. Eligible users can be blocked from claiming their Snowman NFTs. They can transfer the extra Snow away, but an attacker can repeat the attack or front-run the claim transaction.
Alice is in the Merkle tree with her allocated amount. An attacker sends her 1 wei of Snow, and her claim fails.
Pass the allocated amount as a parameter and verify it against the Merkle tree, instead of reading the live balance.
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.