Function withdrawFees require check uses contract balance to check for equality. The contract balance can be changed by forcefully sending it ether. Ether can be forcefully sent by deploying a malicious contract and calling the selfdestruct method.
withdrawFees function vulnerable to DoS attack by forcefully sending Ether to the contract.
Fees will be locked in the contract.
POC
Malicious contract that will forcefully send Ether to PuppyRaffle contract
foundry forge test case
Foundry
Slither
Don't rely on address(this).balance
The require check in withdrawFees can be removed since withdrawing fees has no impact on the raffle.
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.