Summary
function withdrawUSDC(address account, address to, uint256 amount) external {
require(to == kernel.executor(), "MoneyVault: only GodFather can receive USDC");
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 {
require(to == kernel.executor(), "MoneyVault: only GodFather can receive USDC");
withdraw(account, amount);
crimeMoney.burn(account, amount);
+ require(usdc.transfer(to,amount) != false , "Transfer Failed");
_ usdc.transfer(to, amount);
}