To support lending operations, liquidity is rebalanced in LendingPool.sol via _rebalanceLiquidity(). However, in the event there is excess reserve assets, it is being transferred from LendingPool.sol instead of from rToken address.
In _rebalanceLiquidity(), the current buffer is defined as the balance of reserve assets(crvUSD) in rToken contract:
Let's assume the if statement executes whereby there is excess crvUSD in rToken contract. depositIntoVault()is now called.
LendingPool.sol (address(this)) deposits the excess crvUSD to the vault, instead of rToken depositing the excess to the vault.
[_depositIntoVault](https://github.com/Cyfrin/2025-02-raac/blob/89ccb062e2b175374d40d824263a4c0b601bcb7f/contracts/core/pools/LendingPool/LendingPool.sol#L799-L803)
Misallocation of liquidity can severely affect lending and borrowing operations, breaking the core functionality of the protocol.
Manual
In _depositIntoVault(), change the depositor address from address(this) to reserve.reserveAssetAddress
Invalidated by appeal in 1090
Invalidated by appeal in 1090
Invalidated by appeal in 1090
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.