When the transfer fail the ERC20 will return a boolean and will not revert in i_weth.transfer(s_collector, collection);
because of this the function will continue to execute without transfering.
Likelihood: Low
ERC20 transfer failures are not a frequent occurrence, so the likehood is low.
Impact: High
Fail to transfer WETH to collector
To prove this I will make the required modifications in few places.
We need to modify a bit the MockWETH.sol for the purpose of the test
We execute the current testCollectFee
with little modification to assert only WETH balances after execution and swap values
As we can see the function executes without error and the WETH transfer fails silently.
Adding error S_TransferFail();
and checking if the transfer is failing.
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.