Granting Data Access

A guide for DataDAO creators on how to securely manage and approve onchain permissions for data consumers.

As a DataDAO creator, one of your key responsibilities is managing access to your dataset. This guide walks you through the on-chain process for approving a request from a developer or researcher.

📘

Before You Begin

This guide assumes you have already published a dataset and have a refinerId for it. You should have also received a request from a data consumer that includes their wallet address and the computeInstructionId they wish to use.

Data Contributor Voting

For community governance, you can use token voting to let data contributors decide on access requests.

Setup: Go to Snapshot and create a new space with your DataDAO's VRC-20 token. You'll need to connect an ENS name to create the Snapshot page. Add a profile photo and share the link to DAO core contributors, adding their wallets as authors.

Process:

  1. Create a proposal with the requestor's details, pricing, and compute job
  2. Set voting period (typically 1-3 days)
  3. If approved, proceed with the technical approval steps below

For examples, see past proposals by the Spotify dataDAO and Reddit dataDAO

The Two-Part Approval Model

To maintain security and control, Vana uses a two-part permission system. You are not just granting access to data; you are approving a specific compute script to run on that data. You will grant two separate on-chain permissions:

  1. Data Permission: Approves a user to query specific tables or columns of your dataset.
  2. Compute Permission: Approves a specific compute script to be used with your dataset.

Step 1: Grant Data Permission

First, grant the user permission to query your data by calling the addPermission function on the QueryEngine contract.

  • Contract: QueryEngine (0xd25...)
  • Function:
    function addPermission(
      address grantee,
      uint256 refinerId,
      string calldata tableName,
      string calldata columnName,
      uint256 price
    )
  • Parameters:
    • grantee: The wallet address of the data consumer.
    • refinerId: Your published dataset's ID.
    • tableName / columnName: Leave these blank to grant access to the entire dataset, or specify them for more granular control.
    • price: The amount in $VANA you wish to charge per query.

Step 2: Approve the Compute Instruction

Next, approve the specific compute job the user wants to run. You only need to approve each computeInstructionId once; afterward, any user with data permission can use it.

  • Contract: ComputeInstructionRegistry (0x578...)
  • Function:
    function updateComputeInstruction(
      uint256 instructionId,
      uint256 dlpId,
      bool approved
    )
  • Parameters:
    • instructionId: The ID provided by the data consumer.
    • dlpId: Your DataDAO's ID.
    • approved: Set to true.
📘

Note on the Default Instruction

Even if the consumer is using a default compute instruction (e.g., id = 3 on Mainnet), you must still approve it for your DataDAO once.

Understanding Access Fees

Once both permissions are on-chain, the data consumer can run their job. For every query they execute, the access fee you set is paid in $VANA.

Per the current data access model, 80% of this fee is sent directly to your DataDAO's treasury, creating a direct revenue stream from your data's utility.