The user can claim the airdrop multiple times by which a single user can claim all the airdrop amount. A user can only claim the airdrop once which can be done by adding a mapping
to keep track of the claimed accounts and revert the transaction if the account has already claimed the airdrop.
This claim function does not check if the user has already claimed the airdrop or not. So, the user can claim the airdrop multiple times. All user are not able to claim the airdrop after reclaiming happens.
We can resolve this issue by adding a mapping
to keep track of the claimed accounts and revert the transaction if the account has already claimed the airdrop.
Paste this test in MerkleAirdropTest.t.sol
Run above test using the following command
Users can claim the airdrop multiple times
Reclaiming the airdrop can reduce the number of user can claim the airdrop.
All user are not able to claim the airdrop after reclaiming happens.
A single user can claim all the airdrop.
Manual Review
We can add a mapping
to keep track of the claimed accounts and revert the transaction if the account has already claimed the airdrop.
Update the claim function
as follows
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.