diff --git a/components/RPC-Connection.jsx b/components/RPC-Connection.jsx index 5a88b61deb94..391f2ed01037 100644 --- a/components/RPC-Connection.jsx +++ b/components/RPC-Connection.jsx @@ -1,6 +1,6 @@ import { useState, useEffect } from "react"; import { ApiPromise, WsProvider } from "@polkadot/api"; -import { HumanReadable, Precise, BlocksToDays, Percentage, ArrayLength } from "./utilities/filters"; +import { HumanReadable, Precise, BlocksToDays, Percentage, PermillToPercent, ArrayLength } from "./utilities/filters"; /* This component connects to the Polkadot/Kusama APIs and renders the response data. @@ -146,6 +146,9 @@ function applyFilter(value, filter, network, setReturnValue) { case "percentage": Percentage(value, setReturnValue); break; + case "permillToPercent": + PermillToPercent(value, setReturnValue); + break; case "arrayLength": ArrayLength(value, setReturnValue); break; diff --git a/components/utilities/filters.js b/components/utilities/filters.js index 792ef90e91ee..42acb3bac691 100644 --- a/components/utilities/filters.js +++ b/components/utilities/filters.js @@ -67,6 +67,12 @@ module.exports = { setReturnValue(value.toString()); }, + PermillToPercent: function (value, setReturnValue) { + value = (value) / 10000; + // Update value + setReturnValue(value.toString()); + }, + ArrayLength: function (value, setReturnValue) { value = value.split(',').length; // Update value diff --git a/docs/assets/treasury/treasury-spend-period.png b/docs/assets/treasury/treasury-spend-period.png new file mode 100644 index 000000000000..cb4a81062d74 Binary files /dev/null and b/docs/assets/treasury/treasury-spend-period.png differ diff --git a/docs/general/glossary.md b/docs/general/glossary.md index d65063f57830..96ee6e0ca5c6 100644 --- a/docs/general/glossary.md +++ b/docs/general/glossary.md @@ -666,6 +666,14 @@ consensus rules but upgraded clients are still compatible with old consensus rul A collection of software tools (and programs) packaged together that can be used to develop software. +## Spend Period + +Successfully enacted Treasury track referenda will get funded at the end of the spending period that +resets every +{{ polkadot: :polkadot }} +{{ kusama: :kusama }} +days. Treasury funds are directly sent to the beneficiary account at the end of the spend period. + ## Staking The act of bonding tokens for {{ polkadot: Polkadot (DOT) :polkadot }} diff --git a/docs/learn/learn-guides-polkadot-opengov.md b/docs/learn/learn-guides-polkadot-opengov.md index 68bac2839308..80063f48f0bb 100644 --- a/docs/learn/learn-guides-polkadot-opengov.md +++ b/docs/learn/learn-guides-polkadot-opengov.md @@ -70,7 +70,7 @@ Once the proposal has been submitted, it will stay in the Lead-in period until t within the track, and a [track-dependent preparation period and decision deposit](../maintain/maintain-guides-polkadot-opengov.md#polkadot-opengov-terminology-and-parameters) have been met. Failing to submit the decision deposit within a -{{ polkadot: :polkadot }}{{ kusama: :kusama }}-day +{{ polkadot: :polkadot }}{{ kusama: :kusama }}-day period will lead to a referendum timeout. ## Claiming the Preimage and Decision Deposits @@ -97,7 +97,7 @@ The submission deposit can be claimed by issuing the `refundSubmissionDeposit` e Users can not refund their submission deposit while the referendum is `Ongoing` or `Rejected`. Similarly, users cannot refund their submission deposit if the proposal has `TimedOut` (failing to submit the decision deposit within a -{{ polkadot: :polkadot }}{{ kusama: :kusama }}-day +{{ polkadot: :polkadot }}{{ kusama: :kusama }}-day period will lead to a referendum timeout). This behavior exists so that users can refrain from spamming the chain with proposals that have no interest from the community. If a proposal is in the `TimedOut` state, any user can call `slash_proposal_deposit`, which will move the funds from the diff --git a/docs/learn/learn-guides-treasury.md b/docs/learn/learn-guides-treasury.md index 292c38528b76..99496820d54e 100644 --- a/docs/learn/learn-guides-treasury.md +++ b/docs/learn/learn-guides-treasury.md @@ -125,7 +125,7 @@ Briefly, you will need to: {{ polkadot: [Polkadot Direction Element Channel](https://matrix.to/#/#Polkadot-Direction:parity.io) :polkadot }}{{ kusama: [Kusama Direction Element Channel](https://matrix.to/#/#Polkadot-Direction:parity.io) :kusama }} about your referendum - Place the decision deposit before the - {{ polkadot: :polkadot }}{{ kusama: :kusama }}-day + {{ polkadot: :polkadot }}{{ kusama: :kusama }}-day timeout - Once the referendum ends you can [claim the preimage and decision deposits back](./learn-guides-polkadot-opengov.md#claiming-the-preimage-and-decision-deposits) diff --git a/docs/learn/learn-polkadot-opengov-treasury.md b/docs/learn/learn-polkadot-opengov-treasury.md index 480c3b0de5b2..5908db418bed 100644 --- a/docs/learn/learn-polkadot-opengov-treasury.md +++ b/docs/learn/learn-polkadot-opengov-treasury.md @@ -41,13 +41,23 @@ mechanisms: The outflow is determined by the following mechanisms: -- **Burned tokens:** at the end of each spending period lasting - {{ polkadot: 24 days on Polkadot, 1% :polkadot }}{{ kusama: 6 days on Kusama, 0.2% :kusama }} of - the available funds are burned, respectively. +- **Burned tokens:** at the end of each spend period + {{ polkadot: :polkadot }}{{ kusama: :kusama }}% + of the available funds are burned. - **Treasury proposals & Bounties:** they make up the largest share of outflow tokens to the - community and need to be approved by governance. Then, payouts occur at the end of a spending - period. -- **Tips:** smaller payouts directly to grantees that can happen within a spending period. + community and need to be approved by governance. Then, payouts occur at the end of a + [spend period](../general/glossary.md#spend-period). +- **Tips:** smaller payouts directly to grantees that can happen within a + [spend period](../general/glossary.md#spend-period). + +:::info Spend Period Schedule + +On Polkadot-JS UI, navigate to Governance > Treasury to view the status of current +[spend period](../general/glossary.md#spend-period). + +![preimage-whitelist](../assets/treasury/treasury-spend-period.png) + +::: ## Treasury Tracks