The RToken contract uses a calculation logic based on Aave's aToken index-based system. To do it, they override three critical functions:
transfer()
transferFrom()
_update()
To attend mint()and burn() functions, the protocol overrides the _update() function so they can convert the input amount into scaladAmount. The problem is that transfer() and transferFrom() functions also use the update function and convert the amount into scaledAmount internally, before forwarding*. This cause the* scaledAmount forwarded by the transfer() and transferFrom() to be re-scaled on the update() function.
transfer
transferFrom
_update
It will generate big discrepancies between real values and expected values, breaking the protocol functionality.
Code Review
Remove the conversion from the transferFromand transferfunctions, centralizing the conversion inside of _updatefunction.
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.