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

`s_zkSyncUSDC` public address variable used in the `run()` function of `Deploy.s.sol` to deploy is not the address of zksync USDC

Summary

s_zkSyncUSDC public address variable used in the run() function of Deploy.s.sol to deploy is not the address of zksync USDC

Vulnerability Details

in MerkleAirDrop:claim function if the account who claims his reward in spite of valid proof it won't receive any USDC.

function claim(address account, uint256 amount, bytes32[] calldata merkleProof) external payable {
if (msg.value != FEE) {
revert MerkleAirdrop__InvalidFeeAmount();
}
bytes32 leaf = keccak256(bytes.concat(keccak256(abi.encode(account, amount))));
if (!MerkleProof.verify(merkleProof, i_merkleRoot, leaf)) {
revert MerkleAirdrop__InvalidProof();
}
emit Claimed(account, amount);
i_airdropToken.safeTransfer(account, amount);
}

Impact

In this configuration No USDC will be airdropped.

Tools Used

Manual review

Recommendations

Hardcode correctly the s_zkSyncUSDC variable, you can also add more test to be sure to address the correct contract.
Read the name and symbol of the contract to valid it.

Updates

Lead Judging Commences

inallhonesty Lead Judge
about 1 year ago
inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

usdc-wrong-address

Support

FAQs

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