Vulnerable code:
patch :
When processing a list of winners to distribute tokens, there is a potential issue stemming from unverified addresses within the winners list. The code snippet provided illustrates a scenario where the 'winners' array contains addresses of individuals intended to receive ERC20 tokens. However, the code lacks a robust mechanism to validate whether a particular address has already received tokens.
As a result, if the same winner address appears multiple times in the 'winners' array or if the array contains duplicate entries, there is a risk of unintentionally transferring tokens to the same address multiple times. This occurs because the code iterates through the array without verifying if a specific address has already been processed.
Severity : Medium
Impact: HIGH
LikelyHood: Low
Inaccurate Distribution.
Input Validation: Implement thorough map for input validation checks to ensure that winner addresses are not repeated.
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.