for transferFrom
function, the amount param is scaled down by dividing it with current index rate _liquidityIndex
but this value is never updated and only initialized in constructor (the value is 1 RAY or 1e27), leading to incorrect scaled amount transferred.
the state _liquidityIndex
can be changed by calling RToken::updateLiquidityIndex
but this function can only be called by corresponding reserve pool, and the reserve pool itself does not have any implementation to call said function.
transferFrom function would transfer invalid scaled amount, where this would later have issue when interacting with DeFI ecosystem (DEX, LP, lending-borrowing, etc)
manual review
remove the divide operation for amount, because the scaled amount would later be handled inside _update
function so no need to manually do this in this 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.