The collectFee function uses i_weth.transfer() to send WETH fees to the collector. The rest of the contract consistently uses SafeERC20 wrappers (e.g., safeTransferFrom in buySnow). Per the ERC20 standard, transfer is allowed to return false on failure instead of reverting. If the WETH token implementation returns false, the transfer silently fails, but collectFee continues to execute the native ETH transfer, emitting no error.
Likelihood:
Standard WETH implementations revert on failure, but any non-standard ERC20 token used as WETH (or a future token migration) may return false instead.
The contract already imports and uses SafeERC20 for IERC20 — this function simply fails to use the safe wrapper consistently.
Impact:
WETH fees are silently lost — the collector believes the fee was collected but the tokens remain in the contract.
Inconsistency with the rest of the codebase's safety patterns introduces maintenance risk and breaks the principle of defense-in-depth.
This test uses a mock ERC20 that returns false on transfer instead of reverting (which is valid per the ERC20 spec). When collectFee calls i_weth.transfer(...), the return value is ignored and execution continues as if the transfer succeeded. The WETH remains in the Snow contract while the collector receives only the native ETH portion.
Replace transfer with safeTransfer to match the safety pattern used everywhere else in the contract. The SafeERC20 library is already imported and applied to IERC20, so this is a one-word change that ensures the contract handles non-reverting ERC20 tokens safely.
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.