'refund' function introduces duplicates in players array
The refund function gives option of the function callers to exit the raffle retrieving back 'entranceFee' amount of money. Where this does not result in a reentrancy attack(reported in another finding) leaves the corresponding index in players array with value address(0).
If the refund is called twice for different indexes we would end up with players array having duplicate values (address(0)). That would make it impossible for further addresses to enter the raffle given the implementation of the 'enterRaffle' function which reverts if duplicate addresses are found in the players array.
Manual review
Remove the refund() function.
Funds are locked to no one. If someone gets the refund issue, they also got this issue. IMPACT: High Likelihood: High
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.