The RToken contract’s transfer and transferFrom functions use different scaling methods to calculate the transfer amounts. This inconsistency allows users to exploit whichever method results in a more favorable token amount, potentially causing discrepancies in token balances and unexpected economic behavior.
transfer function:
transferFrom function:
The transfer function uses ILendingPool(_reservePool).getNormalizedIncome() for scaling.
The transferFrom function uses _liquidityIndex for scaling.
These two values may differ, resulting in transferred amounts that are inconsistent depending on which function is used.
Users can exploit the discrepancy to receive more tokens or pay fewer tokens.
Potential loss of protocol funds or economic imbalances.
Manual code review.
Use a unified scaling method for both functions to maintain consistency:
Option 1: Standardize both to use getNormalizedIncome():
Option 2: Standardize both to use _liquidityIndex if that’s the intended approach:
This ensures that transfer and transferFrom provide consistent and predictable results.
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.