The RAACMinter::getUtilizationRate() function returns an incorrect utilization rate due to a mismatch in the decimal places of totalBorrowed and totalDeposits. This results in the utilizationRate > utilizationTarget condition always evaluating to false, causing the emission rate to always be adjusted in the same direction, leading to incorrect reward distributions in the StabilityPool.
The RAACMinter::getUtilizationRate() function calculates the utilization rate as a percentage (0-100) using the formula (totalBorrowed * 100) / totalDeposits. However, totalBorrowed is in WadRayMath.RAY basis (27 decimals), while totalDeposits is in 18 decimals.
In the calculateNewEmissionRate() function, the condition utilizationRate > utilizationTarget is always evaluated as true because of the incorrect calculation of utilizationRate. As a result, the emission rate is always adjusted according to the first branch of the conditional logic, which leads to incorrect emission rates being applied.
RAACMinter.sol
The incorrect calculation of the utilization rate results in the emission rate always being adjusted incorrectly, which leads to distorted reward distributions for users in the StabilityPool.
vscode
Ensure that the decimal precision of totalBorrowed and totalDeposits are aligned before performing the utilization rate calculation.
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.