If the amount of ETH sent by the user is slightly more or less than s_buyFee * amount
, the function will assume the user intends to pay with WETH and will attempt to transfer it.
The problem is: if the user has previously approved WETH, the contract will directly deduct WETH from the user's balance—even if the user actually intended to pay with ETH—resulting in an unexpected loss of assets.
Impact:
The user intended to purchase Snow using ETH, but WETH was mistakenly deducted by the contract.
As a result, the user's assets were incorrectly transferred, leading to a financial loss.
Enforce that only one payment method is allowed—either an exact ETH amount or a full WETH transfer—to avoid ambiguous logic.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
View preliminary resultsAppeals are being carefully reviewed by our judges.
The contest is complete and the rewards are being distributed.