Skip to content
substrate fund coordination dao para{thread, chain}
Rust Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

ⓢⓤⓝⓢⓗⓘⓝⓔ 🌞

status is broken: the previous minimal implementation is undergoing refactoring into four loosely coupled modules

sunshine is a fund coordination DAO that fosters nuanced governance over pooled resources. The architecture is built to evolve and encourages self-improvement.


"Over time, all the components of the DAO are likely to be upgraded using its own mechanisms...Given the high requirements for stability, self-improvement will be critical to the survival of any DAO-based democratic system." ~DAOs, Democracy and Governance by Ralph Merkle

With continuous self-improvement in mind, sunshine's mechanism design aspires to be

  1. accessible: usability determines the diversity of users as well as rate of adoption
  2. forkable: modularity and extensibility encourage granular configuration based on use case
  3. dynamic: unambiguous on-chain runtime upgrades allow the system to adapt and evolve
  4. human-centered: fairness and sustainability are paramount in all design decisions

Piggybacking on Substrate’s on-chain upgrades, sunshine introduces metagovernance for elegant upgrade paths. Stakeholders can vote on any changes to the application, including the terms of the vote itself. This increased flexibility allows the application to evolve around user requirements and update features without hard forks.

Straightforward upgrades make applications built on the blockchain more suitable to tackle real-world problems, many of which maintain dynamic stakeholder sets with dynamic relationships. Indeed, static mechanism design will quickly become obsolete in the context of a world that is changing faster every day.

runtime architecture

minimal, single-file implementations are maintained in dao-templates

the runtime configures four modules:

sovereign::chain, para::{thread, chain}?

sunshine comprises of a set of modules that can be included in any parachain and/or parathread runtime to facilitate fund coordination amongst a defined stakeholder set

When designing sunshine, the initial motivating use case is the Polkadot treasury; Kusama's treasury governance does not support nuanced fund management. While it allows for voting on donations (with a binary yes/no outcome), the current design does not support investments or targeted liquidity provision. Additional experimental features are discussed in modules, but a priority is the incorporation of forward guidance as detailed in web3garden/monetary-futarchy.

build instructions

Install Rust:

curl -sSf | sh

Install required tools:


Build Wasm and native code:

cargo build

single node development chain

You can start a development chain with:

cargo run -- --dev

Detailed logs may be shown by running the node with the following environment variables set: RUST_LOG=debug RUST_BACKTRACE=1 cargo run -- --dev.

multi-node local testnet

If you want to see the multi-node consensus algorithm in action locally, then you can create a local testnet with two validator nodes for Alice and Bob, who are the initial authorities of the genesis chain that have been endowed with testnet units.

Optionally, give each node a name and expose them so they are listed on the Polkadot telemetry site.

You'll need two terminal windows open.

We'll start Alice's substrate node first on default TCP port 30333 with her chain database stored locally at /tmp/alice. The bootnode ID of her node is QmRpheLN4JWdAnY7HGJfWFNbfkQCb6tFf4vvA6hgjMZKrR, which is generated from the --node-key value that we specify below:

cargo run -- \
  --base-path /tmp/alice \
  --chain=local \
  --alice \
  --node-key 0000000000000000000000000000000000000000000000000000000000000001 \
  --telemetry-url ws:// \

In the second terminal, we'll start Bob's substrate node on a different TCP port of 30334, and with his chain database stored locally at /tmp/bob. We'll specify a value for the --bootnodes option that will connect his node to Alice's bootnode ID on TCP port 30333:

cargo run -- \
  --base-path /tmp/bob \
  --bootnodes /ip4/ \
  --chain=local \
  --bob \
  --port 30334 \
  --telemetry-url ws:// \

Additional CLI usage options are available and may be shown by running cargo run -- --help.

You can’t perform that action at this time.