LendingPool does not have any reserve tokens to deposit into the curve vault.
When deposit is called by a user, it deposits the funds directly into the RToken contract:
All the tokens from deposit are sent to the RToken, leaving no tokens behind in the LendingPool.
So, when _rebalanceLiquidity, is called when deposit in LendingPool is called:
The function calculates the excess amount and if there are more reserveAssetAddress tokens in the reserveRTokenAddress then it tries to deposit this excess amount in the curve vault. But, it does so without first transferring these reserveAssetAddress tokens from the RTokento the LendingPool. Hence, when it tries to deposit it into the curve vault, it reverts, as it won't have the excess tokens in its balance.
Deposits in LendingPool will revert.
Manual review
Before transferring the excess amount to the curve vault, transfer the tokens from the RToken to the LendingPool.
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.