LendingPool uses a hardcoded 0 BPS when withdrawing from curveVault.
As a result, LendingPool may be temporarily or even permanently unable to withdraw from curveVault
The LendingPool deposits a part of its liquidity to curve vault for additional rewards for LPs.
On withdraw or borrow to/from LendingPool, if required, LendingPool withdraws from the curveVault to ensure sufficient liquidity is available.
The curveVault is the savings crvUSD vault which make use of Yearn V3 vault.
According to Yearn docs the maxLoss is defined as:
The problem is that the maxLoss used to withdraw from curveVault is hardcoded to 0 BPS.
If the loss is even slightly higher than 0 BPS, the transaction reverts.
This may result in the inability to withdraw funds from the curveVault.
The lendingPool may be temporary unable to fulfill withdraw and/or borrow request even if total liquidity (balance of LendingPool and the amount deposited in curveValut) is sufficient.
On extreme cases, when a loss greater than 0 bps persists, the funds deposited in curveVault may not be withdrawable at all.
Consider implementing one of the following :
use a configurable value > 0 BPS for maxLoss . Only admin/governance can update this value;
use redeem instead of withdraw as suggested by Yearn; do not overwrite the maxLoss default value, but keep in mind that:
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.