Giter VIP home page Giter VIP logo

datadao's Introduction

The DataDAO Contract

A FVM compatible base Data DAO contract with an example that demonstrates one way of implementing a Data DAO on Filecoin.

This repo contains the base Data DAO contract that can be used to build a custom Data DAO contract on top of it.

Clone the repo

git clone https://github.com/rk-rishikesh/DataDAO.git

Install the node modules

cd DataDAO

npm install

The Data DAO Contract

The folder structure of the Data DAO contract is as below

.
├── base                        # Base Contracts
│   ├── DataDAOConstants.sol    # Constants
│   └── DataDAOCore.sol         # Core functions integrated with filecoin.sol
├── interfaces                  # Interfaces
│   ├── IDataDAO.sol            # Interface for Data DAO contract
├── DataDAO.sol                 # The Base Data DAO contract
└── DataDAOExample.sol          # An example implementation of Base Data DAO contract

Core Idea

The DataDAO contract is build with a vision that, the developers can create their custom Data DAO on top of the DataDAO contract.

Functionality and possible customization

The deal is tracked by the following deal states

- Proposed
- Passed 
- Rejected   
- Active        
- Expired

Add a user

This function assigns the role to the user that is being added to the DAO, the rules to and right to add the user can be customized in the implementation contract

Create a new deal proposal

This function is used to create a new deal, the restrictions on who can create a deal can be fully customized in the implementation contract.

Approve or Reject the proposal

This function is responsible to set the state of the deal to Passed or Rejected. A simple voiting mechanism can be implemented to decide the fate of the deal.

Activate the deal

The function seeks verification from the contract on the storage provider's claim that the deal was created on Filecoin Network and the data is being stored.

Reward

This function can be found inside the DataDAOCore.sol file, and is responsible to send $FIL to the storage provider. The districution of the $FIL and the time of release of the funds can be customized in the implementation contract.

Data DAO Example Contract

A simple DataDAOExample contract allows the admins to act as the censor board for the data that is stored via the Data DAO. The users with the Data DAO membership NFT can join the Data DAO as a member and would be able to create proposal to store their data.

Once the deal proposal is created by a member and $FIL are locked inside the contract, the admins would either approve or reject the proposal. If the deal proposal is rejected, the member gets back the locked $FIL else the deal is taken forward to storage provider. The storage provider would store the data generate the proof and provide the deal ID to the DataDAO. The DataDAO contract will check with the Filecoin storage market to confirm whether the supplied deal ID is activated and stores the claimed data. Once the deal is expired, the Data DAO will pay the storage provider.

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.