When the withdraw and borrow functions are called, both of these have an internal function- _ensureLiquidity that is called to check or make sure if their is sufficeint liquidity in the reserves to cover the amount that is being asked by the user for borrowing or withdrawals and if there isnt enough liquidity present in the reserves, the required liquidity that is needed for the borrow or withdraw is taken out from the CurveVault. The issue here is that when the users call those function borrow or withdraw the amount that they ask for is transferred to them from the RToken contract but in the case of liquidity being insufficient in that reserve the _withdrawFromVault function calls the CrvVault's withdraw function and in the receiver param address(this) is passed in i.e is the LendingPool contract in this case, however it should be the RToken address that should get the required amount so that the borrow and withdrawal amount can be given out/transferred to the caller but since the RToken address never receives the required amount. The result of this will be that both the borrow and withdraw functions will revert after reaching last line of the functions i.e updateInterestRatesAndLiquidity and inside this function this line will hit and the whole transaction will revert due to this. Also Note that this vulnerability can also be exploited by a malicious user via front running as all he will have to do is front run the borrower's tx and call borrow with an amount that will make the liquidtiy in the reserve insuffcient and that will also include the user spending some gas money for no reason due to this exploitation
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.