The TSender
contract includes an airdropERC20
function designed to distribute ERC20 tokens to multiple recipients. While the contract has an areListsValid
function to check for duplicate addresses, zero addresses, and mismatched array lengths, it does not enforce the duplicate address check within the airdropERC20
function itself. This oversight allows users to bypass the areListsValid
function and call airdropERC20
directly with multiple instances of the same address, claiming more tokens than intended.
The airdropERC20
function does not check for duplicate addresses within the recipients
array. The validation for duplicate addresses is only present in the areListsValid
function, which can be bypassed by calling airdropERC20
directly.
If users exploit this vulnerability by providing multiple instances of the same address in the recipients array, they can:
Claim More Tokens: Receive more tokens than intended, leading to unfair distribution and depletion of the token pool.
Bypass Validation: Avoid the checks enforced in the areListsValid
function, leading to incorrect and potentially malicious behavior in the airdrop process.
Manual Review
To address this issue, implement a duplicate address check directly within the airdropERC20
function to ensure that no recipient receives multiple airdrops. This can be done efficiently using a mapping to track seen addresses.
Here is the revised implementation of the airdropERC20 function with an added duplicate address check:
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.