Use Ownable2StepUpgradeable instead of OwnableUpgradeable
Both contracts use single-step OwnableUpgradeable. A typo or front-run on transferOwnership could permanently lose admin control.
Description
Both GenesisLicense and GenesisLicenseStaking contracts inherit from OpenZeppelin's OwnableUpgradeable:
contract GenesisLicense isGenesisLicenseStorages,EIP712Upgradeable,OwnableUpgradeable,// ...
The OwnableUpgradeable implementation allows ownership to be transferred in a single transaction, which creates risk if:
- The owner accidentally transfers to an incorrect address.
- The private key of the new owner is not accessible.
- The transfer transaction is front-run.
Impact
A misdirected transferOwnership cannot be undone. The protocol loses admin control of upgrade and configuration paths.
Recommendation
Replace OwnableUpgradeable with Ownable2StepUpgradeable in all contracts:
import "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol";contract GenesisLicense isGenesisLicenseStorages,EIP712Upgradeable,Ownable2StepUpgradeable,// ...
This implements a two-step ownership transfer process where:
- The current owner proposes a new owner (
transferOwnership). - The proposed owner must accept ownership (
acceptOwnership).
This pattern prevents accidental transfers to wrong addresses and provides stronger security guarantees for critical protocol administration functions.

