Description
The widthdrawUSDC function in MoneyVault does not check the boolean return value for success or failure. Not all IERC20 implementations revert() when there's a failure in transfer() or transferFrom(). The function signature has a boolean return value which indicates errors, but these errors may go unnoticed if the return value is not checked. This can potentially result in operations that should have been marked as failed going through without actually making a payment.
Impact
Without checking the return value of transfer() or transferFrom(), operations can not be appropriately handled if the transfer fails.
Recommended mitigation
Use appropriate checks such as:
Consider using openzepplin SafeERC20.
Tools Used:
Slither
Manual Review
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.