Stage 2: Building
Once you’ve scoped out your DataDAO, it’s time to start building.
Moksha is for Testing Purposes Only
Ensure you create a different configuration for data validation on testnet versus mainnet. Data privacy cannot be guaranteed in testnet.
Context:
This page will take a step-by-step approach for an example implementation of a DataDAO. It's important to note that this is just one possible implementation of contracts – developers are encouraged to customize this contract or create their own versions to suit their specific use cases.
Before creating a DataDAO, it is good to understand the core smart contracts. These smart contracts do not need to be deployed by DataDAO builders. However, you will need to deploy your own Data Liquidity Pool & DLPToken (either the template version or your own version). For testing and integration, you should use the addresses deployed on Moksha.
Step 1: Deploy the DLP Smart Contract
The core of every DataDAO is the fully customizable DLP Smart Contract. A DLP smart contract is responsible for rewarding data contributors DataDAO-specific tokens for their data. After proof-of-contribution is run, a score from 0-1 is given to the file, which can be used to determine how valuable the data is, and convert that to DataDAO-specific tokens.
- Repo: You can use the audited smart contract templates from the Vana GitHub repo here. Follow first 12 steps to complete the deployment.
Step 2: Build a UI for Data Contributors
Your DataDAO needs a user-friendly interface where contributors can upload, encrypt, and validate their data. You can choose from a range of options for building this UI — anything from a web app to a browser extension or mobile app. You can also use the open-source DataDAO UI template here or understand how it works here.
- Key Feature: Ensure the UI has client-side encryption to maintain privacy and control for data contributors.
- Tip: Ensure your users understand how to access that data source. For example, through a GDPR or CCPA data export request, through scraping their own data, or through an API.
- Tip: You can skip this step. Some DataDAOs are using Chrome extensions or scrapers to contribute data without a separate UI.
References
Check out examples like gptDataDAO or redditDataDAO.
Step 3: Register your DataDAO
Once a DLP Smart Contract is deployed to the Vana network you need to register it with the Root Network. To be part of the Vana ecosystem and qualify for the DataDAO rewards program, the DLP contract needs to be integrated with the Data Registry and DLP Root contracts. This requires meeting a minimum staking threshold. To prevent DataDAO spam there is a maximum number DataDAO that can registered and a minimum staking amount required
Note
Registering DataDAOs on Testnet will be limited. Inactive DataDAOs will be deleted after 2 weeks of inactivity.
Step 4: Implement Proof-of-Contribution
A critical piece of your DataDAO is the proof-of-contribution function, which validates the quality of the submitted data and can be used to reward fungible DataDAO-specific tokens. You can customize this function to meet the needs of your specific DataDAO. Use the proof-of-contribution template provided here as a starting point.
- Data validation and value depends on the data source.
- Once decided, implement your incentives and validation checks.
- We recommend rolling this out iteratively in phases to test the incentives.
DataDAOs have the flexibility to validate data according to their unique requirements.
- Meaningfulness: The data should contribute novel and valuable insights to the DataDAO's overall dataset. It should enhance the richness and diversity of the available information.
- Validity: The data must adhere to a schema that is consistent with the existing data within the DataDAO. Conforming to a standardized structure ensures compatibility and facilitates efficient data processing.
- Authenticity and Contributor's rights: The data must be genuine and, if required, originate from a legitimate account. This ensures the integrity and reliability of the information. The data contributor submitting the data must have the necessary rights and permissions to do so.
Example
See the ChatGPT DataDAO for a detailed example of proof-of-contribution.
If using Satya validators, use this proof-of-contribution template as a starting point. Attestation schema is here.
Step 5: Connect to Satya for Proof Validation [Optional]
Connect your DataDAO's UI and backend to the Satya network, which will handle data validation through decentralized validators. This ensures your proof-of-contribution mechanism runs efficiently and securely. You can read the whole integration guide in the Data Validation section. You can also implement your own client-side ZK Proof or run the proof-of-contribution function on your own infrastructure, even non-TEE.
Updated about 1 month ago