The RToken contract's burn function returns values in an incorrect sequence compared to its expected return values. This mismatch affects the LendingPool contract which calls this function, potentially leading to incorrect accounting and state management.
LendingPool::withdraw --> ReserveLibrary.withdraw--> RToken.burn()
LendingPool & ReserveLibrary expect amountScaled
but instead recieve amount
, which is higher than than amountScaled.
HIGH - This incorrect return sequence leads to:
The LendingPool receives amount
when it expects amountScaled
This causes incorrect accounting in the protocol as:
Scaled amounts are used for internal accounting
Wrong values are emitted during events
User balances may be incorrectly updated
Modify the return tuple to right sequence
return (amountScaled, totalSupply(), amount);
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.