The transferFrom function in the RToken contract uses an outdated liquidity index for scaling token amounts, while other transfer-related functions use the current normalized income from the lending pool. This can lead to incorrect token transfer amounts.
In the RToken contract, the transferFrom function scales amounts using the stored _liquidityIndex:
However, other similar functions like transfer and _update use the current normalized income from the lending pool:
The _liquidityIndex value may be outdated compared to the current normalized income, as it's only updated when updateLiquidityIndex is called by the reserve pool.
Incorrect token transfer amounts when using transferFrom
Users receiving more or fewer tokens than intended, depending on the difference between indices
Manual code review
Update the transferFrom function to use the current normalized income:
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.