SourceDAO is an on-chain governance and incentive system for open-source organizations. The current main implementation lives in contracts/ and focuses on the following capabilities:
- committee governance and token-holder voting
- project creation, acceptance, and contribution settlement
- layered rights through
DevToken / NormalToken - lockup release, staking dividends, acquisition flows, and upgrade governance
The repository is built around Hardhat 3 and UUPS proxy patterns.
Required Node.js runtime: v22+, with the latest LTS recommended.
SourceDAO is not a single voting contract. It is a set of cooperating modules:
- control layer:
Dao.sol,SourceDaoUpgradeable.sol - governance layer:
Committee.sol - production layer:
Project.sol - asset layer:
DevToken.sol,NormalToken.sol,TokenLockup.sol,Dividend.sol,Acquired.sol
If this is your first time reading the project, start with:
- docs/Architecture.en.md
- docs/ContractInterfaces.en.md
- contracts/Dao.sol
- contracts/Committee.sol
- contracts/Project.sol
Chinese references are also available:
The system registry. It stores the addresses of all core modules and uses isDAOContract(...) to enforce internal call boundaries.
The governance core. It is responsible for:
- ordinary proposals
- full proposals
- committee membership management
devRatio / finalRatio- contract upgrade proposals
The project lifecycle manager. It is responsible for:
- project creation
- development-stage transitions
- acceptance proposals
- contribution records
- DevToken reward settlement
DevToken: contribution-rights token with restricted transfer pathsNormalToken: freely transferable token converted 1:1 fromDevToken
Lockup and linear-release module tied to main-project version release state.
Staking and dividend module supporting DevToken / NormalToken staking and multi-asset rewards.
Module for buying NormalToken with external assets, supporting both ERC20 and native-token flows.
contracts/ current main contracts
docs/ architecture, interfaces, tools, and governance discussion docs
test/ primary test suite
test-hh3/ Hardhat 3 test entrypoints and compatibility helpers
tools/ voting, offline signing, and status helpers
Notes:
contracts/should be treated as the current source of truth.- Historical directories or older scripts, if present, should be read separately from the current implementation.
npm installnpx hardhat buildnpm testThe tools/ directory is the unified helper-tool layer. It currently includes:
tools/vote.ts: interactive online votingtools/vote_offline.ts: offline vote signing withprepare / sign / broadcasttools/dao_status.ts: read DAO and module configuration statetools/committee_status.ts: read committee governance statetools/project_status.ts: read project lifecycle and contribution statetools/proposal_status.ts: read ordinary/full proposal state
The root vote.ts remains as a compatibility entrypoint, but new usage should target tools/.
Tools support layered configuration:
tools/config/profiles/<profile>.jsontools/config/local.json- environment variable overrides
Example files:
Additional tool docs:
- tools/README.md (Chinese)
- docs/VoteTool.md (Chinese)
- docs/VoteOffline.md (Chinese)
- docs/StatusTools.md (Chinese)
npx hardhat run tools/vote.ts --network opmainnpx hardhat run tools/vote_offline.ts --network opmainnpx hardhat run tools/dao_status.ts --network opmainnpx hardhat run tools/committee_status.ts --network opmainnpx hardhat run tools/project_status.ts --network opmainnpx hardhat run tools/proposal_status.ts --network opmain- docs/VoteTool.md (Chinese)
- docs/VoteOffline.md (Chinese)
- docs/StatusTools.md (Chinese)
- docs/ContractChangeLog.md (Chinese)
- docs/FullProposalSnapshotProposal.md (Chinese)
- docs/Committee.md (Chinese)
The current test suite covers both single-contract behavior and multi-module integration, including:
- ordinary and full proposals in
Committee - project lifecycle and reward settlement in
Project - edge cases in
Dividend,TokenLockup, andAcquired - upgrade compatibility for
DaoandCommittee - offline-signing and status-tool regression coverage in
tools/
Recommended test entrypoints:
- test/committee.ts
- test/project.ts
- test/system_integration.ts
- test/upgrade.ts
- test/vote_tool.ts
- test/status_tool.ts
If this is your first time in the repository, a good reading order is:
- Start with docs/Architecture.en.md
- Then read docs/ContractInterfaces.en.md
- Move on to contracts/Dao.sol and contracts/Committee.sol
- Then review contracts/Project.sol and the asset-layer contracts
- Finally, use docs/ContractChangeLog.md and
test/to understand current implementation boundaries