πŸ—οΈ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.

Description of the tool

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.

Features

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.

Ledger

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.

Life cycle of the DAO smart contract

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.

Proposals

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.

Voting

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.

Deploying your DAO

Configuration and deployment with CLI

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:

Result:

The deployed version of the DAO smart contract can be found here : https://better-call.dev/edo2net/KT1CBJDRLQdK7hUDgWDDx6eCp76xBSLGLCED/operations

baseDO Typescript API

A TypeScript API is also provided to facilitate the interactions with the deployed DAO smart contract : https://github.com/tqtezos/baseDAO/tree/master/typescript/baseDAO

Homebase UI

Presentation

Homebase is a platform designed to let users create and manage DAOs on the Tezos blockchain. There is a live deployed version of Homebase DAO available here : https://tezos-homebase.herokuapp.com/explorer/daos This version is connected to Edo2net.

It is based on the baseDAO smart contracts. To be able to let users directly deploy smart contracts from its UI, Homebase embeds the compiled Michelson versions of the Treasury and Registry DAOs of baseDAO.

Deployment

To match the CLI deployment we did, we will also deploy the Treasury DAO, using the Homebase UI. Let's start by clicking on CREATE DAO:

Here, we have two choices, either the Treasury or the Registry DAO, we select the Treasury template and name our DAO token MTD:

We now need to specify our DAO logic, by customizing the proposal & voting processes:

We decide of the initial distribution of the DAO tokens, and give ourselves 10 MTD:

You can find below the review of our DAO submission:

Let's now deploy our DAO smart contract using the Temple Wallet:

Our contract is now originated and available here: https://better-call.dev/edo2net/KT1TfWzLTD3DjqyJxwb9JMp93i8WiWwruDrZ/operations

In the screenshot below, you will be able to find the dashboard of our DAO. On the top right corner of the UI, We can see our MTD balance of 10 MTD:

The Homebase DAO UI offers several other features such as:

  • Creating proposals

  • Voting for proposals

  • Checking past and current proposals

  • View locked tokens

  • View token holders

  • ...

Limitations

  • With baseDAO, users need to be familiar with command-line tools, Tezos client, and Ligo language

  • baseDAO depends on the package morley-large-originator which is heavy to build

  • With Homebase DAO, there are currently only two available templates

Other Tezos DAO initiatives

Sources

Last updated