Beginner FriendlyDeFiFoundry
100 EXP
View results
Submission Details
Severity: high
Invalid

`MoneyShelf::withdrawUSDC` function has no check for the return value of the transfer function being used

Summary

function withdrawUSDC(address account, address to, uint256 amount) external {
withdraw(account, amount);
crimeMoney.burn(account, amount);
-->> usdc.transfer(to, amount);
}

Impact

The user can call the withdrawUDSC infinite number of times and may cause harm to the protocol by using some exploits as the return value of the transfer function is not checked.

Tools Used

slither , aderyn , manual review

Recommendations

Add following lines in the code

function withdrawUSDC(address account, address to, uint256 amount) external {
withdraw(account, amount);
crimeMoney.burn(account, amount);
+ require(usdc.transfer(to,amount) != false , "Transfer failed!!");
- usdc.transfer(to, amount);
}
Updates

Lead Judging Commences

n0kto Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.