Core Contracts

Regnum Aurum Acquisition Corp
HardhatReal World AssetsNFT
77,280 USDC
View results
Submission Details
Severity: medium
Valid

missing liquidity rebalancing after _repay() or liquidation in LendingPool.sol

Summary

missing rebalanceLiquidity() after users repay or liquidated.

Vulnerability Details

LendingPool implements a feature that whenever there is a balance change, such as deposit, borrow, or withdraw, liquidity must be rebanlanced between the buffer and the vault to maintain a desired buffer ratio so users can have enough in time asset to withdraw. However this feature is lacking after repay() or finalizeLiquidation() action.

https://github.com/Cyfrin/2025-02-raac/blob/89ccb062e2b175374d40d824263a4c0b601bcb7f/contracts/core/pools/LendingPool/LendingPool.sol#L398-L431

https://github.com/Cyfrin/2025-02-raac/blob/89ccb062e2b175374d40d824263a4c0b601bcb7f/contracts/core/pools/LendingPool/LendingPool.sol#L496-L536

Impact

Some amount of tokens(crvUSD) may be left in reserve which will not be deposited into vault to earn yields.

Tools Used

manual

Recommendations

consider add rebanlanceLiquidity() after _repay()/finalizeLiquidation() method.

Updates

Lead Judging Commences

inallhonesty Lead Judge 4 months ago
Submission Judgement Published
Validated
Assigned finding tags:

LendingPool::finalizeLiquidation or repay doesn't call _rebalanceLiquidity, leaving excess funds idle instead of depositing them in Curve vault for yield

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.