Code Monkey home page Code Monkey logo

simple-dao's Introduction

Simple DAO

A quite simple implementaion of DAO in sui MOVE

  • sui version: 1.22
  • network: testnet
  • move version 2024 alpha

build

sui move build

test

sui move test

Documentation

This is a DAO based on a certain kind of Governance Coin to publish, vote for and finally execute the Proposals.

Governance Coin

Based on the standard Coin library in sui. It is used to vote for proposals, and one coin stands for one vote. The coin was first created with a certain amout and could be minted by the TreasuryCap owner.

Proposal

The Proposals are defined with a start_time and an end_time to indicate the voting time interval. Besides, Proposals also have a minimal votes required limit to indicate the minimal votes for execution(both for and against would count)

Voting

When voting starts, anyone holding the Governance Coin could vote for/against the proposal and the coin will NOT be consumed.

Each address could vote only once for each proposal.

Proposal Execution

When the voting period ends, any one could invoke the execute_proposal function to execute the proposal.

Code Structure

Governance Coin and MyDao are separated into two move files

Events

Proposal creation, voting, proposal execution will be logged as events.

simple-dao's People

Contributors

jf-li00 avatar unpwn4bl3 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.