MCPcopy Index your code
hub / github.com/DA0-DA0/dao-contracts

github.com/DA0-DA0/dao-contracts @v2.7.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v2.7.1 ↗ · + Follow
3,321 symbols 11,130 edges 419 files 313 documented · 9%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

DAO Contracts

GitHub tag (with filter) GitHub contributors

GitHub commit activity (branch) codecov

Discord X (formerly Twitter) URL

DAO DAO DAO

This is a collection of smart contracts for building composable, modular, and upgradable DAOs.

For a detailed look at how these contracts work, see our wiki.

Overview

Every DAO is made up of three modules:

  1. A voting power module, which manages the voting power of DAO members.
  2. Any number of proposal modules, which manage proposals in the DAO.
  3. A core module, which holds the DAO treasury.

image

For example, voting power might be based on staked governance tokens, staked NFTs, or membership and proposal modules might implement yes/no, multiple-choice, or ranked-choice voting.

Each module type has a standard interface. As a result, any voting module can be used with any proposal module, and any proposal module with any voting module.

The best way to get started is to create a DAO! We maintain an open source frontend you can find at daodao.zone.

Audits

If you believe you have found a problem, please let us know.

DAO DAO has been audited by Oak Security on multiple occasions. You can find all the audit reports here.

Why?

Our institutions grew rapidly after 1970, but as time passed their priorities shifted from growth, to protectionism. We're fighting this. We believe The Internet is where the organizations of tomorrow will be built.

DAO DAO is a global community working on Internet governance, and a real DAO. We've never raised money, and all our work is open-source. We hope you'll join us.

Links and Resources

Developers

Information about our development workflow and how to contribute can be found in CONTRIBUTING.md.

Testing

Unit tests

Run cargo test, or just test from the project root to run the unit tests.

Integration tests

Run just bootstrap-dev to spin up a local environment and just integration-test-dev to run tests against it.

See ci/integration-tests/README.md for more information.

Disclaimer

DAO DAO TOOLING IS PROVIDED “AS IS”, AT YOUR OWN RISK, AND WITHOUT WARRANTIES OF ANY KIND. No developer or entity involved in creating the DAO DAO UI or smart contracts will be liable for any claims or damages whatsoever associated with your use, inability to use, or your interaction with other users of DAO DAO tooling, including any direct, indirect, incidental, special, exemplary, punitive or consequential damages, or loss of profits, cryptocurrencies, tokens, or anything else of value.

Extension points exported contracts — how you extend this code

DaoTestingSuite (Interface)
(no doc) [4 implementers]
packages/dao-testing/src/suite/base.rs
ExpirationExt (Interface)
(no doc) [1 implementers]
contracts/distribution/dao-rewards-distributor/src/helpers.rs
DurationExt (Interface)
(no doc) [1 implementers]
contracts/distribution/dao-rewards-distributor/src/helpers.rs

Core symbols most depended-on inside this repo

load
called by 365
packages/cw-wormhole/src/lib.rs
assert_pending_rewards
called by 355
contracts/distribution/dao-rewards-distributor/src/testing/suite.rs
claim_rewards
called by 97
contracts/distribution/dao-rewards-distributor/src/testing/suite.rs
push
called by 94
packages/cw-snapshot-vector-map/src/lib.rs
skip_blocks
called by 91
contracts/distribution/dao-rewards-distributor/src/testing/suite.rs
iter
called by 85
contracts/proposal/dao-proposal-condorcet/src/vote.rs
is_zero
called by 77
contracts/distribution/dao-rewards-distributor/src/helpers.rs
query_proposal
called by 70
contracts/proposal/dao-proposal-single/src/testing/queries.rs

Shape

Function 2,210
Method 573
Class 321
Enum 214
Interface 3

Languages

Rust100%

Modules by API surface

contracts/proposal/dao-proposal-single/src/testing/tests.rs69 symbols
contracts/pre-propose/dao-pre-propose-approver/src/tests/multiple.rs67 symbols
contracts/pre-propose/dao-pre-propose-approval-multiple/src/tests.rs66 symbols
contracts/distribution/dao-rewards-distributor/src/testing/tests.rs66 symbols
contracts/pre-propose/dao-pre-propose-approval-single/src/tests.rs65 symbols
contracts/proposal/dao-proposal-multiple/src/testing/tests.rs63 symbols
contracts/pre-propose/dao-pre-propose-approver/src/tests/single.rs60 symbols
contracts/pre-propose/dao-pre-propose-single/src/tests.rs58 symbols
contracts/distribution/dao-rewards-distributor/src/testing/suite.rs56 symbols
contracts/pre-propose/dao-pre-propose-multiple/src/tests.rs54 symbols
contracts/delegation/dao-vote-delegation/src/testing/tests.rs49 symbols
contracts/dao-dao-core/src/contract.rs47 symbols

For agents

$ claude mcp add dao-contracts \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page