There is no overflow guard used in PuppyRaffle::selectWinner()
which can lead to an inaccurate pay-out to the winner of the lottery.
The contract uses an old version of Solidity pragma solidity ^0.7.6;
which has no built-in over/underflow guard. There is no other form of overflow protection used which makes PuppyRaffle::selectWinner()
susceptible to an overflow attack.
If (type(uint256).max / entranceFee) + 1
players enters the raffle the function will overflow.
Potential over-flow attack which will lead to inaccurate pay-out for the winner.
Is has a high severity but a low probability since the number of players needed to enter are high.
Foundry
Use a newer version (>0.8) of solidity which has built in over-flow guards.
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.