Beginner FriendlyDeFiFoundry
100 EXP
View results
Submission Details
Severity: high
Invalid

'Deploy.s.sol' Does not properly fund 'MerkleAirdrop.sol' with USDC tokens

Summary

'Deploy.s.sol' does not properly fund 'MerkleAirdrop.sol' with USDC tokens for the airdrop.

Vulnerability Details

In 'Deploy.s.sol' the line below attempts to fund the airdrop contract with USDC.

IERC20(0x1d17CBcF0D6D143135aE902365D2E5e2A16538D4).transfer(address(airdrop), s_amountToAirdrop);

This transfer will not work because you cannot directly call the transfer function on the USDC contract like this. You must fund a wallet with USDC and then transfer from that wallet to the airdrop contract.

Impact

The transferring of USDC in the Deploy script will not work as you cannot directly transfer from the USDC contract to the airdrop contract. This will prevent anyone from claiming the airdrop because the contract will not have a balance of USDC.

Tools Used

--Foundry

Recommendations

It is recommended to fund a wallet with USDC and then transfer the amount required to the airdrop contract.

Updates

Lead Judging Commences

inallhonesty Lead Judge
about 1 year ago
inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.