The SnowmanAirdrop contract allows users to claim Snowman NFTs proportional to their Snow ERC20 token balance. The claimSnowman function fetches the user's live token balance as the amount and passes it to Snowman.mintSnowman().
The specific issue is that mintSnowman uses a for loop to mint amount number of NFTs individually. If a user holds a large amount of Snow tokens (e.g., a whale with 500+ tokens), the gas required to execute the loop will exceed the block gas limit. This causes the transaction to revert, permanently preventing large token holders from claiming their airdrop.
Likelihood:
The attack is deterministic and will trigger automatically for any user whose token balance creates a loop size that exceeds the block gas limit (typically around 150-250 NFTs per transaction depending on gas optimizations).
A malicious attacker could also intentionally buy or receive a massive amount of tokens to make their balance large enough to trigger the DoS on their own account, though the primary impact affects legitimate large holders.
Impact:
Permanent Denial of Service (DoS) for large token holders. They are completely blocked from participating in the airdrop.
If the airdrop is a prerequisite for future protocol interactions, these users are permanently excluded from those features as well.
Avoid using an unbounded loop based on user input or dynamic balance. If the intent is to distribute NFTs proportionally, consider minting a single ERC1155 token representing the balance, or allow users to claim in predefined batches. Alternatively, if only 1 NFT per user is intended, hardcode the mint amount to 1.
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.