buySnow() is meant to accept payment either in native ETH (exact price) or in WETH.
The branch selection uses strict equality on msg.value: if the attached ETH does not exactly equal s_buyFee * amount, the function falls through to the WETH branch and charges the full price in WETH — but the ETH the caller attached is never refunded or rejected, and simply sits in the contract.
Likelihood:
Occurs whenever a caller sends any ETH alongside a WETH-intended purchase, or slightly over/under the exact ETH price — a realistic UX mistake given there's no buySnowWithETH/buySnowWithWETH split, just one function with an implicit branch.
Impact:
The user's overpaid ETH becomes permanently stuck in the Snow contract, with no function anywhere that returns it — it can only ever leave via collectFee(), which sends it to the collector, not back to the payer.
The test below buys 1 Snow while attaching price + 1 ether. Since msg.value != price exactly, the WETH branch runs and charges the full price in WETH from the caller's WETH balance — but the 1+ ETH they also attached is never returned, and ends up permanently held by the Snow contract.
Reject any attached ETH when the WETH path is taken, forcing the caller to pick one payment method explicitly instead of silently losing funds:
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.