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 guide walks you through a step-by-step process for deploying a new Data Liquidity Pool (DLP) on Vana. It covers smart contract setup, UI creation, proof-of-contribution implementation, and compliance with the latest VRC standards.

📘

Important Update:

Starting April 1, DLPs must comply with VRC-15 (Data Access), VRC-20 (DLP Token Standards), and VRC-14 (Rewards Eligibility) to qualify for incentives.


📚 Prerequisites

  1. Smart Contract Knowledge: Familiarity with ERC-20, vesting, and smart contract deployment.
  2. Understanding DataDAO Architecture: Review Vana Core Concepts
  3. Node/Storage Infrastructure: Basic knowledge of IPFS, TEE (Trusted Execution Environment), and Docker.

🛠️ Step 1: Deploy the DLP Smart Contract

Every DLP is built on a smart contract that handles data rewards and proof-of-contribution logic.

🎯 Goal

  • Deploy a compliant DLP Smart Contract and VRC-20-compliant token.

📦 Repo

  • Use Vana’s audited smart contract templates from the GitHub repo here.
  • Follow the deployment steps to create your smart contracts

Key Actions

  • Deploy an ERC-20 token with a fixed or predictable supply.
  • Implement vesting with a minimum 6-month linear unlock for team allocation. You can use OpenZeppelin contract for this.
  • Add 48-hour timelocks for any major upgrade changes.
  • Verify smart contract on Vanascan.

Checklist:

  • Token has predictable supply with vesting.
  • Contract verified on explorer.
  • No unlimited minting or large rebase logic.

🖥️ Step 2: Build a UI for Data Contributors

Your DLP needs a user interface where contributors can upload, encrypt, and validate their data.

🎯 Goal

  • Build a user-friendly interface where contributors can manage and submit data.
  • Ensure encryption and access control mechanisms are integrated.

📦 UI Repo

  • Use the open-source DataDAO UI template here.
  • Customize the UI based on your data contributor requirements.

Key Actions

  • Integrate client-side encryption to protect user data.
  • Educate contributors about data sources (e.g., GDPR/CCPA data exports).

Tip: Some DLPs skip UI and use scrapers or Chrome extensions to gather data.


🔎 Step 3: Implement Proof-of-Contribution

A critical piece of your DLP is the proof-of-contribution (PoC) function that validates data quality.

🎯 Goal

  • Implement and refine PoC logic to validate and reward data contributions.
  • Align PoC with VRC-5, ensuring meaningful and valid data.

📦 PoC Template

  • Use the Satya PoC template as a starting point.
  • Customize the PoC pipeline to match your DLP’s requirements.

Key Actions

  • Define refinement logic for data cleansing and anonymization.
  • Validate data based on meaningfulness, validity, and authenticity.
  • Publish attestation schemas onchain.

📘

Example:

See the ChatGPT DataDAO’s PoC example.


📡 Step 4: Refine Your Data Contributions

Refinement is mandatory under VRC-15. You need to structure and encrypt user data before storing it.

🎯 Goal

  • Add a refinement step to transform raw data into a structured format.
  • Encrypt data with a DLP-specific public key.

📦 Refinement Repo

  • Use the refinement template here.

🔗 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.

Key Actions

  1. Extend Your PoC Pipeline
    • Add refinement as a Docker process.
    • Output encrypted libSQL files.
  2. Handle Storage
    • Pin refined data on IPFS using providers like Pinata or Infura.
  3. Publish Refiner & Schema Onchain
    • Add schema structure to IPFS.
    • Point the DataRefinerRegistry to the Docker URL with your refinement.

🔗 Step 5: Register Your DLP

To qualify for rewards, DLPs must be registered with the Vana Network.

🎯 Goal

  • Register your DLP with the DLPRootContract and meet minimum staking thresholds.
  • Ensure compliance with VRC-14 and VRC-5 for rewards eligibility.

Key Actions

  1. Data Registry Integration
    • Attach refined data IPFS CIDs to the Data Registry.
    • Publish onchain permissions for query access by data consumers
  2. Grant Query Access & Define Pricing
    • Define access rules and pricing for data consumers.
    • Publish pricing via a website, email, or Discord.
  3. Test Query Access
    • Run test queries in a TEE environment to confirm data integrity.

🧩 Step 6: Launch a VRC-20 Compliant DLP Token

To receive rewards, you need a DLP token that meets VRC-20 standards.

🎯 Goal

  • Launch a DLP token or upgrade an existing one.
  • Ensure compliance with supply, vesting, and security rules.

Key Actions

  1. Define Token Supply & Emissions
    • Fixed cap or public emission schedule.
    • Minimum 6-month vesting for team allocations.
  2. Implement Key Security Requirements
    • 48-hour timelocks for fee changes or contract upgrades.
    • Cap transfer fees at ≤3%.
  3. Document Token Utility
    • Explain how the token interacts with data usage.

⚡️ Step 7: Connect to Satya for Proof Validation (Optional)

For advanced validation, connect to Satya’s decentralized network to verify proof-of-contribution.

🎯 Goal

  • Enable decentralized proof validation to boost security.
  • Leverage Satya for enhanced validator redundancy.

Key Actions

  • Follow the Satya Integration Guide.
  • Optionally implement client-side ZK Proofs or run the PoC function on your infrastructure.