buySnow() accepts ETH as payment for Snow tokens when msg.value equals exactly s_buyFee * amount. When the caller
sends a non-zero msg.value that does not match this exact figure, the function silently falls through to the
WETH branch: it pulls WETH from the caller and mints Snow — but keeps the ETH. The ETH is then trapped in the
contract with no withdrawal path accessible to the sender, only recoverable via collectFee() by the collector
address.
A user who sends msg.value = s_buyFee * amount - 1 (off by 1 wei), or who sends ETH while also having WETH
approval, pays twice: once in ETH (lost) and once in WETH (pulled). There is no receive() / fallback() guard, and
no refund mechanism.
Likelihood:
When a user sends a slightly wrong ETH amount due to fee miscalculation, gas estimation rounding, or a frontend
bug
When a user interacts directly via Etherscan or a script and misjudges the fee
When a frontend constructs the transaction with a stale s_buyFee value
Impact:
Sender's ETH is permanently inaccessible to them — only the collector can retrieve it via collectFee()
User who has WETH approval loses both ETH and WETH for a single Snow mint
No on-chain event or revert indicates that anything went wrong — the transaction succeeds and emits SnowBought
Revert when msg.value is non-zero but does not match the required ETH amount. This makes the ETH/WETH path
selection explicit and prevents any ETH from being silently retained.
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.