How to Create and Deploy a VRC-20 Token

A step-by-step guide to creating and deploying your VRC-20 Data Autonomy Token (DAT) on the Vana network.

📘

For DataDAO Creators

The create-datadao tool described in DataDAO Creator Quick Start and the Manual Setup Guide (Advanced) guide also include deploying VRC-20 tokens.

This guide provides the comprehensive walkthrough for deploying a VRC-20 compliant Data Autonomy Token (DAT).

The Recommended Path: Using the DATFactory

The easiest, safest, and most common method for deploying a token is to use Vana's pre-deployed DATFactory contract. This contract acts as a template engine, allowing you to deploy a secure, audited token with built-in vesting schedules in a single transaction, directly from a block explorer. No local development setup is required.

📘

Advanced Users

An advanced method for deploying a custom, modified token contract from a local environment is also available. For most projects, this is not necessary. See Smart Contracts for more detail.

How It Works

You will call the createToken function on the DATFactory contract. This single function call will:

  1. Deploy a new token contract for you based on the type you choose.
  2. Deploy separate VestingWallet contracts for each of your team/investor allocations.
  3. Mint the specified token amounts directly to those vesting wallets.

Step 1: Prepare Your Token's Parameters

Before interacting with the contract, gather all the information for your token. You will be submitting one transaction with a single params object.

ParameterTypeDescription
datTypeenum (0, 1, or 2)The type of token to deploy. 0(DEFAULT): A standard token with blocklisting. 1(VOTES): Adds on-chain governance features. 2(PAUSABLE): Adds the ability for the owner to pause all token transfers. We recommend 1 for most DataDAOs.
namestringThe full name of your token (e.g., "My DataDAO Token").
symbolstringThe symbol for your token (e.g., "MDT").
owneraddressThe wallet address that will have administrative control over the token.
capuint256The maximum total supply the token can ever have. Must include 18 decimals (e.g., 1000000000000000000000000 for 1M tokens).
schedulesVestingParams[]An array of vesting schedules for team, investor, or treasury allocations. Each schedule will create its own secure vesting contract. See how to format this below.
saltbytes32For deterministic address generation. For most use cases, leave this as the default: 0x00...00.

Formatting Your schedules Parameter

This is the most important parameter. It's an array of objects, where each object defines one vesting contract. You will need to format it as a JSON array for the block explorer.

Structure for each vesting schedule:

  • beneficiary (address): The final recipient of the vested tokens.
  • start (uint64): The vesting start time as a Unix timestamp.
  • cliff (uint64): The duration of the cliff in seconds (e.g., 15778463 for 6 months).
  • duration (uint64): The total duration of vesting in seconds (must be > cliff).
  • amount (uint256): The number of tokens for this schedule, with 18 decimals.

Exampleschedules array to copy and paste:

[
  {
    "beneficiary": "0x...",
    "start": 1717977600,
    "cliff": 15778463,
    "duration": 31556926,
    "amount": "500000000000000000000000"
  },
  {
    "beneficiary": "0x...",
    "start": 1717977600,
    "cliff": 15778463,
    "duration": 63113852,
    "amount": "250000000000000000000000"
  }
]

Step 2: Deploy Using Vanascan

  1. Navigate to theDATFactory Contract:
  2. Connect Your Wallet: Go to the "Contract" tab, click "Write as Proxy," and connect your wallet.
  3. ExecutecreateToken: Find the createToken function (usually #2). Click the small arrow to expand the params tuple.
  4. Fill in the Parameters: Carefully enter the values you prepared in Step 1. Paste your formatted JSON array into the schedules field.
  5. Write Transaction: Click "Write" and approve the transaction in your wallet.

Step 3: Verify Your Deployment

  1. View your successful transaction on Vanascan.
  2. Go to the "Logs" tab.
  3. Find the DATCreated event. The token address is your new VRC-20 contract. Save this address.
  4. You will also see multiple VestingWalletCreated events. The wallet address in each is the address of the secure vesting contract created for each schedule.

Part 2: Post-Deployment Compliance

Your token is deployed, but to make it fully operational, you must:

  • Associate Your Token with Your DataDAO: Link your new token address to your primary DataDAO contract to establish its official purpose.
  • Submit for Verification: Follow the Vana Foundation's process to have your DataDAO and token officially reviewed for ecosystem programs.