Invalid Variable Usage in RToken::_liquidityIndex
The _liquidityIndex variable is designed to track cumulative interest and is expected to be updated by the LendingPool contract. However, in the current implementation, the new contract no longer maintains this functionality. Instead, the interest tracking mechanism has been replaced with ILendingPool(_reservePool).getNormalizedIncome().
As a result, _liquidityIndex no longer holds valid data but is still referenced in multiple functions, leading to potential inconsistencies.
Despite being obsolete, _liquidityIndex is still utilized in the following functions:
Since _liquidityIndex no longer holds valid data, any function that relies on it will return incorrect values, potentially affecting interest calculations and token transfers.
Manual Review
Replace _liquidityIndex with ILendingPool(_reservePool).getNormalizedIncome() when retrieving the liquidity index.
The transferFrom() function is not modified here because _liquidityIndex is initialized to 1e27, and scaling within transferFrom() is unnecessary.
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.