This project provides a Javascript libary to help developers build DAOs on Cartesi. The functions in this library are database actions. All these functions either insert into, update or retrieve some data from the database (we use sqlite3). Therefore, the business logic to create a custom DAO is yours to implement.
The project adapted its design from some of the leading implementations in the Ethereum ecosystem ( see the reference section for more info)
The core architecture has been adapted from Aragon OSX. Aragon OSX is a DAO framework. Even though you're unfamiliar with Aragon, we will explain the concepts being used here.
Let's begin with the basics. A DAO is simply a governance structure composed of members with certain roles. These roles are defined by what functions a member can call. For example, a token-holder can vote or propose changes, and a trusted delegate(s) can execute actions on behalf of the DAO. With this in mind, we can look at a DAO as a permission manager.
We can extennd the DAO’s core actions through plugins. This includes mechanisms for voting, treasury management, governance, or even integrations. Generally, whatever feature you would like to add to your basic DAO.
This modular design allows the DAO logic to be easily changed by installing, upgrading, or removing a plugin. For example, to change from a 1:1 voting to a quadratic voting system, all you need to do is modify the voting plugin.
From the above statements, we have our DAO library as shown below. The following packages have be published to npm:
- Core library
@dao-library/core/dao- functions that manage setting up the DAO@dao-library/core/permission- functions that manage permissions@dao-library/core/proposal- functions that handle proposals
- Plugins
@dao-library/voting- functions that manage voting@dao-library/treasury- functions that relate to the DAO's finances
Please check the API docs in root dir: API-core.md and API-plugins.md.
See the README in the example directory.
You can carry out tests from each package's directory.
# example of running test
cd packages/core
pnpm install
pnpm test