The LendingPool._withdrawFromVault() function uses incorrect parameters when calling the Curve vault's withdraw function, passing address(this) as receiver and msg.sender as owner. This mismatch causes all vault withdrawals to revert, effectively blocking borrows, withdrawals, and sometimes deposits when the vault is configured.
The issue occurs in the _withdrawFromVault function which is critical for managing liquidity between the lending pool and Curve vault , the function calls the ICurveCrvUSDVault withdraw function and the parameters passed to it are:
and as we can see from the ICurveCrvUSDVault interface , the withdraw function has the following parameters:
the params passed to the withdraw function call in _withdrawFromVault are wrong , and will lead to a revert.
Incorrect Receiver , as the receiver is set to the LendingPool address , while tokens are sent from the rToken address:
Incorrect Owner:
This function is called in critical liquidity management flows inside the _insureLiquidity , and _rebalanceLiquidity functions:
the following flows are broken :
All borrows requiring vault liquidity will revert
All withdrawals requiring vault liquidity will revert
Deposits may revert during rebalancing
Protocol cannot access vault liquidity when needed
Manual code review
Fix the parameter order in _withdrawFromVault:
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.