# Governance

### How Does GnoSwap Governance Work? <a href="#voting-process" id="voting-process"></a>

GnoSwap is a decentralized protocol governed by [xGNS](https://docs.gnoswap.io/gnoswap-token/xgns) holders. Anyone can participate in the decision-making process in GnoSwap by staking $GNS tokens to obtain xGNS, which enables its holders to create or vote on proposals. The voting system regards 1 xGNS as 1 vote.

The core governance realms are available on [GitHub](https://github.com/gnoswap-labs/governance) for any project to customize and implement to their project.

### Proposal Life Cycle <a href="#scope-of-proposals" id="scope-of-proposals"></a>

#### 1. Stake & Delegate $GNS Tokens <a href="#scope-of-proposals" id="scope-of-proposals"></a>

To participate in the GnoSwap Governance, you must first obtain xGNS by staking your $GNS tokens. To stake your tokens, visit the [**Governance**](https://gnoswap.io/governance) menu. You will receive 1 xGNS for 1 $GNS staked.

While you stake your tokens, you must delegate your voting power to an address. You may delegate to yourself, or any public delegates that you support. Delegation only transfers your voting powers, while ensuring you retain all of your rewards. You may select multiple delegates to split your voting power.

{% hint style="warning" %}
**Unstaking Period**

A lock-up period of 7 days is applied once you unstake your xGNS. During this period, the locked xGNS tokens will be ineligible to receive staking rewards and have no voting powers. This mechanism exists to ensure that xGNS stakers are aligned with the long-term benefits of the GnoSwap protocol.
{% endhint %}

#### 2. Create a Proposal <a href="#scope-of-proposals" id="scope-of-proposals"></a>

A proposal refers to a request for permission to execute a set of calls that will affect the configurations of GnoSwap's realms. To create a proposal, visit the **Governance** menu. Be sure to concisely describe your proposal and select the correct parameters and values to modify.

{% hint style="info" %}
**Proposal Topic Examples**

Below is a non-exhaustive list of parameters that can be changed with a proposal:

* **Protocol Fee:** The percentage of the Protocol Fee taken from swaps, withdrawals, and unstaking.
* **Emission Direction:** The pools to be included in the $GNS token emission.
* **Voting Period:** The duration of the voting period.
* **Vote Quorum:** The threshold of the percentage of total voting power required to cause the proposal to become valid.
  {% endhint %}

#### 3. Vote <a href="#scope-of-proposals" id="scope-of-proposals"></a>

Once the proposal is created, it enters a voting period after the Voting Start Delay has passed. All delegates are given the option to either vote `Yes` or `No`. At the end of the voting period, all votes are consolidated and the results are determined. A proposal only passes if the Quorum has been reached and the total `Yes` voting power strictly exceeds the total `No` voting power. Tied votes do not pass.

{% hint style="info" %}
**When can I cancel proposals?**

Proposals can only be cancelled during the **Voting Start Delay** period of 1 day (modifiable via GnoSwap Governance), if an error is detected. Once the voting begins, there is no way to cancel the proposal. There are no penalties for canceling a proposal.
{% endhint %}

#### 4. Execute a Proposal <a href="#scope-of-proposals" id="scope-of-proposals"></a>

If a proposal passes, it can be executed within the Execution Window of 30 days. The `execute` function must be called for the changes proposed to take effect on the realms.

### Configuration Parameters <a href="#scope-of-proposals" id="scope-of-proposals"></a>

Below are the initial configuration parameters of the GnoSwap governance. All of the parameters can be modified via proposals.

* **Voting Start Delay**: 1 day (= 86400 seconds)
  * *The time delay, in seconds, before voting begins after a proposal is created.*
* **Voting Period**: 7 days (= 604800 seconds)
  * *The duration, in seconds, during which votes can be submitted.*
* **Voting Weight Smoothing Duration**: 1 day (= 86400 seconds)
  * *The time period, in seconds, over which the voting weight is averaged for proposal voting and creation/cancellation.*
* **Quorum**: 50% of the total supply of xGNS tokens when a proposal is created (with 6 decimals)
  * *The total number of votes required for the proposal to be considered valid.*
* **Proposal Creation Threshold**: 1,000 GNS (with 6 decimals)
  * *The minimum holding of tokens required to create a proposal.*
* **Execution Delay**: 1 day (= 86400 seconds)
  * *The time period, in seconds, that must pass after the voting period ends before the proposal can be executed.*
* **Execution Window**: 30 days (= 2592000 seconds)
  * *The window of time, in seconds, after the execution delay during which the proposal may be executed (any user can execute it).*
