The claim
function in the MerkleAirdrop contract enables eligible users to claim their 25 USDC airdrop. However, the current implementation of the MerkleAirdrop.sol
contract lacks a mechanism to prevent users from claiming the airdrop multiple times, which could lead to draining the contract's USDC balance.
The vulnerability arises due to the absence of restrictions on how many times an eligible user can call the MerkleAirdrop::claim
function to collect the airdrop. This allows an attacker to call the function multiple times and claim the USDC airdrop intended for other users as well.
Add the following test to the MerkleAirdropTest.t.sol
test suite.
This vulnerability allows an eligible user to claim all the USDC tokens present in the protocol, potentially draining the protocol's USDC balance.
Manual code review
Foundry
Add a verification mechanism to make sure that an user can claim only its airdrop. An example is the following:
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.