Core Contracts

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

Trapped Tokens Due to Unused RToken Rescue Function

Summary

RToken has a rescueToken function to recover trapped tokens, but it's never called by LendingPool or ReservePool, permanently trapping any tokens accidentally sent.

Vulnerability Details

// 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);
}
// LendingPool.sol and ReservePool.sol
// No implementation of token rescue functionality exists
  1. User accidentally sends USDT to RToken

  2. No rescue mechanism exists in LendingPool/ReservePool

  3. USDT is permanently trapped

Impact

There is a function to rescueToken in RToken that will never work as it's never called in Lending/Reserve Pool

Tools Used

Manual

Recommendations

Implement a rescue function into LendingPool

function rescueTokenFromRToken(
address token,
address recipient,
uint256 amount
) external onlyOwner {
IRToken(rToken).rescueToken(token, recipient, amount);
emit TokenRescued(token, recipient, amount);
}
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.