How to Build an X2Earn dApp with VeBetterDAO

Building a dApp that rewards users for real-world sustainable actions like walking, recycling, or using public transport? You’ll want to integrate with VeBetterDAO, a protocol on VeChain that enables the distribution of B3TR tokens for verified positive behavior.

Here’s how to get started:

docs.vebetterdao.org 

What You’ll Need

To participate in VeBetterDAO and enable your dApp to distribute B3TR rewards, your application needs two key capabilities:

  1. Ability to distribute B3TR tokens

  2. A verifiable proof submission system in JSON format

Let’s break those down.

B3TR Token Distribution

Your smart contract must be able to send B3TR tokens when a user completes an eligible action. This reward logic must be on-chain, using VeChain-compatible contracts.

Example: Automatically distribute B3TR tokens when a “walk” action is verified by your backend.

Set Up on Testnet

To start building, use the official VeBetterDAO testnet dashboard:

dev.testnet.governance.vebetterdao.org 

Steps:

  • Add your app to the dashboard

  • Claim testnet B3TR tokens from the Faucet

  • Deposit tokens into your app balance (via the Deposit button)

This balance funds B3TR distributions to your users.

Authorize Your Contract

Before your smart contract or backend can distribute rewards, it must be authorized:

  1. Go to your app’s Settings

  2. Click the ⚙️ icon

  3. Add the contract address that will call distributeReward

  4. Mark it as a Reward Distributor

Once approved, your dApp can trigger B3TR payouts on-chain.

For a full walkthrough and contract addresses, visit:

Test Environment Docs

Create a Proof Submission System

Each reward must be supported by a verifiable JSON payload that outlines the user’s activity.

Example:

json
{
"account": "0xUserAddress",
"action": "walk",
"amount": 2000,
"timestamp": "2025-05-13T12:00:00Z",
"metadata": {
"location": "Ljubljana, SI",
"device": "FitApp"
}
}

This structure ensures the reward is based on a real, provable action.

Dev Tools & Resources

VeBetterDAO provides tools and environments to support your build process:

  • Simulate proofs

  • Deploy and test smart contracts

  • Claim testnet B3TR tokens

Test Environment Guide

Token Faucet

Use the X2Earn App Template

To save time, start with the official boilerplate:

VeChain X2Earn App Template (GitHub)

It includes:

  • A basic smart contract

  • Frontend scaffolding

  • Utilities for reward logic and proof handling

Why B3TR?

B3TR makes sustainability programmable.

Your app can reward walking, cycling, learning, volunteering - any verifiable action that creates real-world impact.

By building with VeBetterDAO, you join a growing ecosystem of purpose-driven applications on VeChain.

Start here: docs.vebetterdao.org