Core Contracts

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

`rescueToken` functionality in RToken contract is unavailable, leading to risk of tokens being stuck in the contract.

Summary

rescueToken function in RToken contract is protected with the onlyReservePool modifier:

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);
}

However, the reserve pool (lending pool) never calls rescueToken function, making it unusable.

Vulnerability Details

RToken contract is supposed to have a token rescue feature, which is actually not functional. This means it can lead to token being stuck in this contract.

Impact

The impact of this issue is high, as it prevents any token transfers from RToken to another address, leading to risk of funds being stuck in the contract.

Tools Used

Manual review

Recommendations

Make sure that the Lending pool calls rescueToken, either by creating a new function rescueTokenInRToken, or by integrating token rescue in the rescueToken function of the lending pool.

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.