Core Contracts

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

ERC-20 tokens cannot be rescued from RToken contract

Summary

The RToken contract has a function for rescuing ERC-20 tokens which cannot be used as intended.

Vulnerability Details

RToken::rescueToken() has the onlyReservePool modifier making this function callable only from _reservePool.

modifier onlyReservePool() {
if (msg.sender != _reservePool) revert OnlyReservePool();
_;
}

The issue stems from the fact that the contract address stored in _reservePool(LendingPool) has no way of calling RToken::rescueToken().

Impact

If ERC-20 tokens are transferred to the RToken contract by mistake the functionality intended for rescuing them cannot actually be used.

Tools Used

Manual review

Recommendations

Either implement the function that calls RToken::rescueToken() in LendingPool or change the access control logic on RToken::rescueToken() to onlyOwner so it's consistent with LendingPool::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.