The MarketMakingEngineConfigurationBranch contract inherits from OwnableUpgradeable, which uses a single-step ownership transfer mechanism. This implementation is vulnerable to accidental ownership transfers if the new owner address is mistyped or invalid, potentially leading to permanent loss of contract control. The contract should be upgraded to use Ownable2Step, which implements a safer two-step ownership transfer process.
The current implementation uses OwnableUpgradeable, which allows the owner to transfer ownership directly to a new address in a single transaction. This poses a significant risk because:
1. Irreversible Mistake: If the owner accidentally transfers ownership to an incorrect or invalid address (e.g., due to a typo), the ownership is permanently lost, as there is no way to recover it.
No Confirmation Mechanism: The new owner does not need to explicitly accept the ownership transfer, increasing the likelihood of accidental transfers to unintended addresses.
The Ownable2Step pattern mitigates these risks by introducing a two-step process:
Propose Ownership: The current owner initiates the transfer by proposing a new owner.
2. Accept Ownership: The proposed owner must explicitly accept the ownership transfer in a separate transaction.
This ensures that ownership is only transferred to a valid and intended address, reducing the risk of accidental loss of control.
Severity: Low
Likelihood: Medium (Human error is common, especially when dealing with long hexadecimal addresses)
Impact: High (Permanent loss of contract control)
Typographical Error: The owner accidentally transfers ownership to 0x123... instead of 0x132..., resulting in permanent loss of control.
Invalid Address: The owner transfers ownership to a contract address that cannot accept ownership, rendering the contract unmanageable.
3. Malicious Exploitation: An attacker could social-engineer the owner into transferring ownership to a malicious address.
Manual code review
OpenZeppelin documentation review
Upgrade the contract to use Ownable2Step instead of OwnableUpgradeable. Here's the updated code:
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.