The calculation of totalAmountCollected does not account for refounded users and this affects prizePool and fee calculations.
If one or more users get refunded totalAmountCollected calculation will be inaccurate because PuppyRaffle::players.length doesn't change if users get refunded but the amount of collected entrance fees decreases for every refund.
Inaccurate totalAmountCollectedcalculation will cause a failure ofprizePooland/orfeepayout - calls toPuppyRaffle::selectWinnerand/orPuppyRaffle::withdrawFees` will fail.
Foundry
When calculating totalAmountCollected count only active participants of the raffle. Ignore address(0) entries in PuppyRaffle::players array or keep a record of active participants / collected entry fees in separate mapping.
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.