The _distribute function does not validate the addresses of winners before transferring tokens to them. This lack of validation can lead to unintended token transfers to invalid or malicious addresses, resulting in potential loss of funds.
The _distribute function iterates through the winners array and transfers tokens to each winner's address without verifying if the addresses are valid. Malicious or incorrect addresses could exploit this vulnerability to receive tokens that were not intended for them.
Attackers can potentially receive tokens that were supposed to be distributed to legitimate winners. This can lead to financial loss for the distribution process and damage to the reputation of the contract.
Manual
Before transferring tokens to winners, ensure that each winner's address is valid and not equal to the zero address. You can add address validation checks using the require statement:
By adding the require statement, you prevent token transfers to invalid addresses, improving the security of the distribution process.
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.