Core Contracts

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

rescueToken in RToken does not work

Summary

rescueToken in RToken cannot work because of the access control.

Vulnerability Details

In RToken, there is one function rescueToken(). This function aims to rescue tokens mistakenly sent to this contract.
There is one modifier onlyReservePool for this function. It means that only the lending pool can trigger this function.

The problem here is that the lending pool contract never trigger this function. This will cause this function does not work as expected.

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

Impact

The feature rescueToken can not work as expected.

Tools Used

Manual

Recommendations

Add one interface in lending pool to trigger RToken::rescueToken().

Updates

Lead Judging Commences

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