The getUtilizationRate function in the RAACMinter contract calculates the utilization rate using the getNormalizedDebt function from the LendingPool contract. However, getNormalizedDebt only returns the usageIndex, not the total RTokens minted, which represents the total scaled debt. This leads to incorrect utilization rate calculations and affects the emission rate of RAAC tokens.
The current getUtilizationRate function in the RAACMinter contract is:
the getNormalizedDebt function in LendingPool contract is:
The getNormalizedDebt function in the LendingPool contract only returns the usageIndex, not the total RTokens minted, which represents the total scaled debt.
Links:
This issue can lead to incorrect utilization rate calculations, which affects the emission rate of RAAC tokens. This can result in incorrect token minting and distribution, potentially impacting the overall tokenomics of the protocol.
Manual code review.
Update the getUtilizationRate function to correctly calculate the total borrowed amount by using the total scaled debt. The corrected function should be:
Additionally, ensure that the LendingPool contract has a function to return the total scaled debt:
This ensures that the utilization rate is correctly calculated, leading to accurate emission rate calculations and token minting.
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.