The execution flow is tick() --> updateEmissionRate() --> calculateNewEmissionRate() --> getUtilizationRate()
to calculate RAAC rewards. getUtilizationRate() calculates totalBorrowed
and totalDeposits
incorrectly:
On L242 lendingPool.getNormalizedDebt()
simply returns the usageIndex (something like 1.05e27) and not the value or amount of debt:
Similarly on L243 stabilityPool.getTotalDeposits()
returns the rTokens deposited in the stability pool, not the total crvUSD deposited into the system.
This is not the correct "current system utilization rate" and the function would return an incorrect value.
Users do not get their deserved reward.
On L242, consider using ReserveLibrary's getNormalizedDebt() function. Re-think the logic on L243 whether we need just rToken balance of stability pool or the system's crvUSD balance + borrowed crvUSD
.
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.