LogoLogo
  • Introduction
    • Chain Info
    • Smart Contracts
    • About Onyx
  • DEVELOPERS
    • Building dApp
    • Estimating Gas
    • Development Framework
    • Web3 Toolkits
    • Onyx SDK
    • Run Full Node
  • GOVERNANCE
    • Overview
    • Governor
    • Security
    • Quorum Votes
    • Proposal Threshold
    • Proposal Max Operations
    • Voting Delay
    • Voting Period
    • Propose
    • Queue
    • Execute
    • Cancel
    • Get Action
    • Get Receipt
    • Proposal State
    • Cast Vote
    • Vote By Signature
    • Timelock
  • Points
    • Onyx Points
    • Earning Points
      • 🟢Passive Points
      • 🔜Activity Points
      • 🔜App Points
  • Whitelisted Assets
  • Onyx AI
    • AI Agent
    • Core Features
    • Wallet Infrastructure
    • 🔜Roadmap
  • API
    • Onyx Governance API
    • Core API Endpoints
    • GET: /proposal
    • GET: /proposal/:proposalId
    • GET: /voter/:proposalId
    • GET: /voter/accounts
    • GET: /voter/history/:address
  • RESOURCES
    • Terms of Service
    • Bug Bounty
Powered by GitBook
On this page
Export as PDF
  1. GOVERNANCE

Proposal Threshold

Onyx Governance Proposal Threshold for XCN Stakers.

The proposal threshold represents the minimum number of votes required for an account to create and submit a governance proposal within the Onyx governance framework. This requirement ensures that only stakeholders with a significant vested interest in the protocol can initiate changes, preventing spam or frivolous proposals.

Function Implementation in CHNGovernance

In the CHNGovernance contract, the proposalThreshold() function is implemented to enforce the required voting power threshold before a proposal can be submitted.

Function Signature

function proposalThreshold() public view returns (uint)

RETURN: This function returns an unsigned integer (uint) representing the minimum number of votes required for an account to be eligible to create a proposal.

Example Solidity Implementation

To retrieve the proposal threshold in a Solidity environment, the proposalThreshold()function can be called using an instance of the CHNGovernance contract.

CHNGovernance gov = CHNGovernance(0x123...); // Contract address of CHNGovernance
uint threshold = gov.proposalThreshold();

Web3.js Implementation (v1.2.6)

For interacting with the CHNGovernance contract using Web3.js, the following example demonstrates how to retrieve the proposal threshold:

const threshold = await gov.methods.proposalThreshold().call();

Technical Considerations

  • The proposalThreshold()function is a view function, meaning it does not modify blockchain state and can be executed without incurring gas costs.

  • The required proposal threshold may be modified through governance proposals, allowing the community to adjust the threshold based on network dynamics and participation levels.

  • The retrieved threshold value should be used to validate off-chain governance tracking systems and frontend governance dashboards, ensuring real-time compliance with protocol governance rules.

The proposal threshold is a critical governance parameter that maintains the integrity of the Onyx governance process by ensuring that proposals originate from accounts with meaningful voting power, thereby upholding decentralization and effective protocol management.

PreviousQuorum VotesNextProposal Max Operations

Last updated 3 months ago