The pseudo random number, winnerIndex, in selectWinner() is predictable such that bad actors could always be the winner and get the prize.
Since winnerIndex is derived from msg.sender, block.timestamp, and block.difficulty, in any given block, we can derive the winnerIndex in a smart contract before invoking selectWinner(). In addition, we can generate many "msg.sender" (e.g., with create2) to let the winnerIndex points to a specific player. Therefore, whenever we have players.length >= 3, we can intentionally be the 4th player with a "msg.sender" deriving a winnerIndex==3 and walk away with all prize.
Anyone implementing the above logic could always be the winner
Manual review
Use chainlink VRF to choose the winner
Root cause: bad RNG Impact: manipulate winner
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.