Home Base DAO
BaseDAO is a generic smart contract framework enabling DAO deployments on Tezos. This document aims to describe the baseDAO tool and its features.
The framework contains 3 customizable FA2 compliant DAO smart contract templates:
- TrivialDAO: a simple template to get familiar with DAOs.
- RegistryDAO: an arbitrary data key-value storage. It can also hold XTZ and FA2 tokens with a how-to spend logic.
- TreasuryDAO: a DAO that holds XTZ and FA2 tokens with a how-to spend logic.
baseDAO is a turnkey solution which contains a set of tools to compile and deploy DAO smart contracts on the Tezos blockchain.
In order to use baseDAO, the tezos-client must be set up with the matching node and wallet configuration.
Every address that is stored in the ledger is associated with its unfrozen token balance and frozen token balance. When unfrozen tokens are transferred, the balance of the from_ addresses is decreased and the balance of the to_ addresses is increased according to the transferred values.
The contract constantly cycles between two stages, a proposing_stage and a voting_stage. Both have the same length, voting_period and alternate between each other, starting from \"voting\" for period number 0. Tokens can be frozen in any period, but they can only be used for voting, proposing and unfreezing starting from the following one and onwards.
Everyone can make a new proposal, however, you have to freeze some tokens for that. The proposer specifies how many frozen tokens they want to stake and this value is checked by the contract according to its compile-time configuration. This can only be performed in a proposing stage period, meaning one that's odd-numbered and the proposer must have frozen his tokens in one of the preceding periods. Proposals are identified by a key which is a byte value computed via Blake2B hashing function of a pair of proposed entrypoint, parameters and the proposer address.
Once a proposal is submitted, everyone can vote on it as long as they have enough frozen tokens to stake. One frozen token is required for one vote. A vote can only be cast in a voting stage period, meaning one that's even numbered. Moreover the proposal vote on must have been submitted in the proposing period immediately preceding and the voter must have frozen his tokens in one of the preceding periods. Voting period is specified for the whole smart contract and can be updated by the administrator; on update, the existing proposals are also affected. It's possible to vote positively or negatively. After the voting ends, the contract is "flushed" by calling a dedicated entrypoint.
In this example we will use the TreasuryDAO smart contract on Edo2net using the baseDAO CLI. We need to specify our admin address and the name of our DAO: