The _withdrawFromVault
function in LendingPool
calls curveVault.withdraw(...)
with maxLoss
set to 0
. This strict requirement can cause transactions to revert due to minimal price fluctuations, even when the losses are insignificant. This could lead to unnecessary failures and prevent withdrawals under normal market conditions.
The `maxLoss` parameter is hardcoded to `0`, meaning that even the slightest fluctuation in asset value or rounding discrepancies in the Curve vault can cause a transaction failure.
Key issues:
Even small, acceptable losses (e.g., a few basis points) can cause reverts, making withdrawals unreliable.
The function does not provide flexibility to set a reasonable tolerance for minimal discrepancies.
Withdrawals may fail unnecessarily, frustrating users and causing inefficiencies.
Manual review
Modify `_withdrawFromVault` to accept a small `maxLoss` threshold to prevent unnecessary reverts due to minor fluctuations:
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.