For the complete documentation index, see llms.txt. This page is also available as Markdown.

Governance Contracts

The smart contracts behind Onyx Chain governance — Governor, Timelock, Snapshot Registry, stXCN, and the Grant Treasury — with addresses and roles.

Onyx Chain governance is implemented by a small set of purpose-built smart contracts deployed on Onyx Mainnet (chain ID 327). Each contract has one job, and no single party — including the team — can bypass the chain of checks they enforce together.

Architecture

The flow of authority is one-directional: stakers' balances feed snapshots, snapshots authorize proposals and votes in the Governor, the Governor commands the Timelock, and only the Timelock touches governed contracts.

Contract addresses (Onyx Mainnet, chain ID 327)

Contract
Address

Snapshot Registry (StXCNSnapshotRegistryV2)

Wrapped XCN (WXCN, Treasury grant asset)

The contracts

Governor

The Governor (OnyxGovernorV2) is the heart of the system — it is where proposals are created, voted on, and driven through their lifecycle. It is built on the industry-standard OpenZeppelin Governor framework, extended with proof-based eligibility:

  • Proof-bound proposing. proposeWithProof requires the proposer to attach a Merkle proof of their snapshot weight; the Governor checks it against the latest finalized eligibility snapshot in the Registry and enforces the proposal threshold (currently 100,000,000 staked XCN).

  • Proof-bound voting. The only accepted vote path carries the voter's weight and Merkle proof; the Governor verifies every vote against the proposal's finalized snapshot root. A vote without a valid proof counts as zero.

  • For-only quorum. Quorum (currently 200,000,000) is satisfied by For votes alone; passage additionally requires For > Against.

  • Fixed timing. Voting delay (1 day) and voting period (2 days) are compiled into the contract — they cannot be quietly changed by an operator. The threshold and quorum rates can be adjusted only within hard-coded bounds, and only by governance itself.

Onyx Chain Timelock

The Timelock (OnyxTimelockV2) is the executor and the safety buffer. When a proposal succeeds, the Governor queues its actions here, where they must wait a mandatory 2 days before execution:

  • The Timelock — not the Governor, not any admin — is the owner of governed contracts. A governed contract only changes when the Timelock executes an approved proposal.

  • The Governor is the only address allowed to queue operations (proposer role).

  • The guardian holds a cancel right on the Timelock, so a malicious proposal that slipped through a vote can still be stopped during the 2-day delay — but the guardian can never create or fast-track anything.

stXCN Snapshot Registry

The Snapshot Registry (StXCNSnapshotRegistryV2) is the on-chain home of voting-power snapshots. It stores each published Merkle root with its full metadata (snapshot block, eligible supply, policy version) and enforces the root lifecycle:

  • Post → challenge (1 day) → finalize. Only roots that survive the challenge window become usable for governance.

  • Strict role separation. The publisher, challenger, and guardian are required to be distinct parties — the contract itself rejects a configuration where one address holds two of these roles.

  • Fail-closed verification. The Governor's proof checks revert on an unfinalized root, a wrong-purpose root, a mismatched policy, or a paused registry. There is no fallback path that skips verification.

stXCN (StakedXCNDirect)

stXCN is the liquid staking token you receive for staking XCN — and the sole source of voting power on Onyx Chain. It is a rebasing token: your balance grows as staking rewards accrue, and governance snapshots measure that grown balance. stXCN itself is documented in Staking and stXCN.

Grant Treasury

The Grant Treasury is the first contract governed end-to-end by Onyx Chain governance. It holds WXCN and exposes exactly one privileged function — paying out a grant to a recipient — callable only by its owner, the Timelock. In other words:

The only way funds leave the Grant Treasury is a full OIP: proposal → vote → quorum → 2-day timelock → execution.

This makes community grant funding a pure governance decision, with every step publicly visible and verifiable on the explorer.

Operational roles

Role
What it can do
What it cannot do

Publisher

Post new snapshot roots to the Registry

Finalize its own root early, vote, or execute anything

Challenger

Dispute an incorrect root during the 1-day window

Post roots or interfere with correct ones

Guardian

Veto a bad root; cancel a malicious proposal during the timelock delay

Create, fast-track, or execute proposals; move funds

Governor (contract)

Queue approved proposals into the Timelock

Execute anything without the 2-day delay

Timelock (contract)

Execute approved proposals after the delay

Act without an approved, queued proposal

Verify, don't trust. All the contracts above are deployed on Onyx Mainnet and every proposal, snapshot root, vote, queue, and execution is a public transaction. You can independently verify any governance action on the explorer using the addresses in the table above.

Last updated