The LendingPool::_withdrawFromVault() function passes incorrect parameters to Curve's vault withdrawal function, which will cause withdrawals to fail and lock user funds in the vault.
The _withdrawFromVault function is called during withdrawals and liquidity rebalancing to pull funds from the Curve vault. However, it passes incorrect parameters:
The recipient is set to address(this)
(LendingPool) instead of the RToken contract which holds all protocol funds
The share owner is set to msg.sender
instead of the LendingPool which owns the vault shares
The Curve vault expects (ref):
recipient
: The address to receive the assets.
owner
: The address who's shares are being burnt.
Since the LendingPool deposits into the vault (receiving shares) but tries to withdraw with msg.sender
as the share owner, the withdrawal will revert.
User deposits 100 tokens via LendingPool::deposit
Tokens are sent to RToken contract
During rebalancing, LendingPool deposits excess into Curve vault and receives shares
Later when a user tries to withdraw:
_withdrawFromVault
is called to pull funds from vault
Function passes msg.sender
(user) as share owner instead of LendingPool
Vault reverts since user doesn't own any shares
Withdrawal fails and user funds remain locked
All withdrawals will fail when Curve vault integration is enabled due to incorrect withdrawal parameters
User funds deposited into the vault will be locked since they cannot be withdrawn
Fix withdrawal parameters:
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.