Likelihood: Low — requires an attacker to selfdestruct a contract sending ETH to this address, spending funds with no direct gain (griefing).
Impact: Low — the strict equality in withdrawFees() stops matching, so the owner can no longer withdraw accrued fees.
A minimal attacker contract holding some ETH and calling selfdestruct(payable(address(puppyRaffle))) forces ETH into the raffle. After that, address(this).balance exceeds totalFees, and the strict-equality require in withdrawFees() reverts on every call, permanently locking the fees. This mirrors the EtherGame selfdestruct example: a contract without receive/fallback can still be forced to hold ETH.
Avoid strict equality on address(this).balance. Use >= instead, or better,
track fees with internal accounting that does not depend on the contract's
actual balance. This also addresses the truncation issue reported separately.
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.