This problem arises from the LendingPool::_withdrawFromVault()
function. The 3rd argument is wrong and will make the tx always revert.
As per the interface provided ICurveCrvUSDVault
, see here:
When LendingPool
deposits in curve this address is address(this)
, the very same LendingPool
. See here.
And as per the withdraw()
interface:
But when withdrawing lending pool passes msg.sender
as the owner argument instead of address(this)
(see here), which is incorrect and will likely result in reverts. As the user will not have any shares himself or in case he does, he won't have approvals to LendingPool
to move his shares.
_withdrawFromVault()
is incorrectly implemented due to the owner argument. DOSing vital funcitons that depend on it like LendingPool::withdraw()
or LendingPool::borrow()
. They both call withdrawFromVault()
form _ensureLiquidity()
.
At _withdrawFromVault()
the owner arg should be address(this)
.
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.