The function KittyVault::getTotalMeowllateralInAave
returns an incorrect value for the collateral supplied to Aave due to a flawed calculation involving price feeds and precision handling.
In the getTotalMeowllateralInAave
function, the calculation intended to return the total collateral value supplied to Aave in euros is incorrect. The issue arises from the improper handling of the price feed data and precision scaling, which results in an inaccurate representation of the collateral value.
Add the following to KittyFiTest.t.sol
test file:
Incorrect Collateral Reporting: The inaccurate calculation may lead to an incorrect report of the collateral value held in Aave, affecting system operations such as risk assessments, liquidation processes, and user balances.
Financial Discrepancies: Users may experience financial inconsistencies due to incorrect collateral values, potentially leading to unexpected liquidations or misallocated rewards.
Manual review
Foundry
Correct the Calculation: Adjust the calculation to ensure the precision is properly handled when converting the collateral value from Aave's base units to euros.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.