No rebalanceLiquidity was performed after _repay.
_rebalanceLiquidity is used to rebalance liquidity between the buffer and Curve vault to maintain the desired buffer ratio. The variables involved are uint256 currentBuffer = IERC20(reserve.reserveAssetAddress).balanceOf(reserve.reserveRTokenAddress);
. That is to say, as long as reserve.reserveRTokenAddress
changes, this function needs to call rebalancing. In the LendingPool.sol contract, the deposit, withdraw, and borrow functions all have _rebalanceLiquidity operations, but there is no _repay function.
After the _repay operation, if a certain asset in the pool (such as a borrowed asset) is reduced, and other assets are not adjusted in time through _rebalanceLiquidity (such as withdrawing or depositing into Curve Vault), it may cause an imbalance in the proportion of assets in the pool.
Manual review
Add _rebalanceLiquidity to the _repay function
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.