Core Contracts

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

`LendingPool._depositIntoVault()` always reverts

Summary

The LendingPool._depositIntoVault() function always reverts because there is no reserveAssetToken available in the LendingPool itself.

Vulnerability Details

The _depositIntoVault() function is intended to deposit reserveAssetToken into the curveVault. However, this is impossible because the LendingPool does not hold any assets; all reserve assets are located in the RToken.

As a result, _rebalanceLiquidity() also always reverts since it calls _depositIntoVault(). Consequently, both deposit() and withdraw() functions are rendered impossible as they rely on _rebalanceLiquidity(), breaking core functionalities.

function _depositIntoVault(uint256 amount) internal {
800 IERC20(reserve.reserveAssetAddress).approve(address(curveVault), amount);
curveVault.deposit(amount, address(this));
totalVaultDeposits += amount;
}

Impact

This issue breaks core functionalities, rendering the LendingPool contract useless.

Tools Used

Manual review

Recommendations

Before depositing into the curveVault, ensure that the necessary amount is brought from the RToken contract to the LendingPool.

Updates

Lead Judging Commences

inallhonesty Lead Judge 7 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 7 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.

Give us feedback!