The MarketMakingEngineConfigurationBranch contract inherits OwnableUpgradeable from Openzeppelin, but doesn't initialize the owner. This means the contract's owner is the zero address, the contract doesn't have an owner.
The MarketMakingEngineConfigurationBranch contract is OwnableUpgradeable, but doesn't have initialize function that initializes the owner:
The problem is that using upgradeable contracts such as OwnableUpgradeable, it is required to implement an initialize function that calls the base contract's initialize function. For example, this is done correctly in several other files such as UpgradeBranch (this file is out of scope):
The MarketMakingEngineConfigurationBranch contract doesn't call the _Ownable_init function and therefore the following logic from the OwnableUpgradeable contract is not executed:
Because of that the contract owner is not initialized and it is the zero address. This means that all functions that have onlyOwner modifier will always revert. All functions in the contract have onlyOwner modifier, so the contract can not be used at all.
Let's consider this PoC. For simplicity I made a new contract with only one function and skipped the parameters and function body:
And the test function:
The test shows that the owner address of the MarketMakingEngineConfigurationBranch contract is the zero address and each call to function that has onlyOwner modifier reverts:
All functions in the MarketMakingEngineConfigurationBranch contract have onlyOwner modifier, but the owner is not set. This means the functions from the MarketMakingEngineConfigurationBranch contract can not be used, because they will revert every time due to OwnableUnauthorizedAccount error.
The impact of that is the unability to execute critical functions for the protocol, some of them are: vaults and markets can not be created, updated or connected, engine, collateral can not be configured, markets can not be paused, unpaused, swap strategies can not be configured, fee recipients can not be set or updated.
Manual Review, Foundry
Implement a initialize function that calls the _Ownable_init function with the owner address parameter.
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.