The MerkleAirdrop::claim
function lacks a check, allowing repeated calls by any of the four lucky addresses and risking the drain of all airdrop tokens.
The MerkleAirdrop::claim
function was meant to be used by the users to claim the airdrop if they are eligible. It does so by using the Merkle tree. The current implementation lacks a check to ensure that those 4 lucky Ethereum addresses can only call the MerkleAirdrop::claim
function once, despite the intention being to distribute 25 USDC to each selected address. This vulnerability allows any of the four lucky addresses selected based on Ethereum L1 activity to repeatedly call the MerkleAirdrop::claim
function, leading to the potential drain of all airdrop tokens.
Anyone of the 4 lucky Ethereum addresses can drain all of the airdrop tokens.
Add these lines inside of test/MerkleAirdropTest.t.sol::MerkleAirdropTest
. This tests if the lucky Ethereum addresses with enough ETH to pay for the fee, can call the MerkleAirdrop::claim
function repeatedly to get airdrop.
Manual review
Implement the check if the lucky Ethereum address has already claimed the airdrop or not. Various ways are there for this implementation. One of the ways to do so is by using mapping like this:
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.