The RNG at PuppyRaffle.selectWinner()
uint256 winnerIndex = uint256(keccak256(abi.encodePacked(msg.sender, block.timestamp, block.difficulty))) % players.length;
is deterministic because the hash can be predetermined, so the winnerIndex is also deterministic.
severity : high
likelihood : high
manual review
Implement Chainlink's VRFv2 to implement randomness / determining the winnerIndex.
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.