The missing call to _rebalanceLiquidity() in repayment and liquidation functions will cause reduced yield generation for the protocol as funds won't be optimally allocated between the buffer and Curve vault.
In LendingPool.sol and LendingPool.sol, the _repay() and finalizeLiquidation() functions do not call _rebalanceLiquidity() after updating the protocol's liquidity state. This is inconsistent with other liquidity-affecting functions like deposit, withdraw, and borrow which properly rebalance liquidity.
The _rebalanceLiquidity() function ensures optimal fund allocation:
The protocol will generate suboptimal yields as funds may remain in the buffer when they could be earning yield in the Curve vault, or vice versa. This affects all users of the protocol who share in the yield generation.
Add calls to _rebalanceLiquidity() at the end of both _repay() and finalizeLiquidation() functions to ensure proper liquidity management after these operations.
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.