First Flight #21: KittyFi

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

KittyVault::getTotalMeowllateralInAave function ignores return value by (totalCollateralBase,,,,,) = i_aavePool.getUserAccountData(address(this)), resulting is computation having no effect.

Summary

KittyVault::getTotalMeowllateralInAave function Gets the total sum of collateral deposited in Aave and the collateral earned by interest from Aave. KittyVault::getTotalMeowllateralInAave function ignores the return value by (totalCollateralBase,,,,,) = i_aavePool.getUserAccountData(address(this)). This results in computation having no effect, the protocol would not be able to gets the total sum of collateral deposited in Aave and the collateral earned by interest from Aave.

Vulnerability Details

function getTotalMeowllateralInAave() public view returns (uint256) { // @audit
@> (uint256 totalCollateralBase, , , , , ) = i_aavePool.getUserAccountData(address(this));
@> (, int256 collateralToUsdPrice, , , ) = i_priceFeed.latestRoundData();
return totalCollateralBase.mulDiv(PRECISION, uint256(collateralToUsdPrice) * EXTRA_DECIMALS);
}

Impact

The protocol would not be able to get the total sum of collateral deposited in Aave and the collateral earned by interest from Aave.

Tools Used

manual review

Recommendations

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

Updates

Lead Judging Commences

shikhar229169 Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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