Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

emission package

Overview

Package emission manages GNS token emission and distribution for GnoSwap.

The emission system controls creation and distribution of new GNS tokens with a deflationary model featuring periodic halvings over 12 years.

Emission Schedule:

  • Year 1-2: 100% emission rate (225,000,000 GNS/year)
  • Year 3-4: 50% emission rate (112,500,000 GNS/year)
  • Year 5-6: 25% emission rate (56,250,000 GNS/year)
  • Year 7-8: 12.5% emission rate (28,125,000 GNS/year)
  • Year 9-12: 6.25% emission rate (14,062,500 GNS/year)

Distribution Targets (configurable via governance):

  • LIQUIDITY_STAKER: Rewards for LP providers (default 75%)
  • DEVOPS: Development and operations fund (default 20%)
  • COMMUNITY_POOL: Community-governed treasury (default 5%)
  • GOV_STAKER: GNS staking rewards (default 0%)

Key Functions:

  • MintAndDistributeGns: Mints and distributes GNS per emission schedule
  • SetDistributionStartTime: One-time setup of emission start timestamp
  • ChangeDistributionPct: Updates distribution percentages
  • ClearDistributedToStaker/GovStaker: Resets pending distribution amounts

Function

ChangeDistributionPct

func ChangeDistributionPct( cur realm, liquidityStakerPct int64, devOpsPct int64, communityPoolPct int64, govStakerPct int64, )

ChangeDistributionPct changes distribution percentages for emission targets.

This function redistributes how newly minted GNS tokens are allocated across protocol components. Before applying new ratios, it distributes any accumulated emissions using the current ratios, ensuring emissions are distributed according to the ratios in effect when they were generated. This prevents retroactive application of new ratios to past emissions.

Parameters:

  • liquidityStakerPct: Percentage for liquidity stakers in basis points (100 = 1%, 10000 = 100%)
  • devOpsPct: Percentage for devops in basis points
  • communityPoolPct: Percentage for community pool in basis points
  • govStakerPct: Percentage for governance stakers in basis points

Requirements:

  • Percentages must sum to exactly 10000 (100%)
  • Each percentage must be 0-10000

Example:

Example
1ChangeDistributionPct(
2  7000,  // 70% to liquidity stakers
3  2000,  // 20% to devops
4  1000,  // 10% to community pool
5  0,     // 0% to governance stakers
6)

Only callable by admin or governance.

Params

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/gnoswap/emission" -func "ChangeDistributionPct" -args $'' -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "topaz-1" -remote "https://rpc.topaz.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.topaz.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/gnoswap/emission" -func "ChangeDistributionPct" -args $'' -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "topaz-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.topaz.testnets.gno.land" call.tx