TSender

Cyfrin
DeFiFoundry
15,000 USDC
Ended
View results
Submission Details
Severity: low
Invalid

Redundant Zero Address Check in AirdropERC20 function

https://github.com/Cyfrin/2024-05-TSender/blob/c6da9ef0c28741c007a02dfa07b7e899c1c22e47/src/protocol/TSender.sol#L76C14-L79C18

Summary

The TSender contract performs redundant zero address checks in the airdropERC20 function. This redundancy results in unnecessary gas consumption.

Vulnerability Details

The contract contains two separate checks for zero addresses: one in TSender::areListsValid and another in TSender::airdropERC20. This duplication is not needed and can be optimized to reduce gas usage.

Impact

The redundant check leads to increased gas costs.

Tools Used

Manual Review

Recommendations

Remove the zero address check from the TSender::airdropERC20 function and rely on the TSender::areListsValid function to perform this validation.

Updates

Lead Judging Commences

inallhonesty Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

Can’t find an answer? Join our Discord or follow us on Twitter.

Cyfrin
Updraft
CodeHawks
Solodit
Resources