Skip to content

Commit

Permalink
spec: add community pool section
Browse files Browse the repository at this point in the history
  • Loading branch information
redshiftzero committed Apr 18, 2024
1 parent ea635fd commit 7a90283
Show file tree
Hide file tree
Showing 8 changed files with 77 additions and 55 deletions.
53 changes: 0 additions & 53 deletions docs/guide/src/pcli/governance.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,56 +270,3 @@ on the result of the vote: `proposal_N_passed`, `proposal_N_failed` or `proposal
proposal was not slashed (that is, it passed _or_ failed), this action will also produce the
original proposal deposit. Note that you _can_ claim a slashed proposal: you will receive the
slashed proposal result NFT, but you will not receive the original proposal deposit.

## Contributing To The Community Pool

Anyone can contribute any amount of any denomination to the Penumbra Community Pool. To do this, use the
command `pcli tx community-pool-deposit`, like so:

```bash
pcli tx community-pool-deposit 100penumbra
```

Funds contributed to the Community Pool cannot be withdrawn except by a successful Community Pool spend governance
proposal.

To query the current Community Pool balance, use `pcli query community-pool balance` with the **base denomination** of an
asset or its asset ID (display denominations are not currently accepted). For example:

```bash
pcli query Community Pool balance upenumbra
```

Community Pool spend proposals are only accepted for voting if they would not overdraw the current funds in the
Community Pool at the time the proposal is submitted, so it's worth checking this information before submitting
such a proposal.

### Sending Validator Funding Streams To The Community Pool

A validator may non-custodially send funds to the Community Pool, similarly to any other funding stream. To do
this, add a `[[funding_stream]]` section to your validator definition TOML file that declares the
Community Pool as a recipient for a funding stream. For example, your definition might look like this:

```toml
sequence_number = 0
enabled = true
name = "My Validator"
website = "https://example.com"
description = "An example validator"
identity_key = "penumbravalid1s6kgjgnphs99udwvyplwceh7phwt95dyn849je0jl0nptw78lcqqvcd65j"
governance_key = "penumbragovern1s6kgjgnphs99udwvyplwceh7phwt95dyn849je0jl0nptw78lcqqhknap5"

[consensus_key]
type = "tendermint/PubKeyEd25519"
value = "tDk3/k8zjEyDQjQC1jUyv8nJ1cC1B/MgrDzeWvBTGDM="

# Send a 1% commission to this address:
[[funding_stream]]
recipient = "penumbrav2t1hum845ches70c8kp8zfx7nerjwfe653hxsrpgwepwtspcp4jy6ytnxhe5kwn56sku684x6zzqcwp5ycrkee5mmg9kdl3jkr5lqn2xq3kqxvp4d7gwqdue5jznk2ter2t66mk4n"
rate_bps = 100

