The function loops through the players
array to check for duplicates. The longer PuppyRaffle:players
array is, the more checks a new player will have to make. This means that the gas cost for players who enter at the beginning of the raffle start will have significantly lower gas costs and since a single player can enter multiple accounts at once he can gain even more advantage.
This makes it less fair for every subsequent player and since a single player can enter multiple accounts at once he can gain even more advantage.
Foundry
Consider using a mapping to check for duplicates. This would allow you to check for duplicates much more efficiently it would not be affected by the number of participants.
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.