The withdraw
function contains an error in its return statement, where the amountUnderlying
variable is returned in place of amountWithdrawn
.
The withdraw
function is designed to return three values:
However, amountUnderlying
is being returned in place of the first amountWithdrawn
.
This error leads to incorrect reporting of the withdrawn amount, which could cause accounting inconsistencies in other parts of the protocol or in external integrations.
Misreported withdrawal amounts could lead to incorrect balances in the protocol.
External contracts relying on these values may calculate rewards, interest, or fees incorrectly.
Manual review
Update the return statement to correctly return amountWithdrawn
:
This ensures accurate tracking of withdrawals and prevents downstream miscalculations.
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.