[][src]Crate pallet_treasury

Treasury Module

The Treasury module provides a "pot" of funds that can be managed by stakeholders in the system and a structure for making spending proposals from this pot.

Overview

The Treasury Module itself provides the pot to store funds, and a means for stakeholders to propose, approve, and deny expenditures. The chain will need to provide a method (e.g. inflation, fees) for collecting funds.

By way of example, the Council could vote to fund the Treasury with a portion of the block reward and use the funds to pay developers.

Tipping

A separate subsystem exists to allow for an agile "tipping" process, whereby a reward may be given without first having a pre-determined stakeholder group come to consensus on how much should be paid.

A group of Tippers is determined through the config Trait. After half of these have declared some amount that they believe a particular reported reason deserves, then a countdown period is entered where any remaining members can declare their tip amounts also. After the close of the countdown period, the median of all declared tips is paid to the reported beneficiary, along with any finders fee, in case of a public (and bonded) original report.

Terminology

Tipping protocol:

Interface

Dispatchable Functions

General spending/proposal protocol:

Tipping protocol:

GenesisConfig

The Treasury module depends on the GenesisConfig.

Structs

GenesisConfig

Genesis config for the module, allow to build genesis storage.

Module
OpenTip

An open tipping "motion". Retains all details of a tip including information on the finder and the members who have voted.

Proposal

A spending proposal.

Reasons

Simple preimage lookup from the reason's hash to the original data. Again, has an insecure enumerable hash since the key is guaranteed to be the result of a secure hash.

Tips

Tips that are not yet completed. Keyed by the hash of (reason, who) from the value. This has the insecure enumerable hash function since the key itself is already guaranteed to be a secure hash.

Enums

Call

Dispatchable calls.

Error

Error for the treasury module.

RawEvent

Events for this module.

Traits

Trait
WeightInfo

Type Definitions

Event

RawEvent specialized for the configuration Trait

ProposalIndex

An index of a proposal. Just a u32.