collectFee() calls raw IERC20.transfer() without checking the return value, inconsistent with the rest of the contract which uses SafeERC20.safeTransferFrom(). For any non-standard ERC20 that signals failure by returning false rather than reverting, fee collection completes without error while accumulated WETH fees remain locked in the contract indefinitely.
Likelihood:
This only activates when i_weth is a non-standard ERC20 that returns false on failure rather than reverting — standard WETH implementations are not affected under normal conditions.
Upgradeable token proxies or future token migrations represent realistic scenarios where this path becomes exploitable. Standard WETH reverts on a failed transfer rather than returning false, making the realistic impact near-zero for this specific deployment, but any token migration or proxy upgrade that changes this behavior would silently break fee collection.
Impact:
Fee collection silently fails for non-standard ERC20 tokens — the collector would believe fees were collected when they were not, as the function returns no error.
WETH fees accumulate in the contract indefinitely with no recovery path if the token returns false on failure.
Place this test in test/ and run forge test --match-test testSilentTransferFailure.
vm.mockCall makes transfer() return false without reverting. collectFee() completes without error but the collector's balance stays zero — confirming the return value is never checked.
Replace the raw transfer() call with safeTransfer() from OpenZeppelin's SafeERC20 library so a failed transfer always reverts rather than silently returning false.
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.