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

community_pool source realm

Package community\_pool manages the GnoSwap community treasury.

Readme View source

Community Pool

GnoSwap community treasury for ecosystem development.

Overview

Community-governed treasury that receives protocol emissions and fees for ecosystem growth initiatives. Also collects unclaimed internal staking rewards from warmup periods.

Configuration

  • Emission Allocation: 5% of GNS emissions (default)
  • Governance Control: All disbursements require proposal
  • Fund Sources: GNS emissions, unclaimed rewards (internal reward only), protocol fees

Governance Process

  • Proposal Creation: Submit funding request with justification
  • Voting Period: Token holders vote on proposal
  • Execution: Approved transfers execute automatically
  • Transparency: All operations emit events

Key Functions

TransferToken

Transfers tokens to specified address (governance only).

Usage

1// Transfer via governance proposal
2TransferToken(
3    cross(cur),
4    "gno.land/r/demo/usdc",
5    recipientAddr,
6    1000000,
7)

Security

  • Governance-only transfers
  • No emergency withdrawals
  • Event emission for transparency
  • Multi-token support

Overview

Package community_pool manages the GnoSwap community treasury.

This contract holds protocol-owned assets that can be allocated through governance proposals. It receives a portion of GNS emissions and can be used for ecosystem development, grants, and protocol improvements.

Functions 2

func GetBalanceOf

Action
1func GetBalanceOf(tokenPath string) int64
source

GetBalanceOf returns the balance of a specific token held by the community pool.

Parameters:

  • tokenPath: the path to the token contract (e.g., "gno.land/r/gnoswap/gns")

Returns the balance of the specified token held by the community pool.

func TransferToken

crossing Action
1func TransferToken(cur realm, tokenPath string, to address, amount int64)
source

TransferToken transfers tokens from the community pool.

Parameters:

  • cur: current realm
  • tokenPath: token contract path
  • to: recipient address
  • amount: transfer amount

Only callable by admin or governance.

Imports 6

Source Files 4