The getUtilizationRate() function in RAACMinter has multiple critical issues:
Uses usage index (ray 27 decimals) instead of actual borrowed amount
Uses StabilityPool deposits instead of LendingPool deposits
Has decimal mismatches in calculations
In RAACMinter, getUtilizationRate() attempts to calculate the protocol's utilization rate but uses incorrect values, according to the doc it should use the lending pool to get the system utilization.
The issues are:
getNormalizedDebt() returns the usage index (27 decimals) instead of actual borrowed amount:
Uses StabilityPool deposits when it should use LendingPool's reserve.totalLiquidity for utilization calculation
Even if correct values were used, there's a decimal mismatch in the calculation
This broken utilization is then used in calculateNewEmissionRate():
Protocol's emission rate adjustment mechanism is completely broken
Utilization calculation uses wrong pool deposits
Uses index value instead of actual borrowed amount
Mismatched decimals in calculations
Could lead to incorrect emission rates
Core protocol tokenomics rendered ineffective
Tools Used:
Manual Review
Use the calculateUtilizationRate from the ReserveLibrary
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.