LendingPool lacks fallback mechanisms for handling Curve vault withdrawal failures, which can block withdrawals, borrowing and potentially liquidations if the vault has insufficient liquidity.
The _ensureLiquidity function attempts to withdraw from Curve vault when local liquidity is insufficient, but has no fallback if withdrawal fails due to insufficient vault liquidity. This causes the entire transaction to revert, blocking critical protocol functions.
If Curve vault has insufficient liquidity:
Users cannot withdraw their deposits
Borrowers cannot take new loans
Liquidations could be impacted
Protocol functionality is disrupted
Users lose access to funds temporarily
Potential loss of unmatured yield if system needs emergency pause
Users deposit funds, excess is moved to Curve vault
When user tries to withdraw:
If local liquidity insufficient, tries Curve withdrawal (of needed rest)
Withdrawal reverts due to insufficient vault funds (if needed rest is higher than available funds there)
User's withdrawal fails completely
Protocol functions requiring liquidity are blocked
Manual review
Implement fallback mechanism for failed Curve withdrawals:
Add partial withdrawal support if full amount unavailable
Implement proactive rebalancing based on liquidity thresholds
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.