users are DOSed from withdrawing and borrowers or lose curveVault shares when there is not enough liquidity in the LendingPool due to a flaw in the LendingPool::_withdrawFromVault function.
When withdrawing funds or borrowing assets to users, the pool ensure if there enough liquidity available to perform the operation. The LendingPool::_ensureLiquidity function verifies it and pull funds from the curve Vault if needed using the LendingPool::_withdrawFromVault function.
The issue is that the LendingPool::_withdrawFromVault function set msg.sender (the user) as the owner of the curveVault shares to be use to pull assets from the curve vault.
The results can be two-fold:
If the user does have curveVault shares and has approve the LendingPool to spend them, his shares are used to pay for part of the assets he receives. The amount of his shares corresponding to the amount of assets to withdraw from curveVault is burned and the assets is sent to the LendingPool.
If the user doesn't have curveVault shares anymore, the transaction reverts.
Manual review.
Change the owner to address(this) in the call to curveVault.withdraw function.
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.