In the PuppyRaffle::selectWinner function, the rarity variable can be computed before calling the actual function and thus rig the game ratio of common/rare/legendary puppey
A malicious contract define such as
would be able to call the PuppyRaffle::selectWinner function according to the rarity of the NFT to be minted.
Medium because using this exploit we can unbalance the number or legendary and rare puppey so it removes an interesting part of the application
read the code
Use of chainlink VRF number in the line to select the winnerIndex
where VRFnumber is a number generated by a Chainlink VRF(Verifiable Random Function)
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.