hackquest logo

TollGate

x402 payment rail for AI agents on 0G. Per-call billing over HTTP 402, receipts anchored on 0G mainnet, 0G Compute inference, 0G Storage memory. No accounts. No human approval.

Videos

Project image 1
Project image 2
Project image 3
Project image 4

Tech Stack

Web3
Ethers
Node
Solidity
React

Description

TollGate is the HTTP 402 payment rail for the 0G AI economy.

The problem: AI agents have no native payment infrastructure — every API call still requires human approval. HTTP 402 was reserved for machine payments in 1997. TollGate makes it real.

How it works:

1. Agent → GET /api/gateway/svc_0g_inference

2. ← 402 challenge (challengeId, payTo, amount, expiresAt)

3. Agent pays USDC on-chain

4. → retries with X-Payment proof

5. ← unlocked response + receipt anchored on 0G mainnet

0G Integration:

• 0G Chain — 5 contracts on mainnet (chainId 16661): AgentReceiptRegistry, AgentIdentityRegistry, ServiceRegistry, AgentBudgetController, DeliveryVerifier

• 0G Compute — real inference routing via @0gfoundation/0g-compute-ts-sdk

• 0G Storage — agent memory anchoring via @0glabs/0g-ts-sdk (real Merkle root)

• Agent ID — on-chain identity binding with memory roots

Features: FICO-style AgentCreditRegistry, ERC-721 receipt NFTs, MCP server (9 tools for Claude Desktop), A2A autonomous agent loop, live SSE payment feed.

Live: toll-gatee.vercel.app | API: tollgate-1.onrender.com

Progress During Hackathon

Week 1: Core x402 gateway — HTTP 402 challenge/response, SQLite receipt ledger, replay protection, SHA-256 request binding

Week 2: 0G integration — deployed 5 contracts to 0G mainnet, wired 0G Compute SDK for real inference, 0G Storage SDK for Merkle-root anchoring

Week 3: Agent economy layer — AgentCreditRegistry (FICO scoring), ERC-721 receipt NFTs, A2A autonomous loop, MCP server with 9 tools

Week 4: Polish + security — input validation across all 7 workspaces, integration test suite (12 test cases), README, live demo deployed on Vercel + Render

Fundraising Status

Bootstrapped. No external funding. Solo builder.

Team Leader
DDmytro Kravchuk
Project Link
Deploy Ecosystem
0G0G
Sector
AIInfraDeFiOther