Likelihood: Medium — requires a raffle to reach ~93 players (at a 1 ETH fee), so a single large fee exceeds type(uint64).max. Reachable in a successful raffle, but not in every one.
Impact: High — totalFees is corrupted, so withdrawFees() reverts on its strict balance-equality check. The protocol's fees are permanently locked with no recovery path.
This test enters 93 players, runs the draw, and shows two things: totalFees is
recorded as ~0.15 ETH instead of the real 18.6 ETH (truncation), and
withdrawFees() then reverts (locked funds). The assertLt confirms the
truncation; the vm.expectRevert confirms the fees can no longer be withdrawn.
From the trace: totalFees() returns 153255926290448384 (~0.15 ETH),
while the real fees collected are 18.6 ETH. withdrawFees() then reverts.
Store totalFees as uint256 to remove the narrowing cast and the truncation.
Upgrading to Solidity >=0.8 adds automatic overflow checks as defense in depth.
The strict-equality require in withdrawFees() should also be reconsidered, as
it is independently fragile to forced ETH via selfdestruct.
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.