The _withdrawFromVault function in the LendingPool contract processes the withdrawal to the LendingPool contract instead of the RToken contract where the deposits are made.
The current withdrawal in the _withdrawFromVault function is:
This line processes the withdrawal to the LendingPool contract, which does not hold the assets. The withdrawal should be processed to the RToken contract where the deposits are made.
This issue prevents the LendingPool contract from correctly withdrawing liquidity from the Curve vault, potentially leading to liquidity management issues within the protocol.
link to the issue: https://github.com/Cyfrin/2025-02-raac/blob/89ccb062e2b175374d40d824263a4c0b601bcb7f/contracts/core/pools/LendingPool/LendingPool.sol#L810
Manual code review.
Update the withdrawal to correctly process the withdrawal to the RToken contract. The corrected withdrawal should be:
This ensures that the withdrawn amount is correctly processed to the RToken contract where the deposits are made.
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.