The buySnow() function allows users to purchase SNOW using either native ETH or WETH. When paying with ETH, the transaction value should exactly match the purchase price. When paying with WETH, the transaction should not include any native ETH.
The function determines the payment method solely by comparing msg.value against the required ETH amount. When msg.value is non-zero but does not exactly equal the expected value, execution falls back to the WETH payment path.
As a result, any unexpected ETH sent together with a WETH purchase remains permanently locked inside the contract. The user pays with WETH while simultaneously losing the accidentally supplied ETH, since the contract neither refunds the excess ETH nor rejects the transaction.
The WETH execution path does not validate that msg.value is zero, allowing native ETH to become permanently trapped inside the contract.
Likelihood:
Users can unintentionally send native ETH while attempting to purchase SNOW using WETH.
Wallets, scripts, or frontend integrations may include a non-zero msg.value during contract interactions.
Impact:
Native ETH sent alongside a WETH purchase becomes permanently locked inside the contract.
Users suffer an irreversible loss of funds because the transaction succeeds without refunding or rejecting the unexpected ETH.
The contract should explicitly distinguish between ETH and WETH payments. When purchasing with WETH, the transaction should reject any non-zero msg.value to prevent accidental ETH loss.
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.