A decentralized autonomous organization (DAO) is akin to an on-chain government where participants are able to cast votes on proposals using some governance asset. Various consensus mechanisms may be implemented in order to determine whether a proposal will pass and if that happens then the DAO will begin to operate under the rules of the new proposal. In this implementation the user deposits governance assets and receives some number of votes that can be cast and recast on different proposals. They can vote in favour or against proposals and they can transform their votes back into the governance assets if they wish to withdraw.
More information can be found in the specification.
The project consists of a smart contract.
DAO
├── DAO-contract
│ ├── src/main.sw
│ └── tests/harness.rs
├── README.md
└── SPECIFICATION.md
TODO: The user interface does not currently exist.
In order to run the subsequent commands change into the following directory /path/to/DAO/<here>
.
forc build --locked
Before running the tests the programs must be compiled with the command above.
cargo test --locked