Root + Impact
Snow.buySnow() does not refund native ETH when the WETH purchase path is taken. If a user accidentally sends ETH alongside a WETH transaction, the ETH is permanently stuck in the contract, causing direct loss of user funds.
Description
• Normal behavior: When a user purchases Snow tokens with WETH, any accidentally sent native ETH should be fully refunded to the sender. • Specific issue: In the else branch of buySnow(), the contract pulls WETH via safeTransferFrom but completely ignores msg.value. The ETH is never refunded and remains locked until collectFee() is called by the collector.
Risk
Likelihood: Medium • A user may accidentally send ETH while intending to buy with WETH (e.g., via a frontend bug, copy-paste error, or wallet default behavior). • The function accepts payable ETH, so the compiler allows any msg.value to be sent.
Impact: High • Direct, permanent loss of user funds. The user loses both the stuck ETH and the WETH pulled by safeTransferFrom. • ETH remains in the contract until the collector calls collectFee(), which may happen days or weeks later, leaving the user with no immediate recourse.
Proof of Concept
solidity
Recommended Mitigation
solidity
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.