VeBetter: Build X2Earn Apps
Creating & Submitting Proofs
Learn how to structure and submit JSON-based proofs that verify user actions and support transparent, onchain reward distribution.
What Are Proofs?
In this lesson, you’ll learn how to structure and submit proofs, JSON objects that verify user actions, and use the VeBetter SDK to send B3TR rewards on the testnet.
A proof is a structured JSON payload that documents a real-world action.
It typically includes:
What the user did
Where/when it happened
The device/app that recorded it
Media or data to support it
This acts like a digital “receipt” for positive behavior, ensuring rewards are verifiable and auditable.
Example Proof Payload
description
: A human-readable summaryproof
: Supporting media or metadata (image, GPS, etc.)impact
: The quantified result of the action (e.g., 5000 steps)
This JSON is recorded onchain in event logs.
Submit Rewards with the SDK
VeBetter provides a JavaScript SDK to make reward distribution simple.
Here’s how to submit a proof and send B3TR:
This function:
Records the proof + metadata onchain
Sends B3TR to the user
Works on the testnet once your app and reward distributor are registered
Optional: Contract-Based Distribution
If you're building a backend service or writing a smart contract, you can call the reward distribution function using its ABI.
Smart contracts must be whitelisted under your app in the dashboard to execute this method.
Join our Telegram