After the refund function has been called, the index of the player that called the refund is pegged to address (0) which is possible to be selected as the winner too. This will result in the game throwing error sometimes.
players[playerIndex] = address(0); this will add address(0) to the players and cause error. Therefore, it is better to delete the refunded player and make the contract request a new player be added.
the select winner function may continuously throw error if the players are less than 4 due to refund which will also affect the poolprize calculation
manual review
remixIde
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.