When rebalancing the Lending Pool liquidity, if more collateral is required, it is requested to be withdrawn from the Curve vault. However, the collateral received is stored directly in the Lending Pool contract instead of in the Rtoken one, breaking the protocol logic as it is not consistent with the overall system's collateral routing.
LendingPool::rebalanceLiquidity function is called after a deposit or withdrawal of collateral token in order to rebalance the system liquidity. When this function determines that there is collateral shortage, _withdrawFromVault function is called. As a general rule, collateral token is held in the RToken contract, nevertheless, the received amount from the vault is stored in the Lending Pool contract instead. This discrepancy compromises the system consistency causing further processes to fail as liquidity is not correctly rebalanced.
Impact: High
Likelihood: Medium
Manual Review
Add the corresponding logic to send to the RToken contract the collateral received from the vault.
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.