Skip to content

Commit

Permalink
Initial treasury docs (#5678)
Browse files Browse the repository at this point in the history
* initial treasury docs

* add info

* Update guide

* Update docs/learn/learn-polkadot-opengov-treasury.md

Co-authored-by: Filippo <[email protected]>

* Update docs/learn/learn-polkadot-opengov-treasury.md

Co-authored-by: Filippo <[email protected]>

* Update docs/learn/learn-polkadot-opengov-treasury.md

Co-authored-by: Filippo <[email protected]>

* Update docs/learn/learn-polkadot-opengov-treasury.md

Co-authored-by: Filippo <[email protected]>

* Update docs/learn/learn-polkadot-opengov-treasury.md

Co-authored-by: Filippo <[email protected]>

* address feedback

* slight change

* change to spendLocal

* Update docs/learn/learn-polkadot-opengov-treasury.md

Co-authored-by: Radha <[email protected]>

* Update docs/learn/learn-polkadot-opengov-treasury.md

Co-authored-by: Radha <[email protected]>

* Update docs/learn/learn-polkadot-opengov-treasury.md

Co-authored-by: Radha <[email protected]>

* -> point not rate

---------

Co-authored-by: Filippo <[email protected]>
Co-authored-by: Radha <[email protected]>
  • Loading branch information
3 people authored Mar 22, 2024
1 parent 6922c77 commit 9f7b6e3
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 5 deletions.
Binary file modified docs/assets/treasury/treasury-preimage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/learn/learn-guides-polkadot-opengov.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Follow the steps below to submit a preimage as shown in the screenshot above.
2. Click on the "Add preimage" button.
3. From the _propose_ drop-down field, select `treasury`.
4. From the unlabeled drop-down field to the right of the _propose_ drop-down field, select
`spend(amount, beneficiary)`.
`spendLocal(amount, beneficiary)`.
5. In the `amount: Compact<u128> (BalanceOf)` text field, enter the spend amount.
6. The `beneficiary: MultiAddress (AccountIdLookupOf)` drop-down field will have `Id` selected by
default. Select the beneficiary from the `Id: AccountId` drop-down field.
Expand Down
6 changes: 3 additions & 3 deletions docs/learn/learn-guides-treasury.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ that requests 100 DOT from Treasury.
- Navigate to [Polkadot-JS UI > Governance > Preimages](https://polkadot.js.org/apps/#/preimages)
and then click on Add Preimage.
- Select the account which will be used to submit the preimage.
- Choose `treasury` pallet in the "propose" dropdown and the `spend(amount, beneficiary)`call
- Choose `treasury` pallet in the "propose" dropdown and the `spend_local(amount, beneficiary)`call
- Enter the DOT amount.
- Enter the AccountID of the beneficiary (which has a verified on-chain identity).
- Submit preimage
Expand Down Expand Up @@ -127,8 +127,8 @@ to the `32 / Small Spender` track, you will need to submit it to the `30 / Small

Briefly, you will need to:

- Create a preimage using the `treasury.Spend` extrinsic and specifying the number of tokens and the
beneficiary of the tip
- Create a preimage using the `treasury.spendLocal` extrinsic and specifying the number of tokens
and the beneficiary of the tip
- Submit a proposal to the right track (i.e. `30` or `31`) using the preimage hash
- Once you started the referendum go to [Polkassembly](https://polkassembly.io/), log in with the
proposer account and edit the referendum details
Expand Down
36 changes: 35 additions & 1 deletion docs/learn/learn-polkadot-opengov-treasury.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ slug: ../learn-polkadot-opengov-treasury
import RPC from "./../../components/RPC-Connection";

The Treasury is a pot of funds collected through a portion of block production rewards, transaction
fees, slashing, and [staking inefficiencies](./learn-inflation.md).Treasury funds are held in a
fees, slashing, and [staking inefficiencies](./learn-inflation.md). Treasury funds are held in a
[system account](./learn-account-advanced.md#system-accounts) that cannot be controlled by any
external account; only the system internal logic can access it.

Expand Down Expand Up @@ -98,6 +98,40 @@ bottom right corner. Then,
- Create a proposal: final confirmation about the proposal creation. The description of the
proposal and the preimage are automatically linked to the proposal.

## Sub-treasuries

The {{ polkadot: Polkadot :polkadot }}{{ kusama: Kusama :kusama }} treasury currently operates on
a single account on-chain. The above tracks manage the outflow of the treasury on the
network. With _sub_-treasuries, having treasury accounts that correspond to each
[collective](./learn-system-chains#collectives) is also possible.

Rather than have many referenda through OpenGov, the
{{ polkadot: Polkadot :polkadot }}{{ kusama: Kusama :kusama }} Treasury can allocate funds to each
sub-treasury (through [governance](./learn-polkadot-opengov)), from which each respective collective
can spend funds (depending on their specific rule set).

New treasuries could be added to respective
[system chains](./learn-system-chains#existing-system-chains) through governance by adding more
instances of this pallet.

## Multi-Asset Treasury Support

The treasuries can support multiple asset types and thus can spend assets other than
{{ polkadot: DOT :polkadot }}{{ kusama: KSM :kusama }} held within the treasury, and their transfers and interactions across the chains facilitated by [cross-consensus messaging](./learn-xcm.md). These assets have a
few requirements:

1. The asset is listed on the [AssetHub system parachain](https://assethub-polkadot.subscan.io/).
2. The asset is active and has sufficient liquidity to be utilized for payouts.
3. The asset has a set conversion rate, as per OpenGov referenda on the Treasurer track (set via the
asset rate pallet). This conversion rate defines a fixed-point representation for converting from
that asset to {{ polkadot: DOT :polkadot }}{{ kusama: KSM :kusama }}.
4. The asset must be approved and onboarded via OpenGov to become spendable via the treasury as a
valid spend method.

> For example,
> [see how USDT became approved as an asset on AssetHub](https://forum.polkadot.network/t/multi-asset-treasury-and-milestone-based-spends/6780),
> which can be used in the treasury.
## Bounties

### Parent Bounties
Expand Down

0 comments on commit 9f7b6e3

Please sign in to comment.