The RToken contract has inconsistent scaling parameters between transfer and transferFrom functions, and lacks proper scaling in approve function. This can lead to incorrect transfer amounts and broken approve/transferFrom functionality.
In the transfer function, amounts are scaled using getNormalizedIncome():
However, in transferFrom, amounts are scaled using _liquidityIndex, which is NEVER updated :
The approve function inherits from ERC20 without any scaling, which means approved amounts won't match the scaled amounts needed for transferFrom
Transfers using transfer vs transferFrom will result in different amounts being moved due to different scaling factors
Approvals won't work correctly with transferFrom since the approved amount isn't scaled but transferFrom expects scaled amounts
This could lead to failed transfers and broken token functionality in DeFi integrations
Manual code review
Use consistent scaling across all transfer functions
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.