The buySnow() function accepts both native ETH and WETH payments but lacks proper validation to ensure users can only use one payment method per transaction. Leading to native ETH loss.
The expected behavior is to receive ETH or wETH, and process the snow sell. However, by not validating the input, a user could accidentally send both native ETH and WETH in the same transaction, the contract will only process the WETH transfer (via safeTransferFrom) and ignore the native ETH (msg.value). Another scenario would bring the intention of the user to buy an X amount, paying A amount in native and B in wETH.
The user’s native ETH will be permanently lost as it remains in the contract without minting the corresponding tokens.
Likelihood: MEDIUM
This issue could arise mainly from the user misunderstanding the protocol, or,
From typing.
Impact:
The user would lose any native amount sent.
Modify the logic to explicitly restrict payments to one method per transaction:
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.