First Flight #21: KittyFi

First Flight #21
Beginner FriendlyDeFiFoundry
100 EXP
View results
Submission Details
Severity: high
Invalid

subject: Unsafe ERC20 Operations should not be used, return values are not always meaningful

Summary

Unsafe ERC20 operations refer to potential vulnerabilities and inconsistencies in the implementation of the ERC20 token standard
that can lead to unexpected behavior or security risks in smart contracts interacting with these tokens.

Vulnerability Details

function purrrCollateralToAave(uint256 _ameowntToSupply) external onlyMeowntainer {
totalMeowllateralInVault -= _ameowntToSupply;
@> IERC20(i_token).approve(address(i_aavePool), _ameowntToSupply);
i_aavePool.supply( { asset: i_token, amount: _ameowntToSupply, onBehalfOf: address(this), referralCode: 0 } );
}

Impact

The protocal can get its funds locked.
Double Spending Allowances can occur thereby making the protocol to lose money

Tools Used

manual review

Recommendations

Use OpenZeppelin's SafeERC20 library.

Updates

Lead Judging Commences

shikhar229169 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.