In the RToken
contract, the transfer operations (transfer
and transferFrom
) apply an additional scaling based on _liquidityIndex/getNormalizedIncome
. This scaling is duplicated because the overridden _update
function also scales transferred amounts. Consequently, users unintentionally send fewer tokens than expected when the _liquidityIndex
is above 1.
The RToken::transfer
and RToken::transferFrom
functions scale amounts using _liquidityIndex
or getNormalizedIncome
.
The _update
function (overridden from ERC20) scales them again.
This double scaling causes the actual transferred amount to be lower than intended and grows more significant as _liquidityIndex
increases.
Here is the code snippet for the issue:
Users will transfer less value than intended, leading to potential loss of funds or unexpected behavior in the protocol as the _liquidityIndex
rises.
Manual Review
Remove the scaling from transfer
and transferFrom
, allowing _update
to handle all required scaling once.
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.