The buySnow() function has flawed payment logic that can result in users losing their ETH. When a user sends ETH but the amount doesn't exactly match the required fee, the function falls through to attempt a WETH transfer instead of reverting. This leaves the user's ETH stuck in the contract while also charging them WETH, resulting in double payment.
The function checks if msg.value equals the exact fee amount, and if not, it proceeds to transfer WETH from the user without refunding or reverting the ETH transaction.
Likelihood:
Users can easily send incorrect ETH amounts due to UI errors or miscalculation
The s_buyFee is multiplied by PRECISION (10^18) which may not be obvious to users
No warning or revert when incorrect ETH amount is sent
Impact:
User's ETH becomes permanently locked in the Snow contract
User is charged both ETH (stuck) and WETH for the same purchase
No mechanism exists to recover the stuck ETH
Poor user experience and potential fund 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.