The RAACMinter#getUtilizationRate() function is intended to calculate the utilization rate of the lending pool by dividing the total borrowed amount by the total deposited amount and returning a value in BPS between 0 and 100.
Currently, RAACMinter#getUtilizationRate() is implemented as follows:
We can observe that, instead of retrieving the total debt from the lending pool, the function fetches the usageIndex, which is a normalized value of the total debt and has 27 decimals by default.
This causes the function to return a value far above 100, rendering the logic for utilizationTarget in calculateNewEmissionRate() ineffective.
Manual review
Add the following function to both LendingPool.sol and ILendingPool.sol:
Then, update the totalBorrowed variable to:
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.