メインコンテンツまでスキップ

Ownership Management Standard

Status: Final

Standardized Ownership Management for Smart Contracts

Abstract

This proposal defines a standard interface for reading and managing ownership of smart contracts on Core Blockchain. It provides functions to transfer and renounce ownership and a standard event for observing ownership changes.

Motivation

Many smart contracts restrict administrative operations to a single owner. A standard interface allows wallets, registries, user interfaces, and other contracts to read the current owner and interact with ownership management without depending on a particular internal implementation.

Specification

CBC-102 Interface

The following specification uses syntax from Ylem 0.8.4 (or above).

interface CBC102 {
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

function owner() external view returns (address);
function renounceOwnership() external;
function transferOwnership(address newOwner) external;
}

Implementations MAY declare these functions as public or external. The owner() function MAY be declared as pure or view.

Ownership

owner() MUST return the address of the current owner. If ownership has been renounced, it MUST return the real zero address, address(0).

This standard does not prescribe how ownership is stored or calculated. State variables such as _owner, constructors, initializers, and modifiers such as onlyOwner are implementation details and are not part of the CBC-102 interface.

Transferring Ownership

transferOwnership(address newOwner) MUST:

  • revert when called by an account other than the current owner;
  • revert when newOwner is either address(0) or the CBC-100 checksummed zero address represented by Checksum.zeroAddress() in Core OpenZeppelin;
  • set newOwner as the current owner on success; and
  • emit OwnershipTransferred(previousOwner, newOwner) on success.

The standard does not prescribe a revert reason or error type. It also does not restrict newOwner to an externally owned account; another smart contract MAY own a CBC-102 contract.

Renouncing Ownership

renounceOwnership() MUST:

  • revert when called by an account other than the current owner;
  • set the current owner to the real zero address, address(0); and
  • emit OwnershipTransferred(previousOwner, address(0)) on success.

After renunciation, no caller can satisfy an ownership check based on owner(). CBC-102 itself exposes no function for restoring ownership, although an implementation MAY provide additional recovery or governance mechanisms outside this standard.

Initial Ownership

CBC-102 does not require a particular initialization mechanism or require the deployer to be the initial owner. When an initial non-zero owner is established, the implementation SHOULD emit OwnershipTransferred(address(0), initialOwner).

Interface Identification

The CBC-102 interface identifier is 0x4ae1c531, calculated as the XOR of the following Core function selectors:

  • owner()0xbe0e67a3
  • renounceOwnership()0x5e0827e9
  • transferOwnership(address)0xaae7857b

The OwnershipTransferred event is not included in the interface identifier.

A CBC-102 implementation SHOULD implement CBC-165 and return true for both 0x80ada41b and 0x4ae1c531. CBC-165 discovery is not a requirement for CBC-102 function and event conformance; existing contracts that implement the CBC-102 behavior without supportsInterface remain compatible with this standard.

Rationale

The interface follows the ownership model used by Core OpenZeppelin while keeping internal storage and access-control mechanisms outside the standard. A dedicated renounceOwnership() function distinguishes intentional renunciation from ordinary ownership transfer and allows transferOwnership() to reject both Core representations of the zero address.

Keeping CBC-165 discovery recommended rather than mandatory preserves compatibility with existing Core ownership implementations while allowing new contracts to expose machine-readable interface support.

Backward Compatibility

The function and event signatures are compatible with the current Core OpenZeppelin Ownable implementation. Existing contracts with different ownership APIs are not automatically CBC-102 compliant and may require an adapter. This proposal introduces no Core Blockchain protocol changes.

Security Considerations

  • Compromise or loss of the owner's private key can compromise or permanently disable owner-controlled functionality.
  • Ownership transfer is a one-step operation. Transferring to an incorrect address can permanently lose administrative control; implementations MAY provide a two-step transfer extension.
  • Renouncing ownership can permanently disable all functionality restricted to the owner. Applications SHOULD clearly warn users before submitting a renunciation transaction.
  • If the owner is another contract, the security and availability of that contract become part of the ownership trust model.
  • A positive CBC-165 response declares interface support but does not prove that an implementation is correct or trustworthy.

Conclusion

The CBC-102 standard provides a common interface for reading, transferring, and renouncing smart contract ownership on Core Blockchain while allowing different internal ownership implementations.

Copyright and related rights waived via CC0.

Author: Moji
Tags:CBC