Core Contracts

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

Incorrect USDC Withdrawal Destination in _withdrawFromVault

Summary

The LendingPool::_withdrawFromVault function in the contract mistakenly sends USDC tokens to the Lending Pool instead of the intended RToken address when withdrawing from the Curve vault.

Vulnerability Details

When there is insufficient liquidity in the RToken contract, _ensureLiquidity triggers _withdrawFromVault.

  • _withdrawFromVault calls `curveVault.withdraw(amount, address(this), msg.sender, 0, new address

  • The function parameters should ensure USDC is deposited into the RToken contract, but instead, it is being sent to the Lending Pool (msg.sender).

Impact

Withdrawn USDC from the Curve vault does not go to the RToken contract but rather to the Lending Pool.

Tools Used

Manual review

Recommendations

Modify _withdrawFromVault to ensure that withdrawn USDC is sent directly to the RToken contract instead of the Lending Pool

Updates

Lead Judging Commences

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

LendingPool::_depositIntoVault and _withdrawFromVault don't transfer tokens between RToken and LendingPool, breaking Curve vault interactions

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

LendingPool::_depositIntoVault and _withdrawFromVault don't transfer tokens between RToken and LendingPool, breaking Curve vault interactions

Support

FAQs

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