Normally, users can buy Snow tokens by sending the exact amount of ETH or by paying with WETH. The contract mints the correct amount of Snow tokens and emits an event.
However, when a user sends less or more ETH than required and pays with WETH, the contract does not refund the ETH sent. This ETH remains stuck in the contract, as there is no withdrawal or refund logic for this scenario.
Likelihood:
This will occur whenever a user sends any ETH (msg.value > 0) that is not exactly equal to the required buy fee and pays with WETH.
Users may mistakenly send ETH along with their WETH payment, especially if interacting with the contract directly or via custom interfaces.
Impact:
Users can lose ETH by mistake, as it becomes stuck in the contract with no way to retrieve it.
The contract accumulates ETH that is not accessible, potentially leading to user frustration or loss of trust.
User sends 1 wei ETH and has enough WETH and approval
The contract mints 1 Snow token after taking WETH, but the 1 wei ETH remains stuck in the contract.
Add logic to refund any ETH sent in the WETH payment branch. This ensures that users who accidentally send ETH (either less or more than the required amount) while paying with WETH do not lose their funds.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.