In PuppyRaffle.sol::refund() the totalFees state variable is never updated after the refund which makes any use of this state variable after the refund is misleading.
the function PuppyRaffle::withdrawFees()
checks the balance == totalFees
if there were refund calls before that , then this will be false sincethe refund() function misses updating totalFees variable.
this Issue will cause the contract to not be able to withdraw and the rest of the fees will be stuck there.
manual review
fix the refund() to include the following line after sending entranceFee to the player:
totalFees = totalFees - entranceFee;
Funds are locked to no one. If someone gets the refund issue, they also got this issue. IMPACT: High Likelihood: High
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.