The winner and token rarity selection in PuppyRaffle#selectWinner()
use weak PRNG to generate random values. Attackers can mimic the same PRNG to become winner and also choose their desire NFT rarity.
These lines from PuppyRaffle#selectWinner()
use public information to get winnerIndex
and it's not 100% random.
This line contains the same issue but different RNG calculation to determine rarity
Using weak PRNG allows attackers to become the winner and can mint themselves NFT tokens with rarity that they want.
Manual Review
Use a decentralized random generator like Chainlink's VRF service to get random values
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.