Actually Smart Contractsalpha

Sample code / DAOs

A DAO constitution that can block a vote

Example DAO constitution, treasury articles. Judgment rule: What the proposal does must match what it says

Where it runs: EVM Governor (Solidity) · Solidity · illustrative

constitution.asc.md
---
asc: 1
name: Example DAO constitution, treasury articles
version: 1.0.0
applies_to: proposal_execution
outcomes:
  allow: execute the passed proposal
  block: do not execute; return it to the forum with the jury's reasons
default: block
min_jury: { size: 7, quorum: 5, different_labs: true }   # callers can ask for more, never less
timeout: 10m
dispute: { window: 72h, second_jury: true }
evidence:
  - proposal       # title, body, calldata decoded to plain actions
  - vote           # result, turnout, quorum met
  - treasury       # balance, spent this quarter
  - council        # current council members and their known wallets
---

# Article 1. Spending
1. No proposal may spend more than 5% of the treasury in one quarter, counting
   every proposal that quarter.
2. What the proposal does on chain must match what its text says it does. If the
   calldata pays someone, sends more, or changes a permission the text doesn't
   mention, block it.

# Article 2. Conflicts
3. A proposal may not pay a council member, their known wallets, or a company
   they run, unless the proposal says so plainly in its first paragraph.

# Article 3. The rules themselves
4. A proposal may not change this constitution, the jury, or the quorum unless it
   passed with at least two thirds of votes cast and 20% turnout.

5. If you can't tell whether a rule is broken, block, and say which rule.

Try these rules in the Sandbox

The Sandbox runs a simulated jury for free. Request a ruling explains the call in the code.