35 major breaking releases
38.0.0 | Sep 26, 2024 |
---|---|
37.0.0 | Jul 18, 2024 |
36.0.0 | Jul 12, 2024 |
35.0.0 | Jun 24, 2024 |
0.0.0 | Nov 21, 2022 |
#9 in #period
16,116 downloads per month
Used in 25 crates
(7 directly)
2.5MB
45K
SLoC
Referenda Pallet
Overview
The Referenda pallet handles the administration of general stakeholder voting.
Release
Polkadot SDK stable2409
lib.rs
:
Referenda Pallet
Overview
A pallet for executing referenda. No voting logic is present here, and the Polling
and
PollStatus
traits are used to allow the voting logic (likely in a pallet) to be utilized.
A referendum is a vote on whether a proposal should be dispatched from a particular origin. The origin is used to determine which one of several tracks that a referendum happens under. Tracks each have their own configuration which governs the voting process and parameters.
A referendum's lifecycle has three main stages: Preparation, deciding and conclusion. Referenda are considered "ongoing" immediately after submission until their eventual conclusion, and votes may be cast throughout.
In order to progress from preparating to being decided, three things must be in place:
- There must have been a Decision Deposit placed, an amount determined by the track. Anyone may place this deposit.
- A period must have elapsed since submission of the referendum. This period is known as the Preparation Period and is determined by the track.
- The track must not already be at capacity with referendum being decided. The maximum number of referenda which may be being decided simultaneously is determined by the track.
In order to become concluded, one of three things must happen:
- The referendum should remain in an unbroken Passing state for a period of time. This is known as the Confirmation Period and is determined by the track. A referendum is considered Passing when there is a sufficiently high support and approval, given the amount of time it has been being decided. Generally the threshold for what counts as being "sufficiently high" will reduce over time. The curves setting these thresholds are determined by the track. In this case, the referendum is considered Approved and the proposal is scheduled for dispatch.
- The referendum reaches the end of its deciding phase outside not Passing. It ends in rejection and the proposal is not dispatched.
- The referendum is cancelled.
A general time-out is also in place and referenda which exist in preparation for too long may conclude without ever entering into a deciding stage.
Once a referendum is concluded, the decision deposit may be refunded.
Terms
Dependencies
~17–33MB
~528K SLoC