This happens due to the denomination of totalBorrowed variable returned by the getNormalizedDebt function
By investingating the flow of the updateEmissionRate function, we see the it calls the calculateNewEmissionRate function:
In its pretty first line, the calculateNewEmissionRate function calls the getUtilizationRate function, that looks like this:
The problem here is that the LendingPool::getNormalizedDebt function, returns the usageIndex variable, which is denominated in RAY (27 decimals). This will make the (totalBorrowed * 100) / totalDeposits equation to always return an enormous percentages, which is going to make the calculateNewEmissionRate to increase the emissionRate every time. As can be seen in the RAACMinter:tick function, the emission rate is one of the main components for computing the amount minted for stability pool. This practically means that the users will receive more RAACToken rewards in the `StabilityPool` than they deserve
Leads to wrong calculations of emission rate, which leads to wrong rewards minted to the `StabilityPool` as can be seen here:
Manual Review
Since the returned value from getTotalDeposits function is 18 decimals, normalise the returned value from getNormalizedDebt to 18 decimals
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.