Both transfer() and transferFrom() manually scale the input amount (underlying units) by dividing by the current liquidity index. However, the overridden _update() function also scales the amount again. This results in double scaling, leading to incorrect token transfers (e.g., transferring amount / index² instead of amount / index).
This are the code snippets of transfer() and transferFrom in RToken :
However as transfer and transferFrom function calls _update with underlying function _transfer which also scale amount :
Discrepancy and amount miscalculation for transfer functions in RToken
Manual Review
Do the scale up at one side, either in the function itself or in the _update(underlying function)
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.