The storage variable PuppyRaffle#totalFees
can overflow if fees are not withdrawn after a certain period and start accumulating.
Using a uint64
for the storage variable PuppyRaffle#totalFees
and not handling overflow manually due to the fact the solidity version you are using is ^0.7.6
can cause an overflow after PuppyRaffle#totalFees
reach type(uint64).max
, a value of 18.446.744.073.709.551.616 (~18 ether).
The overflow of PuppyRaffle#totalFees
cause a loss of funds for the owner because all the fees collected for every round will go to 0.
Manual review.
You have tree options to handle this:
Use a bigger uint
size, for example uint256
to have enough space for the total fees collected
Use the OpenZeppelin library SafeMath and handle the possible overflow in the PuppyRaffle#selectWinner()
function
Use a Solidity version >=0.8 that will throw an error for arithmetic overflow or underflow
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.