The collector should always be able to withdraw accumulated fees, which exist in both ETH and WETH.
collectFee sends the WETH and then the ETH in the same transaction, requiring the ETH send to succeed. If the collector is a contract that cannot receive ETH, the require reverts the whole transaction and drags down the WETH transfer that would have succeeded. Since changeCollector is onlyCollector, a collector unable to call it leaves the fees locked forever.
Likelihood:
The collector is configured as a contract that cannot receive ETH (a treasury or mis-set multisig).
Impact:
WETH fees are stuck even though their transfer is viable, blocked by a failing ETH send.
If the collector also cannot call changeCollector, all fees (ETH and WETH) are locked permanently; no rescue path exists.
The test accrues fees in both ETH and WETH, sets a collector contract that cannot receive ETH, and shows collectFee reverts entirely - leaving the transferable WETH stuck - and that with a collector unable to call changeCollector the fees are locked permanently.
Verified with Foundry (test_elWethSeQuedaAtrapadoPorCulpaDelEnvioDeEth, test_siElCollectorNoPuedeCambiarseNoHaySalida), forge test passing:
Decouple the two transfers so a failing ETH send cannot drag down the WETH, and use safeTransfer:
Also let the owner reassign the collector (two-step) so a broken collector isn't irreversible; and note i_weth.transfer ignores its return value (use safeTransfer).
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.