How to Build a DAO - the Story of One Solution by@gagarinlaunchpad

How to Build a DAO - the Story of One Solution

DAO stands for “decentralized autonomous organization” and refers to a community of partners in a certain sphere of crypto-business who have concluded an agreement setting forth the rules of working together. This agreement is written into the organization code using smart contracts on blockchain. There is no single manager and all community members contribute to decision-making by their votes. As it is an autonomous organization, its governance operates independently of the organization members. The governance order operates automatically and is represented by algorithms employed by smart contracts. The RSquad solution should enable any user to create their own DAOs with an internal economy based on governance tokens.
image
Roman Nguyen HackerNoon profile picture

Roman Nguyen

CTO at RSquad blockchain laboratory

linkedin social icontwitter social icon

The term DAO stands for “decentralized autonomous organization” and refers to a community of partners in a certain sphere of crypto-business who have concluded an agreement setting forth the rules of working together towards the attainment of a common goal. This agreement is written into the organization code using smart contracts on blockchain.

As it is a decentralized organization, there is no single manager and all community members equally contribute to decision-making by their votes. As it is an autonomous organization, its governance operates independently of the organization members themselves – the governance order operates automatically and is represented by algorithms employed by smart contracts.

DAO is generally understood as both a community of managers (Governance) who share the responsibility for decision-making in a certain area and a set of tools ensuring the work of these managers, e.g. the program code itself, which allows them to automate their cooperation.

On the whole, the implementation of management structure follows a common pattern:

  • A DAO member puts forward a proposal
  • The proposal is voted by DAO members
  • If the majority of votes is secured, the proposal is adopted

In the case of automated governance, one more point is added:

  • The proposal is adopted automatically

However, when we talk about automation, it should be clearly understood that there are limits to it. At some point, there will still be a need for "manual" intervention. Therefore, in the case of a DAO implemented on top of a blockchain, automation is a procedure for executing commands within the blockchain.

Moreover, DAOs can be quite different in different communities. Therefore, developing the most one-size-fits-all solution possible to the issue of Governance, that could be implemented in different DAOs is not a trivial task. Let us present the solution of the RSquad Blockchain Lab which claims to be one of the most versatile on the market.

Governance Requirements

image

Although the general scheme of DAO Governance is quite simple, a closer look reveals new nuances, so before proceeding to the stage of development, RSquad lab formulated the following requirements for Governance.  

Governance is to represent a serverless application, based entirely on blockchain and consisting of a system of smart contracts. The purpose of the app is to provide any blockchain ecosystem project, be it an NFT marketplace, DEX or a Metaverse, with a tool for managing DAOs, including the issuance of governance tokens.

The solution to DAO Governance strives to enable DAO members to make use of the following functions:

  • View the current status of governance, as well as all proposals made and commentaries thereto
  • Create proposals that would be automatically executed on-chain once adopted
  • Deposit and withdraw DAO tokens
  • Vote for proposals with your DAO tokens
  • Leave comments on the proposals, which will be recorded in the blockchain

The RSquad solution should enable any user to create their own DAOs with an internal economy based on governance tokens. Voting for DAO solutions should be proportional - that is, it should depend on the number of tokens in the voter’s possession.

The solution

image

The development of the first version of the Governance solution by RSquad was based on the asynchronous Everscale blockchain (formerly Free TON). The biggest challenge arose during the development of decision automation.

Here’s how Roman Nguyen, a CTO of RSquad, described the automation problem on the Everscale blockchain:

"On this blockchain, DAOs are managed through the so-called initials – community members who are elected by other managers. So, we are dealing with delegated powers. When it comes to the implementation of an adopted regulation, it still has to be entered into the blockchain manually by the developers responsible for it. What is more, this is often a poorly worked out procedure that is dependent on the human factor. Just as the work of initials themselves involves this very human factor.

The solution aimed at eliminating the human factor (and increasing automation) is a double-edged sword. On the one hand, it is the follow-up to the institute of initials – every member of the community can use their tokens directly in the voting procedure. On the other hand, the result of voting will still be processed manually. This second facet of the problem is the one RSquad DAO addresses and solves."

As a result, a DAO organization system emerged that allows you to issue governance tokens, put forward proposals, and vote for them with tokens. It reads the data that the vote initiator has introduced into their proposal, and if the proposal is approved by the voters, it modifies the blockchain itself.

A unique feature of the Everscale blockchain is that smart contracts communicate with each other through messages. Furthermore, in a message, you can both deploy smart contracts on blockchain and launch individual smart contracts and their systems. It is this feature that ensured the realization of the necessary automation degree of the decision execution, which is absent in the vast majority of its analogues on the market.

When the proposal is formed by a DAO participant, the corresponding message is formed along with the proposal, which provides the automated decision execution by the relevant smart contracts.

A detailed description of RSquad DAO smart contracts

image

DAO Governance service developed by RSquad is a system of smart contracts. Their functionality and interconnection is presented below:

  • SmvRoot is a contract that serves as a link between all contracts in the system and is the central point of entry for users.
  • SmvRootStore is a contract that stores codes, addresses and abis of other system contracts.
  • Proposal is a contract for the registration and calculation of votes, which automatically determines the destiny of the proposal depending on the result of the vote.
  • VoitingWallet is a special wallet for voting.
  • Comment is a contract that contains a discussion of the proposal by users.
  • RootTokenContract and TONTokenWallet are contracted implementing the TIP-3 token standard.

The figure below shows the complete architecture of smart contracts.

image

The user interface is completed on the basis of Web3.0 technology and is designed in an uncluttered style.

image

When creating a proposal, the user enters the name of the proposal with a description in the appropriate fields (see the screenshot above), and fills in the Client address and Payload fields, which are the key to automation. Client Address is the field where you need to enter the address then the proposal will use to report its start and end dates. The Payload field is to be filled in with a message, which, if accepted, will be transmitted to the blockchain as a transaction – that is, implemented.

Conclusion

This is an example of DAO solution that has taken it one step further than most competitors. It not only includes the classical DAO mechanisms, but also helps to automate the onchain execution of its solutions to a maximum extent.

The implementation of DAO structure is available for organizations large and small, from the simplest to the most complex and multi-level ones. The test version of the system, developed under Everscale, is an excellent ground for a further enhancement of DAO solutions in both current and future blockchain projects.

The RSquad Governance solution itself and all the necessary technical documentation can be found in the team’s repository. Experiment with DAO, use different mechanics and find the optimum mechanisms, as, following closely Churchill’s wording: "Democracy is the worst form of governance, except for all the others".

react to story with heart
react to story with light
react to story with boat
react to story with money

Related Stories

L O A D I N G
. . . comments & more!