-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Workflows for pre-propose approver, dao roles, storage-items, distribution methods #60
Open
hard-nett
wants to merge
10
commits into
DA0-DA0:main
Choose a base branch
from
permissionlessweb:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
6b255a7
add initial example workflows
183cf1c
details to pre-proposal approver workflow
016e501
add distribution method details, storage item details, dao-role details
ee4def8
dao-roles prop imgs, proposal approver details, distribution imgs
83cc13d
Merge pull request #1 from permissionlessweb/pr/hard-nett/60
hard-nett 9987dec
move workflows into dao-management folder
e84322f
Merge branch 'main' of https://github.com/permissionlessweb/dao-dao-d…
3615352
dao-apps docs & img
9180019
add github wiki link
ad2c03b
cleanup
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--- | ||
sidebar_position: 5 | ||
--- | ||
|
||
# Adding a pre-proposal approver | ||
## What is It? | ||
A pre-proposal approver is an assigned address that must approve proposals before they can be voted on. This may be useful for a DAO that expects many members with very fluid ownership, and would like to offset the risk of malicous proposals by requiring consensus from a 3rd party (quite possibly another DAO). | ||
|
||
## Workflow | ||
|
||
### A. From A New DAO | ||
When creating a new DAO, an approver can be enabled in the advanced configurations available. An address, profile or DAO name may be specified as the approver. | ||
|
||
![Advnaced Settings](/img/quickstart/create-dao-advanced-approval.png) | ||
<!-- :::warning | ||
Improperly configuring the approver may result in a DAO being unable to recieve proposals. | ||
::: --> | ||
|
||
### B. With An `UpdatePreProposeInfo` Proposal | ||
If a DAO already exists and requires deposits to submit proposals, by default a single pre-propose contract exists. A proposal is required to update the existing pre-proposal contract to the new pre-proposal approver contract. | ||
|
||
To update the pre-propose requirements, a DAO can call a the proposal module entry point `UpdatePreProposeInfo`. This function creates and associates the new pre-proposal contract to that specific proposal module. | ||
|
||
#### Proposal JSON | ||
```json | ||
{"update_pre_propose_info":{"info":{"module_may_propose":{"info":{"code_id" 420, "msg": "<base64-msg-for-encoding>","admin": "<you-dao-here>","funds":[], "label":"<your-dao-pre-proposal-approver-single>"}}}}} | ||
``` | ||
|
||
### 2. Approving Proposals | ||
Any DAO delegated as a proposal approver is able to make use of the **apps tab**, located in their DAOs home page. | ||
|
||
First, copy and paste the [DAO DAO link](https://daodao.zone) into the apps URL browser. | ||
|
||
|
||
We can now navigate to the proposal requiring our decision as the approval DAO, and create a proposal to broadcast the decision. | ||
![Advnaced Settings](/img/quickstart/proposal-approver.png) | ||
|
||
Alternatively, a custom [execute smart contract proposal](../dao-governance/actions/cosmwasm) from the approval DAO may be proposed to manually broadcast the decision. | ||
```json | ||
## approve | ||
{"extension": {"msg": {"approve": {"id": <proposal-id>}}}} | ||
|
||
## reject | ||
{"extension": {"msg": {"reject": {"id": <proposal-id>}}}} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"label": "Example Workflows", | ||
"position": 9 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
sidebar_position: 1 | ||
--- | ||
|
||
# Making Use of DAO Apps | ||
|
||
DAO Apps is a tab in all DAOs for members to interact with web-applications and propose for actions to broadcasted as a DAO. | ||
|
||
![DAO Tabs](/img/quickstart/dao-apps-tab.png) | ||
|
||
## Why use DAO Apps? | ||
- **Familiar UX:** Navigating through apps as a DAO provides a very close experience to interacting with apps as a single wallet, from your browser. | ||
- **Pre Propose Approver:** [Explained in detail here](../../dao-governance/proposals/proposal-approver#2-approving-proposals), a DAO serving as a pre-proposal approver can use DAO apps for the approver workflow. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
sidebar_position: 5 | ||
--- | ||
|
||
# Making Use of CW721-Roles | ||
|
||
CW721-Roles are non-transferrable NFT's that associate its owner with a specific role and weight. | ||
|
||
## Examples of CW721-Roles In Use | ||
- **Creative Gaming / On-Chain Simulations**: MRPG (multi-role-playing-games), an other on-chain simulations can make use of roles. | ||
- **Internal Management App**: a DAO could limit access of content to members with specific roles. A DAO might even decide conditions that require a role and also a minimum voting power in order to access content. | ||
- **Custom Payroll & Distribution Contracts:** DAOs making use of smart contract to automate distributions to their roles. | ||
|
||
## Workflow | ||
|
||
### 1. Prepare Roles | ||
Decide what roles are needed, as well as any weight distribution for the roles. | ||
|
||
### 2. Instantiate & Mint Proposal | ||
|
||
Define the following in a smart contract instantiation proposal: | ||
- `name` - name of your DAO roles collection | ||
- `symbol` - collection symbol | ||
- `minter` - minter of collection *set-as-DAO* | ||
<!-- - `withdraw_address` - *set-as-DAO* --> | ||
|
||
![Init Roles](/img/quickstart/cw721-roles-init.png) | ||
The minter is the only address with the ability to transfer, burn, or modify the state of the contracts. | ||
|
||
To propose minting new role tokens: | ||
- `token_id` | ||
- `owner` | ||
- `token_uri` | ||
- `extension` - Metadata extension for the `role` & `weight` | ||
|
||
![Mint Roles](/img/quickstart/cw721-roles-mint.png) | ||
|
||
:::info | ||
If a DAO has not yet assigned roles, all tokens can be minted to the DAO treasury, until roles are assigned with a nft-transfer proposal. | ||
::: | ||
|
||
### 3. Implement Roles Into Custom UI | ||
With the roles collection contract known, ownership queries can be made by clients and other contracts to power features that make use of the DAOs role tokens. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
--- | ||
sidebar_position: 5 | ||
--- | ||
|
||
# Distribution to DAO Members | ||
|
||
## A. Rewards Distributor | ||
A DAO may want to emit rewards to stakers or its members automatically during predefined intervals. This can happen with the use of the [rewards distributor](https://github.com/DA0-DA0/dao-contracts/blob/development/contracts/distribution/dao-rewards-distributor/README.md), configured to reflect distribution accurately in response to voting power changes. | ||
|
||
### Workflow | ||
|
||
### 1. Create Contract | ||
To create a new rewards distributor, the DAO is set as the contract owner to propose admin-level features. | ||
|
||
### 2. Register Reward Denom | ||
To register the token to be sent to DAO members, provide the DAOs `voting_power` module address, a cw20 or native token `denom` to be provided, along with the `emission_rate` defined by an `amount` and `duration` between distribution intervals *(e.g. 0.5udenom per hour)*. | ||
|
||
#### Hook Caller | ||
Also, an optional `hook_caller` can be provided that is allowed to call voting power change hooks. Often, as in `dao-voting-token-staked` and `dao-voting-cw721-staked` the `vp_contract` calls hooks for power change events, but sometimes they are separate. For example, the `cw4-group` contract is separate from the `dao-voting-cw4` contract and since the `cw4-group` contract fires the membership change events, it's address would be used as the `hook_caller`. | ||
|
||
### 3. Fund Contract | ||
:::warning | ||
Be sure to fund the contract by calling the `Fund` entry point, unless your deposit of funds will not be recognized and they will be frozen inside the contract. | ||
::: | ||
|
||
### 4. Claim As DAO Member | ||
To claim any available rewards, a DAO member can simply call the distribution contracts `Claim` entry point. If there are no rewards available, the contract will error. Otherwise, there is no limit to calling this entry point during the distributions claimable timeframe. | ||
|
||
![Reward Distributor Claim](/img/quickstart/rewards-distributor-claim.png) | ||
### 5. Shutdown | ||
A distribution can be shut down by an admin. This withdraws all future staking rewards | ||
back to the treasury. Members can claim whatever they earned until this point. | ||
<!-- | ||
Bulk TX Workflow: | ||
- init2 | ||
- fund contract | ||
--> | ||
|
||
## B. Fund Distributor | ||
|
||
Sending tokens to current DAO members is made simple with use of the [cw-fund-distributor contract](https://github.com/DA0-DA0/dao-contracts/tree/development/contracts/distribution/cw-fund-distributor). | ||
|
||
### Workflow | ||
|
||
### 1. Create & Fund Contract | ||
|
||
A smart contract instantiate proposal can create the fund distributor by defining: | ||
- `distribution_height` - the height used for snapshotting voting power. | ||
- `funding_period` - a time duration that should suffice to move the funds to be distributed into the distributor contract. | ||
- `voting_contract` - the DAOs voting contract for calculating distribution ratios | ||
|
||
![Init Fund Distributor](/img/how-to/fund-distributor-init.png) | ||
|
||
There are two contract entry points to fund a distribution: | ||
- `FundNative` for native tokens | ||
- `Recieve` for cw20 tokens. | ||
|
||
### 2. DAO Members Claim Tokens | ||
|
||
After the `funding_period` expires, the funds held by distributor contract become available for claims. Funding the contract is no longer possible at this point. | ||
|
||
There are three contract entry points for choosing how to claim tokens: | ||
- `ClaimNative` | ||
- `ClaimCw20` | ||
- `ClaimAll` | ||
|
||
A DAO member can use the accounts builder component to claim their distribution : | ||
|
||
![Claim Fund Distributor](/img/how-to/fund-distributor-claim.png) | ||
|
||
### 3. Fund Redistribution | ||
Considering it is more than likely that not every user would claim its allocation, it is possible to redistribute the unclaimed funds. | ||
|
||
The redistribution method finds all the claims that have been performed and subtracts the amounts from the initially funded balance. The respective allocation ratios for each DAO member remain the same; any previous claims are cleared. | ||
|
||
Only the `cw_admin` can call the method. | ||
|
||
|
||
<!-- | ||
Bulk TX Workflow: | ||
- init2 | ||
- fund contract | ||
--> | ||
|
||
## C. Royalty Splits | ||
|
||
### Workflow |
12 changes: 12 additions & 0 deletions
12
docs/dao-management/workflows/making-use-of-storage-items.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
sidebar_position: 4 | ||
--- | ||
|
||
# Making Use of Storage Items | ||
|
||
Storage items are key-value pairs that are stored through the DAO governance process. These are designed to provide a source of truth for any content a DAO might want. | ||
|
||
## Example of Storage Items In Use | ||
- **Address Authentication**: wallet or contracts may be verified through DAO governance and stored as an item to create an easy retrieval of potential crucial address or contracts. | ||
- **Record Keeping**: storage items can be made of use as a journal or sorts, logging entries chronologically. | ||
- **Experimental**: get creative with your DAOs storage! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to go into further detail on how DAO apps creates the proposal to DAO