Snow.buySnow accepts payment in either native ETH (msg.value == s_buyFee * amount) or WETH (the else branch). The WETH path executes whenever msg.value != s_buyFee * amount — including when msg.value > 0. If a user has approved enough WETH but accidentally sends ETH alongside the call, the WETH is pulled, Snow is minted, and the ETH is silently captured by the contract with no refund and no revert.
The captured ETH can only be withdrawn by s_collector via collectFee() — it is not refundable to the user.
Any user or frontend that accidentally includes ETH in what they intended as a WETH purchase silently loses that ETH. The loss is permanent from the user's perspective — only the protocol's s_collector can recover the funds. This is a silent fund loss footgun in a publicly callable, payment-handling function.
Result: [PASS] — buyer loses 0.5 ETH silently while still paying WETH.
Reject the call if the WETH path is taken but msg.value > 0. This forces the user to commit to one payment path and prevents accidental ETH loss:
Alternatively, refund msg.value to msg.sender at the end of the WETH branch instead of reverting, to improve UX.
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.