Normal behavior: Fee collection should safely transfer all accumulated WETH and ETH to the collector, reverting if any transfer fails.
Specific issue: The collectFee function uses transfer() instead of safeTransfer() for WETH. If WETH transfer fails (non-standard token behavior), the failure is not caught.
Likelihood:
Standard WETH returns a bool, but non-standard implementations may not
If the transfer returns false instead of reverting, failure goes unnoticed
Impact:
WETH fees could be lost if the transfer fails silently
Inconsistent with the rest of the codebase, which uses safeTransfer
The contract imports and uses SafeERC20 from OpenZeppelin for safe token transfers. However, in the collectFee function, it uses the unsafe transfer method instead of safeTransfer. This inconsistency means that if the WETH transfer fails silently (returns false instead of reverting), the failure will not be caught and fees could be lost.
The code shows this inconsistency:
Replace the unsafe transfer call with safeTransfer to ensure consistent handling of token transfers throughout the contract. This guarantees that any transfer failure will cause a revert rather than failing silently.
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.