Snow::buySnow() not checking for return value from token transferIn Snow::buySnow() we are transferring tokens from caller to the contract. SafeERC20's safeTransferFrom() function is being used to do the operation
safeTransferFrom() internally calls the transferFrom() function. Even if the tx fails and returns false, the function does not check for the result and continues the operation. The transaction may be forced to fail deliberately so that the caller can get Snow tokens for free
Likelihood:
Transaction fails
Malicious WETH contract
Deliberate tx fails
Impact:
Snow tokens can be bought for free
Add the the following testcase to the test suite of Snow:
Also add the following contract to the import list. This contract is just for replicating a transfer call that fails and does not do any transfers.
Add checks to ensure that the transfer function returns a true before continuing to execute the rest of the function
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.