← Back

Whitepaper

Vaxa: Programmable money meets autonomous AI agents. A decentralized marketplace for AI services on Avalanche C-Chain, using x402 HTTP-native payments and ERC-8004 on-chain reputation.

Luma 2026Avalanche TrackFuji Testnet

Architecture

Vaxa has three surfaces: a Next.js web app with wallet connection (RainbowKit + wagmi), a Telegram bot (Telegraf) on Railway, and 6 AI agents powered by NVIDIA NIM. All communicate through x402 paywall middleware enforcing on-chain USDC payments on Avalanche Fuji.

Vaxa PlatformWeb AppNext.js + wagmi + RainbowKitTelegram BotTelegraf + ethers.jsAI AgentsNVIDIA NIM + OpenRouterx402 Payment Middleware402 → USDC Transfer → Verify → ResultAvalanche C-Chain (Fuji)USDC Settlement · ERC-8004 ReputationUSDC + Proof

AI Service Agents

Each agent is a REST endpoint protected by x402 paywall. Clients POST, receive 402, submit USDC on-chain, retry with tx proof.

Code Review
Security, performance, and style analysis
/api/agents/code-review
0.05USDC
Summarizer
Distill text into bullets, paragraphs, TL;DR
/api/agents/summarize
0.02USDC
Translator
Context-aware translation across 50+ languages
/api/agents/translate
0.03USDC
SQL Generator
Generate optimized SQL from natural language
/api/agents/sql-generator
0.04USDC
Regex Generator
Create regex patterns with explanations
/api/agents/regex-generator
0.03USDC
Code Explainer
Explain any code in plain English
/api/agents/code-explainer
0.02USDC

x402 Payment Flow

x402 is an HTTP-native payment standard. Payments happen in-band within the HTTP request itself — no separate invoicing or subscription.

ClientAgent ServerAvalanchePOST /api/agents/code-review402 Payment RequiredSign USDC transfer (MetaMask/Rabby)POST + X-Payment-Proof: {txHash}Verify txConfirmedERC-8004 update200 OK + AI Result

402 Response Payload

{ "x-payment-required": { "version": "1.0", "network": "avalanche-fuji", "chainId": 43113, "token": "USDC", "amount": "50000", "decimals": 6, "recipient": "0xAgent...", "description": "Code review - 1 request", "expiresAt": 1720000000 } }

ERC-8004 On-Chain Reputation

Every successful payment triggers a reputation update on the AgentRegistry (ERC-8004). Scores range 0-1000, permanently recorded on Avalanche.

Scoring Algorithm

Reputation points per transaction milestone+201st tx+5/tx2nd-10th+2/tx11th-50th+1/tx51st++1Bonus

Contract Interface

registerAgent(name, type, uri)
recordSuccessfulTx(addr, amount)
getAgent(addr) → Profile
getReputationScore(addr) → uint256
getTopAgents(type, limit) → addr[]
deactivateAgent()

PayAgent — Programmable Spending

PayAgent executes payments on behalf of users based on configurable rules and spending limits.

Spend Rules

Subscriptions, tips, donations, conditional payments with custom triggers.

Enforcement

10-point check: daily/weekly/monthly limits, blocked recipients, rule validation.

Analytics

Real-time spending stats: today, week, month, all time. Per-rule tracking.

Spend Enforcement (10 checks)

1Rule enabled?
2Amount ≤ maxSinglePayment?
3Recipient not blocked?
4Recipient in allowedRecipients?
5Daily spend + amount ≤ dailyLimit?
6Weekly spend + amount ≤ weeklyLimit?
7Monthly spend + amount ≤ monthlyLimit?
8Agent reputation ≥ minScore?
9Daily triggers < maxDailyTriggers?
10Execute x402 payment

Smart Escrow

Smart escrow holds payment until the AI agent completes the task. Users approve (release) or reject (refund) based on result quality.

1

Create escrow + lock USDC

2

Agent executes task

3

User approves → release funds

Telegram Bot (@vaixa_bot)

Full access to all AI agents and GitHub integration directly in chat. Uses its own hot wallet to pay for users, with daily spending limits. Wallet verification via cryptographic signature.

Commands

/code — Code review (0.05)
/summarize — Summarize (0.02)
/translate — Translate (0.03)
/sql — Generate SQL (0.04)
/regex — Generate regex (0.03)
/explain — Explain code (0.02)
/github — Issues, PRs, repos
/escrow — Smart escrow
/menu — Interactive menu

Features

Wallet verification via EIP-191 signature
GitHub integration (issues, PRs, repos)
Bot pays for you (5 USDC/day limit)
Interactive inline keyboard menus
Smart escrow in chat
Transaction history synced to web
Persistent wallet mapping via API

Tech Stack

Frontend

Next.js 16 (App Router)
Tailwind CSS v4
RainbowKit + wagmi v3
Framer Motion
Lucide React icons

Blockchain

Avalanche C-Chain (Fuji)
Solidity (ERC-8004)
ethers.js v6
USDC (6 decimals)
x402 payment standard

AI

NVIDIA NIM API (primary)
OpenRouter (fallback)
OpenAI-compatible SDK

Backend / Bot

Telegraf (Telegram Bot)
Railway (bot deploy)
Vercel (web deploy)
GitHub API integration

Deployments

Web AppLuma App
Telegram Bot@vaixa_bot
GitHub (Web)Luma GitHub
NetworkAvalanche Fuji (43113)