The buySnow() function accepts native ETH (msg.value) as payment. When msg.value exactly equals the required fee, ETH payment succeeds. Otherwise, the else branch charges WETH via safeTransferFrom.
When a user sends ETH that does not exactly match the fee, the else branch executes: WETH is transferred from the user and the sent ETH remains trapped in the contract. The user pays twice — once in ETH (trapped, no refund) and once in WETH.
Likelihood:
Any user who sends ETH that is off by even 1 wei from the exact fee will trigger the else branch, resulting in double payment.
UI rounding errors, gas estimation quirks, or dynamic fee changes can cause legitimate users to send mismatched ETH amounts.
Impact:
Users permanently lose the ETH sent with the transaction — there is no refund mechanism. The trapped ETH can only be recovered via collectFee() by the fee collector, not returned to the user.
Users are simultaneously charged the full WETH amount, resulting in payment of up to 2x the intended fee.
The test sends ETH that is 1 wei short of the required fee. The contract traps the ETH and also charges the full WETH amount — the user pays double.
Explicitly revert when msg.value > 0 but does not match the expected fee. Separate the payment paths cleanly.
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.