The getUtilizationRate() function in RAACMinter.sol incorrectly calculates the system’s utilization rate by assigning totalBorrowed to lendingPool.getNormalizedDebt(), which only represents the reserve's usage index, not the actual total debt borrowed. This leads to an highly underestimated utilization rate, resulting in incorrect emissions calculations and misallocated rewards.
The function currently sets totalBorrowed as lendingPool.getNormalizedDebt():
However, lendingPool.getNormalizedDebt() only returns reserve.usageIndex, which is a scaling factor, not the actual borrowed amount:
Consequently, the numerator, (totalBorrowed * 100) in the returned value is very much diminished and leads to a dwarfed emisionRate in calculateNewEmissionRate().
In the end, amountToMint to stabilityPool is so much diminished with very little RAAC rewards to distribute to the rToken depositors.
Since totalBorrowed is not properly scaled, the reported utilization rate is artificially lower than reality. This results in lower-than-expected rewards for rToken stakers in Stability Pool. The RAAC token incentives fail to properly incentivize participation, leading to a less attractive rToken locking. As such, more lenders will be prone to withdrawing their rTokens from LendingPool.sol, leading to less reserve token liquidity for lending.
Manual
Consider making the following refactoring making sure the actualDebt is proportionately calculated:
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.