The RAACMinter
contract, which is designed to be the owner of the RAACToken
, lacks critical functionality for managing token ownership and paramter updates of the RAACToken
. Once ownership is transferred to the RAACMinter
, there is no mechanism to transfer ownership again, and the contract cannot disable fee collection due to a zero address check. It also doesn't implement the functions setTaxRateIncrementLimit
and manageWhitelist
which can't be called anymore once the Ownership is transferred.
As stated in the implementation details of the contract the RAACMinter
controls RAAC token parameters such as tax rates and fee collector but in order to do this the RAACMinter
must be the Owner of the RAACToken
, because the RAACToken
has the onlyOwner
modifier applied to it's update functions.
It's also important to notice that the documentation outligns that there should be a time delay mechanism for ownership transfers which is also missing in the current implementation:
Implements a 7-day delay mechanism for transferring RAACToken ownership
Provides a 24-hour window after the delay period to complete the ownership transfer
Missing Ownership Transfer Functionality and missing setTaxRateIncrementLimit
and manageWhitelist
in RAACMinter
While the RAACToken allows setting the fee collector to address(0) to disable fee collection, the RAACMinter prevents this functionality through its zero address check:
In order to run the test you need to:
Run foundryup
to get the latest version of Foundry
Install hardhat-foundry: npm install --save-dev @nomicfoundation/hardhat-foundry
Import it in your Hardhat config: require("@nomicfoundation/hardhat-foundry");
Make sure you've set the BASE_RPC_URL
in the .env
file or comment out the forking
option in the hardhat config.
Run npx hardhat init-foundry
There is one file in the test folder that will throw an error during compilation so rename the file in test/unit/libraries/ReserveLibraryMock.sol
to => ReserveLibraryMock.sol_broken
so it doesn't get compiled anymore (we don't need it anyways).
Create a new folder test/foundry
Paste the below code into a new test file i.e.: FoundryTest.t.sol
Run the test: forge test --mc FoundryTest -vvvv
Once ownership is transferred to the RAACMinter, the RAACToken becomes permanently locked under its control with no mechanism to transfer ownership again.
The inability to set the fee collector to address(0) prevents the RAACMinter from disabling fee collection, a feature that is intentionally supported by the RAACToken.
Can't manage setTaxRateIncrementLimit
and manageWhitelist
anymore
Manual review
Foundry
Implement ownership transfer functionality in the RAACMinter (and time delay mechanism)
Remove the zero address check for fee collector
Add functions to manage setTaxRateIncrementLimit
and manageWhitelist
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.