Core Contracts

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

Tokens cannot be rescued from RToken contract

Vulnerability Details

The RToken contract has a function called rescueTokenwhich allows the reserve pool to rescue tokens. Problem is that the pool does not implement this function.

// RToken.sol
function rescueToken(address tokenAddress, address recipient, uint256 amount) external onlyReservePool {
if (recipient == address(0)) revert InvalidAddress();
if (tokenAddress == _assetAddress) revert CannotRescueMainAsset();
IERC20(tokenAddress).safeTransfer(recipient, amount);
}

Notice the LendingPool has a function to rescue tokens, but this is to rescue tokens from the LendingPool, not the RToken contract.

// LendingPool.sol
function rescueToken(address tokenAddress, address recipient, uint256 amount) external onlyOwner {
require(tokenAddress != reserve.reserveRTokenAddress, "Cannot rescue RToken");
IERC20(tokenAddress).safeTransfer(recipient, amount);
}

Impact

  • Tokens sent to the RToken contract will be permanently lost since they cannot be recovered.

Tools Used

Manual Review

Recommendations

Implement a restricted function in LendingPool to call the RToken.rescueToken.

Updates

Lead Judging Commences

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

RToken::rescueToken() can never be called

Support

FAQs

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