Core Contracts

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

RAACMinter Cannot Fully Control RaacToken or Set Necessary Parameters as Owner

Summary

The RAACMinter.setFeeCollector function invokes RaacToken.setFeeCollector, which is restricted to the contract owner (onlyOwner). This implies that RAACMinter should be the owner of RaacToken. (this is true for other RAACMinter functions like setSwapTaxRate and setBurnTaxRate)

However, RAACMinter does not cover other owner-exclusive functions, such as manageWhitelist, setTaxRateIncrementLimit and setMinter, limiting its ability to manage RaacToken fully.
The issue gets worse when we realize that RAACToken can only have one owner and RAACMinter can not delegate ownership to another address.

Vulnerability Details

RAACMinter has a function to set feeCollector:

function setFeeCollector(address _feeCollector) external onlyRole(UPDATER_ROLE) {
if (_feeCollector == address(0)) revert FeeCollectorCannotBeZeroAddress();
raacToken.setFeeCollector(_feeCollector);
emit ParameterUpdated("feeCollector", uint256(uint160(_feeCollector)));
}

It calls raacToken function. which is restricted to onlyOwner:

function setFeeCollector(address _feeCollector) external onlyOwner {
// Fee collector can be set to zero address to disable fee collection
if(feeCollector == address(0) && _feeCollector != address(0)){
emit FeeCollectionEnabled(_feeCollector);
}
if (_feeCollector == address(0)){
emit FeeCollectionDisabled();
}
feeCollector = _feeCollector;
emit FeeCollectorSet(_feeCollector);
}

but there is not function in RAACMinter to for example setMinter in RAACToken as owner

Impact

RAACMinter’s admin functions will revert due to insufficient access. Alternatively, if RAACMinter is considered the owner of RaacToken, it still cannot fully control it or set the necessary parameters as its owner.

Tools Used

vscode

Recommendations

Grant RAACMinter the necessary permissions in RaacToken by introducing a specific role (e.g., FEE_MANAGER_ROLE) instead of restricting access to onlyOwner.

OR

Add necessary functions to RAACToken (as owner of RaacToken)

Updates

Lead Judging Commences

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

RAACMinter lacks critical ownership transfer functionality and parameter management after receiving RAACToken ownership, causing permanent protocol rigidity

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

RAACMinter lacks critical ownership transfer functionality and parameter management after receiving RAACToken ownership, causing permanent protocol rigidity

Support

FAQs

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