The buySnow() method collects WETH payment from the buyer in the else branch, if the specified msg.value were not set to the correct total amount (s_buyFee * amount). The else branch should also require that msg.value == 0.
Without the msg.value check in the else branch, the buyer may potentially pay in both ETH and WETH tokens to mint SNOW tokens.
line 86 of Snow.sol
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.