A discrepancy in the return values of the ReserveLibrary.withdraw
function results in incorrect data being returned to the LendingPool.withdraw
function.
The ReserveLibrary.withdraw
function is expected to return three values: amountWithdrawn
, amountScaled
, and amountUnderlying
. However, due to an implementation error, amountUnderlying
is returned twice instead of amountWithdrawn
. Specifically, the return statement incorrectly assigns amountUnderlying
in place of amountWithdrawn
:
Instead, it should return:
Incorrect Withdrawal Accounting: Since amountWithdrawn
is never correctly assigned, users and the protocol itself may misinterpret the actual amount withdrawn.
Manual Review
Fix the Return Statement: Modify the return values in ReserveLibrary.withdraw
to correctly return amountWithdrawn
:
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.