getNormalizedIncome
and getNormalizedDebt
functions in LendingPool contract are defined as follows:
This is a serious issue as these 2 functions don't return the normalised index (either liquidity or usage index), but the last updated index, contrary to what ReserveLibrary does.
The impact of this vulnerability is high, as it leads to incorrect assumptions in RToken and DebtToken contracts where these 2 functions are used for calculating balances, total supply and fees in general.
Manual review
Make sure to use the ReserveLibrary implementation in the LendingPool contract for both functions to correctly compute normalised indexes:
Note that ReserveLibrary getNormalizedDebt
is wrongly implemented but this is another issue.
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.