Core Contracts

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

RAACMinter setters will revert

Summary

RAACMinter.sol has 3 setters that interact with the RAACToken contract, setSwapTaxRate, setBurnTaxRate and setFeeCollector, these functions call onlyOwner functions in the RAACToken contract. The owner in RAACToken is set in its constructor, and the already deployed RAACToken address used in RAACMinter is set in it's constructor, thus RAACMinter can never be the owner of RAACToken.

Vulnerability Details

PoC, the following code can be added to the RAACMinter.test.js tests:

it("should revert on onlyOwner functions", async function () {
expect(raacMinter.setSwapTaxRate(100)).to.be.revertedWith("Ownable: caller is not the owner");
expect(raacMinter.setBurnTaxRate(100)).to.be.revertedWith("Ownable: caller is not the owner");
expect(raacMinter.setFeeCollector("0xd8da6bf26964af9d7eed9e03e53415d37aa96045")).to.be.revertedWith("Ownable: caller is not the owner");
});

And run the test file with npx hardhat test test/unit/core/minters/RAACMinter.test.js

Impact

Those 3 functions will always revert.

Tools Used

Manual review

Recommendations

Create an OnlyOwnerAndMinter modifier for the RAACToken functions that RAACMinter needs to execute.

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.