Core Contracts

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

Reentrancy in _rebalanceLiquidity - LendingPool.sol

Summary

External interactions with the CurveVault during liquidity rebalancing are susceptible to reentrancy attacks.

Vulnerability Details

_rebalanceLiquidity calls curveVault.deposit/withdraw, which can exploit the this contract’s storage if malicious code is present (e.g., via a compromised CurveVault).

Impact

An attacker could drain funds via reentrancy during liquidity withdrawals/deposits.

Tools Used

  • Slither: Detects reentrancy paths via external calls.

  • Manual Review: Check ordering of external calls vs. state updates.

Recommendations

Use Checks-Effects-Interactions by updating state before external calls.

// Update state before external call
address user = msg.sender;
bool success = IERC20(asset).transferFrom(user, address(this), amount);
require(success, "Transfer failed");
// Then call external contract
curveVault.deposit(amount, user);
Updates

Lead Judging Commences

inallhonesty Lead Judge 4 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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