The getTotalMeowllateralInAave
function calculates the total value of collateral deposited in Aave in USD. The function retrieves the collateral price from Chainlink's price feed and uses it to convert the total collateral value to USD. However, the current implementation incorrectly adjusts the price feed value, potentially resulting in inaccurate calculations due to misalignment of precision handling.
The getTotalMeowllateralInAave
function retrieves the price of collateral in USD from Chainlink's price feed and multiplies it by EXTRA_DECIMALS
before performing the division. Chainlink price feeds commonly use 8 decimal places for price precision. By multiplying collateralToUsdPrice
by EXTRA_DECIMALS
, which is intended to align with precision, the calculation may incorrectly scale the price.
The misalignment in decimal precision can lead to incorrect calculations of the total collateral value in USD. This can affect the accuracy of financial computations within the contract, potentially impacting users' collateral calculations and leading to incorrect balance or liquidation assessments.
Manual Review
Modify the function to correctly align with the precision of the price feed.
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.