DEV Community

Mandy
Mandy

Posted on

Deep Dive: Understanding CrossFi’s Governance Parameters

Introduction

CrossFi’s governance system allows token holders to propose and vote on changes to the network, ensuring decentralization and community-driven decision-making. However, to participate effectively, it’s crucial to understand how governance proposals work and what parameters influence their outcomes.

In this guide, we will explore:
How governance works in CrossFi

Key governance parameters and their impact

Querying governance settings using the CLI

Real-world examples of governance decisions

Let’s dive in! 🚀


1. How Governance Works in CrossFi

CrossFi follows an on-chain governance model, allowing token holders to vote on:

  • Protocol upgrades (e.g., software updates)
  • Economic policies (e.g., inflation rates, staking rewards)
  • Community fund spending (e.g., funding ecosystem development)

Governance proposals follow these stages:
1️⃣ Proposal Submission: A user submits a proposal with a required deposit.

2️⃣ Deposit Period: If the minimum deposit is met, the proposal enters the voting period.

3️⃣ Voting Period: Token holders vote using yes, no, no_with_veto, or abstain.

4️⃣ Tallying & Execution: If the proposal meets the required votes, it is enacted.


2. Key Governance Parameters

CrossFi’s governance system has several parameters that define how proposals are handled.

Deposit Parameters

🔹 Minimum Deposit (min_deposit)

The amount of XFI required for a proposal to enter the voting period. If the deposit isn’t met, the proposal is rejected.

🔹 Max Deposit Period (max_deposit_period)

The time limit for meeting the deposit threshold. If the deposit isn’t completed within this period, the proposal fails.

📌 Query deposit parameters:

./bin/crossfid query gov params deposit --home ./testnet
Enter fullscreen mode Exit fullscreen mode

Example Output:

{
  "min_deposit": "100000000mpx",
  "max_deposit_period": "172800s"
}
Enter fullscreen mode Exit fullscreen mode

Voting Parameters

🔹 Voting Period (voting_period)

The duration (in seconds) during which token holders can vote on a proposal.

🔹 Threshold (threshold)

The percentage of yes votes required for a proposal to pass.

🔹 Veto Threshold (veto_threshold)

If a proposal gets this percentage of no_with_veto votes, it is rejected.

📌 Query voting parameters:

./bin/crossfid query gov params voting --home ./testnet
Enter fullscreen mode Exit fullscreen mode

Example Output:

{
  "voting_period": "604800s",
  "threshold": "0.50",
  "veto_threshold": "0.334"
}
Enter fullscreen mode Exit fullscreen mode

3. Real-World Examples of Governance Decisions

Understanding how governance parameters work helps users make informed decisions. Let’s look at three real-world scenarios:

Scenario 1: Proposal Fails Due to Low Deposit

📌 Proposal: A developer submits a proposal to increase the validator set but only deposits 50,000,000mpx, while the minimum deposit is 100,000,000mpx. The proposal gets rejected.

🔍 How to check proposal status:

./bin/crossfid query gov proposal <proposal-id> --home ./testnet
Enter fullscreen mode Exit fullscreen mode

Scenario 2: Proposal Passes with Enough Yes Votes

📌 Proposal: A proposal to increase staking rewards receives 60% yes votes, passing successfully as it meets the 50% threshold.

🔍 How to check voting results:

./bin/crossfid query gov tally <proposal-id> --home ./testnet
Enter fullscreen mode Exit fullscreen mode

Scenario 3: Proposal Rejected by Veto

📌 Proposal: A proposal suggests a drastic reduction in staking rewards. More than 33.4% vote no_with_veto, rejecting the proposal.

🔍 How to check vetoed proposals:

./bin/crossfid query gov proposals --home ./testnet | grep veto
Enter fullscreen mode Exit fullscreen mode

4. How to Change Governance Parameters

Governance parameters can be adjusted through proposals. If the community wants to lower the deposit requirement, for example, they can submit a parameter change proposal.

Submitting a Parameter Change Proposal

📌 Step 1: Create a proposal JSON file (e.g., change-threshold.json)

{
  "title": "Lower Voting Threshold to 45%",
  "description": "This proposal lowers the voting threshold from 50% to 45% to encourage participation.",
  "changes": [
    {
      "subspace": "gov",
      "key": "threshold",
      "value": "0.45"
    }
  ],
  "deposit": "100000000mpx"
}
Enter fullscreen mode Exit fullscreen mode

📌 Step 2: Submit the proposal

./bin/crossfid tx gov submit-proposal param-change change-threshold.json --from <your-wallet-name> --chain-id crossfi-1 --home ./testnet --gas auto
Enter fullscreen mode Exit fullscreen mode

📌 Step 3: Track proposal status

./bin/crossfid query gov proposals --home ./testnet
Enter fullscreen mode Exit fullscreen mode

5. Conclusion

🎉 You’ve successfully learned about CrossFi governance parameters and how they impact decision-making!

Key Takeaways:

Deposit parameters ensure proposals meet a minimum threshold before voting.

Voting parameters define how many votes are needed for a proposal to pass.

Veto power allows the community to block harmful proposals.

Governance parameters can be changed through proposals.

Understanding these parameters helps you make informed governance decisions and contribute effectively to the CrossFi ecosystem. 🚀

For more details, refer to the official CrossFi GitHub repository.

Top comments (0)