First Flight #21: KittyFi

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

`KittyVault::purrrCollateralToAave` function ignores return value by IERC20(i_token).approve(address(i_aavePool),_ameowntToSupply), as a result the computation has no effect.

Summary

KittyVault::purrrCollateralToAave function implements the supply of collateral to Aave pool to earn interest. But KittyVault::purrrCollateralToAave function ignores return value by IERC20(i_token).approve(address(i_aavePool),_ameowntToSupply), this makes the computation to have no effect, therefore there would not be supply of collateral to Aave pool to earn interest.

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 protocol would no be able to implement the supply of collateral to Aave pool to earn interest.

Tools Used

manual review

Recommendations

Ensure that the return values of the KittyVault::purrrCollateralToAave function are used.

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.