According to the fact that EIP-20 states that zero-valued transfers must be accepted.
Checking non-zero transfer values can avoid an expensive external call and save gas.
While this is done at some places, it’s not consistently done in the solution.
There are 2
instances of this issue:
Adding a non-zero-value check for success = IERC20(tokenCollateralAddress).transferFrom(msg.sender,address(this),amountCollateral) at the beginning of DSCEngine.depositCollateral(address,uint256)
Adding a non-zero-value check for success = IERC20(tokenCollateralAddress).transfer(to,amountCollateral) at the beginning of DSCEngine._redeemCollateral(address,address,address,uint256)
Consider adding a non-zero-value check at the beginning of 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.