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:
What You’ll Need
To participate in VeBetterDAO and enable your dApp to distribute B3TR rewards, your application needs two key capabilities:
Ability to distribute B3TR tokens
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:
Go to your app’s Settings
Click the ⚙️ icon
Add the contract address that will call distributeReward
Mark it as a Reward Distributor
Once approved, your dApp can trigger B3TR payouts on-chain.
For a full walkthrough and contract addresses, visit:
Create a Proof Submission System
Each reward must be supported by a verifiable JSON payload that outlines the user’s activity.
Example:
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
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
Join our Telegram