LendingPool splits founds between curveVault and reserveRTokenAddress according to liquidityBufferRatio after every balance change. But as soon as vault would be set this would revert all the transactions, because of calling vault in incorrect way.
_rebalanceLiquidity is called to transfer founds between curveVault and reserveRTokenAddress.
Firstly it approves amount of tokens to transfer, but the problem is that lendingPool doesn't have any tokens to transfer, since all the tokens are owned by reserve.reserveRTokenAddressas it can be even seen in both _rebalanceLiquidity and _ensureLiquidity.
There is not a single moment, when LendingPool should have these tokens. So trying to deposit any amount would revert the transaction.
Withdrawing from the vault will also fail, because msg.sender is not an owner of the shares, address(this) should be send as a third parameter.
What is more, these tokens should not be sent to LendingPool, but to the reserveRTokenAddress. The purpose of calling this function is to prepare liquidity for withdrawing or borrowing, and assets for these operations are beeing transfered from the reserveRTokenAddress.
As soon as vault would be set, all borrows, withdraws and deposits will be reverted.
Manual Review
Vault deposits and withdrawals should be corrected.
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.