Core Contracts

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

Curve vault going into emergency Shutdown will DOS the lendingPool's deposit functions too

Summary

When the curveVault goes into emergency shutdown, only the withdraw operations are active. The deposit functions are blocked. And thus the _depositIntoVault function will revert every time a user tries to deposit into the lendingPool.

Vulnerability Details

The root cause of this issue are 2:

  1. There is no function to withdraw all the funds from the vault without users withdrawing from the LendingPool

  2. There is no way to make the curveVault address back to addess(0)

    When the curveVault goes into emergency shutdown (or gets a deposit limit/withdraw limit etc) the depositfromVault function (and in some cases withdrawFromVault function) stop working. This makes the deposit function (and in some cases withdraw() function) of the lending Pool unavailable.

    function setCurveVault(address newVault) external onlyOwner {
    // new vault cant be address(0)
    require(newVault != address(0), "Invalid vault address");
    address oldVault = address(curveVault);
    curveVault = ICurveCrvUSDVault(newVault);
    emit CurveVaultUpdated(oldVault, newVault);
    }
    function _depositIntoVault(uint256 amount) internal {
    IERC20(reserve.reserveAssetAddress).approve(address(curveVault), amount);
    // the deposit function below will revert in case of an emergency shutdown of the curveVault
    curveVault.deposit(amount, address(this));
    totalVaultDeposits += amount;
    }

Impact

Dos of deposit function when emergency shutdown of curveVault occurs. Or dos of withdraw function too if withdraw limit is imposed.

Tools Used

manual review

Recommendations

add functions to withdraw from the curve vault without withdrawing from the lending Pool. Allow the curveVault address to be set to address(0)

Updates

Lead Judging Commences

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

LendingPool core operations revert if Curve vault is unavailable during rebalancing, even when sufficient liquidity exists in the pool

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

LendingPool core operations revert if Curve vault is unavailable during rebalancing, even when sufficient liquidity exists in the pool

Support

FAQs

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

Give us feedback!