The goal of the airdrop
is to send USDC tokens to 4 lucky addresses. The way users claim their airdrop is by calling the MerkleAirdrop::claim function. The claim function checks the lucky address, the elegible amount and the merkle proof. However, the function does not check whether the lucky address had already claimed the airdrop.
The same lucky address can call the MerkleAirdrop::claim
function multiple times. The function will give the airdrop after each call up to 4 times depending on the number of the already claimed airdrops by the other 3 lucky adresses. This can maliciously drain the whole balance.
The following foundry test function shows how one lucky address can maliciously drain the whole balance.
Executed as foundry test --match-test "testUserCanClaimMultipleTimes" -vvvvv
.
Manual Review, Foundry
Add mapping for the status of the individual lucky addresses claims.
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.