withdrawFees() pays accrued protocol fees to feeAddress, gated by a strict equality between the contract balance and totalFees.
Anyone can increase address(this).balance by force-sending ETH via selfdestruct of a funded contract (or a pre-funded create2 deployment), bypassing any receive() guard. Once balance > totalFees, the strict equality can never hold again, so withdrawFees() reverts forever and the fees are locked.
Likelihood: High
A single 1 wei forced transfer permanently bricks withdrawals. Trivial, permissionless, irreversible.
Impact: Medium
All accrued protocol fees are permanently locked (frozen funds). Pure griefing — no attacker gain, but the protocol loses its fees.
Do not gate withdrawal on an exact balance equality; track and send totalFees regardless of any stray balance:
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.