# Send another 1% commission to the Community Pool:
[[funding_stream]]
recipient = "CommunityPool"
rate_bps = 100
```
7 changes: 6 additions & 1 deletion docs/protocol/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
- [Transaction Actions](./dex/action.md)
- [`Swap`](./dex/action/swap.md)
- [`SwapClaim`](./dex/action/swap_claim.md)
- [`Position` Actions](./dex/actions/position.md)
- [`Position` Actions](./dex/action/position.md)
- [Staking and Delegation](./stake.md)
- [Staking Tokens](./stake/tokens.md)
- [Validator Rewards and Fees](./stake/validator-rewards.md)
Expand All @@ -89,3 +89,8 @@
- [Transaction Actions](./ibc/action.md)
- [`IbcRelay`](./ibc/action/ibc_relay.md)
- [`Ics20Withdrawal`](./ibc/action/ics20_withdrawal.md)
- [Community Pool](./community_pool.md)
- [Transaction Actions](./community_pool/action.md)
- [`CommunityPoolSpend`](./community_pool/action/spend.md)
- [`CommunityPoolOutput`](./community_pool/action/output.md)
- [`CommunityPoolDeposit`](./community_pool/action/deposit.md)
60 changes: 60 additions & 0 deletions docs/protocol/src/community_pool.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Community Pool

As with the Cosmos SDK, Penumbra also has a similar Community Pool feature.

## Making A Community Pool Spend Transaction Plan

Token holders can submit a governance community pool spend proposal. This proposal contains a _transaction plan_ containing a description of the spends to be performed if the proposal passes. This is described fully in the [governance section of the Penumbra protocol spec](./governance.md).

## Contributing To The Community Pool

Anyone can contribute any amount of any denomination to the Penumbra Community Pool. To do this, use the
command `pcli tx community-pool-deposit`, like so:

```bash
pcli tx community-pool-deposit 100penumbra
```

Funds contributed to the Community Pool cannot be withdrawn except by a successful Community Pool spend governance
proposal.

To query the current Community Pool balance, use `pcli query community-pool balance` with the **base denomination** of an
asset or its asset ID (display denominations are not currently accepted). For example:

```bash
pcli query Community Pool balance upenumbra
```

Community Pool spend proposals are only accepted for voting if they would not overdraw the current funds in the
Community Pool at the time the proposal is submitted, so it's worth checking this information before submitting
such a proposal.

### Sending Validator Funding Streams To The Community Pool

A validator may non-custodially send funds to the Community Pool, similarly to any other funding stream. To do
this, add a `[[funding_stream]]` section to your validator definition TOML file that declares the
Community Pool as a recipient for a funding stream. For example, your definition might look like this:

```toml
sequence_number = 0
enabled = true
name = "My Validator"
website = "https://example.com"
description = "An example validator"
identity_key = "penumbravalid1s6kgjgnphs99udwvyplwceh7phwt95dyn849je0jl0nptw78lcqqvcd65j"
governance_key = "penumbragovern1s6kgjgnphs99udwvyplwceh7phwt95dyn849je0jl0nptw78lcqqhknap5"

[consensus_key]
type = "tendermint/PubKeyEd25519"
value = "tDk3/k8zjEyDQjQC1jUyv8nJ1cC1B/MgrDzeWvBTGDM="

# Send a 1% commission to this address:
[[funding_stream]]
recipient = "penumbrav2t1hum845ches70c8kp8zfx7nerjwfe653hxsrpgwepwtspcp4jy6ytnxhe5kwn56sku684x6zzqcwp5ycrkee5mmg9kdl3jkr5lqn2xq3kqxvp4d7gwqdue5jznk2ter2t66mk4n"
rate_bps = 100

# Send another 1% commission to the Community Pool:
[[funding_stream]]
recipient = "CommunityPool"
rate_bps = 100
```
7 changes: 7 additions & 0 deletions docs/protocol/src/community_pool/action.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Transaction Actions

The community pool component defines the following actions:

- [`core.component.governance.v1.CommunityPoolDeposit`](./action/deposit.md)
- [`core.component.governance.v1.CommunityPoolOutput`](./action/output.md)
- [`core.component.governance.v1.CommunityPoolSpend`](./action/spend.md)
1 change: 1 addition & 0 deletions docs/protocol/src/community_pool/action/deposit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# CommunityPoolDeposit
1 change: 1 addition & 0 deletions docs/protocol/src/community_pool/action/output.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# CommunityPoolOutput
1 change: 1 addition & 0 deletions docs/protocol/src/community_pool/action/spend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# CommunityPoolSpend
2 changes: 1 addition & 1 deletion docs/protocol/src/stake/action.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ The staking component defines the following actions:

- [`core.component.stake.v1.Delegate`](./action/delegate.md)
- [`core.component.stake.v1.Undelegate`](./action/undelegate.md)
- [`core.component.stake.v1.UndelegateClaim`](./action/undelegateclaim.md)
- [`core.component.stake.v1.UndelegateClaim`](./action/undelegate_claim.md)

0 comments on commit 7a90283

Please sign in to comment.