The RAACMinter contract implements a dynamic emission rate mechanism that adjusts based on the system's utilization rate. The utilization rate is calculated using data from the LendingPool contract, which maintains indices that scale the borrowed and deposited amounts.
The updateEmissionRate() function in RAACMinter calculates a new emission rate based on the current utilization rate without first updating the LendingPool state. The LendingPool contract maintains liquidity and usage indices that scale the total borrowed and deposited amounts, and these indices need to be updated before reading the current state to ensure accurate calculations.
The root cause is in the updateEmissionRate() function, which directly calls calculateNewEmissionRate() without first calling lendingPool.updateState(). This leads to the getUtilizationRate() function using potentially stale indices when calculating the system's utilization.
High. The incorrect utilization rate directly affects the emission rate of RAAC tokens, which is a core economic parameter of the protocol. An inaccurate utilization rate could result in:
Over-emission of tokens when the actual utilization is lower than reported
Under-emission of tokens when the actual utilization is higher than reported
Both scenarios could destabilize the protocol's economic incentives.
High. This issue will occur every time the emission rate is updated unless the LendingPool state happens to have been updated in the same block by another operation.
User deposits into the lending pool, increasing the liquidity index
Time passes, during which interest accrues
updateEmissionRate() is called
getUtilizationRate() uses stale indices to calculate utilization
Emission rate is adjusted based on incorrect utilization data
Protocol emits incorrect amount of tokens until next update
Update the updateEmissionRate() function to refresh the lending pool state before calculating the new emission rate:
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.