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.

Last updated