hackquest logo

Coal

The commerce platform for the agent economy on 0G. Products, checkout, paywalls, subscriptions, splits. Agents pay via x402. 0G powers verifiable receipts, AI-native discovery, and on-chain proofs

Videos

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

Tech Stack

Next
React
Solidity
Ethers
Web3
Node

Description

Coal is the commerce platform for the agent economy on 0G.

It provides:

• A full merchant commerce stack — products, hosted checkout, payment links, subscriptions, paywalls, automated revenue splits

• Autonomous wallet-based purchasing for AI agents via x402 (Coinbase) and OKX APP on the same rails as humans

• A multi-tenant MCP server (13 tools) so Claude / Cursor / OpenAI agents can shop on Coal with one config line

Watch / Try / Verify

🎥 Pitch video (judges) https://youtu.be/FOieBgJ3j4A

🎥 Launch / demo video https://youtu.be/fnlcOIcK-yk

📄 Pitch deck (PDF) https://www.usecoal.xyz/coal-pitch-deck.pdf

🌐 Live platform https://usecoal.xyz

🤖 Live agent sandbox https://agent.usecoal.xyz

🛒 Demo store https://store.usecoal.xyz

🔌 MCP server https://mcp.usecoal.xyz/api/mcp

✅ 0G health (live) https://api.usecoal.xyz/api/0g/health

📦 React SDK on npm coal-react v0.4.1

💻 GitHub https://github.com/emmanuel39hanks/coal


The Problem

Today, merchants must choose between:

Stripe:

• No crypto support

• No autonomous agent purchasing

Raw x402:

• Only a bare HTTP 402 handshake

• No products, checkout, subscriptions, receipts, or dashboards

There is no complete commerce layer for the agent economy.

Coal fills this gap — and ties every payment to 0G for full verifiability.


Who Uses Coal

  1. Human Shoppers

  • Pay via hosted checkout links

  • Use MetaMask or any Base-compatible wallet

  • Receive a public receipt verification page with a 3-step proof trail

  1. AI Agents (autonomous)

  • Discover merchants via /api/agent/discover

  • Programmatically create checkout sessions

  • Sign ERC-3009 USDC transfers off-chain

  • Receive the same 3-step proof trail as humans

  • Gasless — Coal's operator wallet submits signed transactions on their behalf

  1. Claude / Cursor / Custom Agents (via MCP)

  • One config line in Claude Desktop or Cursor

  • 13 MCP tools cover discovery, paywall checks, payment, receipts, downloads

  • Multi-tenant — every user provides their own wallet key as a header; server holds no shared secrets


0G Integrations — 5 Components (All on Mainnet)

  1. 0G Storage (Log Layer)

  • Stores payment receipts as immutable, content-addressed JSON

  • Holds encrypted merchant memory (AES-256-GCM)

  • Holds x402 paywall manifests

  • Deduplicated via payload hash

  1. 0G Chain

Contract: CoalReceiptAnchor V2 Address: 0x24a80A3Bb16d26D4063Ecd4B2fD64C6856E25E8b

  • Anchors SHA-256 hash of every receipt

  • Uses DASigners precompile (epochNumber())

  • Stamps DA epoch into each anchor event

  1. 0G Compute

  • Runs AI commerce queries: merchant memory lookup, policy evaluation, product routing

  • Provides TEE attestation via broker.inference.verifyService

  • Powers the agent demo with Qwen on the decentralized GPU network

  • Sealed inference with per-response attestation

  1. 0G KV

  • Mutable mirror layer

  • Keeps merchant profiles + memory pointers always fresh

  • Ensures real-time agent discovery without walking the full log history

  1. 0G DA

  • Streams payment events via gRPC (Singapore sidecar)

  • Event types:

  1. payment_confirmed

  2. subscription_created

  3. subscription_renewed

  4. webhook_delivered

  5. paywall_access_granted

  6. receipt_anchored


The Proof Trail

Every payment (human or agent) generates a 3-step verifiable trail:

  1. Base transaction confirmed — USDC settled with ~2s finality

  2. Receipt stored on 0G Storage — immutable, content-addressed

  3. Receipt hash anchored on 0G Chain — SHA-256, tamper-proof

Public verification page: usecoal.xyz/verify/{session-id}

A judge can click it for any paid session.

Progress During Hackathon

Coal started as a crypto checkout platform that won 🥇 1st Place at the MNEE Hackathon.

During the 0G APAC Hackathon, it evolved into full-stack commerce infrastructure for the agent economy.

Below is exactly what shipped during this hackathon period.


New 0G Integrations (All on Mainnet)

  1. 0G Chain — Receipt Anchoring (V2 Upgrade)

  • Deployed CoalReceiptAnchor V2 at: 0x24a80A3Bb16d26D4063Ecd4B2fD64C6856E25E8b

  • Calls DASigners precompile via epochNumber()

  • Embeds DA epoch into every anchored event

Three anchor functions:

  • anchorReceipt

  • anchorEntitlement

  • anchorProfile

  1. 0G Compute — Verifiable AI Execution

  • Per-response TEE attestation

  • Verified via broker.inference.verifyService

  • Response metadata includes:

    1. verificationStatus: sealed_tee

    2. provider

    3. timestamp

  1. 0G KV — Real-Time State Layer

  • Merchant profile → merchant:profile:latest

  • Memory pointer → merchant:memory:latest

  • Paywall manifests → paywall:{id}:manifest:latest

  1. 0G DA — Event Streaming Pipeline

  • gRPC-based system with custom .proto definitions

  • 6 event types

  • Blob dispersal + confirmation polling (≤5 retries)

  • Fire-and-forget non-blocking architecture

Dedicated sidecar (Singapore EC2): 54.179.237.217:51001

  1. 0G Storage — Immutable Data Layer

  • Published merchant profiles + encrypted memory snapshots

  • Content-addressed storage with payload hash deduplication


Agent-Native Features

Agent Discovery: GET /api/agent/discover

Returns active merchants, products, paywalls, and 0G Storage roots verifiable on-chain.

Autonomous Agent Sandbox: https://agent.usecoal.xyz

Features:

  1. Auto-created Privy wallets per user

  2. Local persistence

  3. MetaMask funding

  4. Balance polling every 10s

Full loop: discover → checkout → pay → verify

Gasless Payments (ERC-3009)

  1. Agent signs transferWithAuthorization off-chain

  2. Operator wallet submits

  3. Gas (~$0.001) covered by Coal

x402 Paywalls

  1. Full HTTP 402 flow with X-PAYMENT header

  2. On-chain verification via ERC-20 event decoding

  3. 200 OK after payment

Dual-protocol

  • Same /verify endpoint accepts:

    1. Coinbase x402 (v1)

    2. OKX APP (v2) envelopes

Double-spend protection

  1. Verifies session existence before transfer


Human Commerce Features

Public Receipt Verification https://usecoal.xyz/verify/{id}

Includes:

  • 3-step proof trail

  • Live badges (Base / Storage / Chain)

  • Direct explorer links

0G Monitoring Panel

  • Real-time health across all 5 components

  • Activity feed

  • Manual publish trigger

Merchant Console

  • Products

  • Payment links

  • Paywalls

  • Subscriptions

  • Team management

  • Transactions

  • Analytics


Payment Infrastructure

Verification cron

  1. Minimum 2-block confirmations

  2. Sanctions screening

  3. Atomic transaction upserts

  4. Optimistic session locking

Async anchoring

  1. Retries failed writes from backlog

7 security passes

  1. Timing-safe auth

  2. Sanctions screening

  3. SSRF protection

  4. RBAC for financial operations

  5. Block confirmation enforcement

  6. TOCTOU protections

  7. Atomic verification guarantees


Developer Experience

• Full OpenAPI 3.0.3 spec https://api.usecoal.xyz/api/docs/ui

• Public docs https://usecoal.xyz/docs

Covers:

  1. Architecture

  2. 0G integrations

  3. Examples

Runnable example apps

  1. coal-react-checkout

  2. coal-agent

  3. coal-mcp-server

  4. coal-oracle-agent

  5. demo-store

React SDK shipped on npm as coal-react v0.4.1

MCP server with 13 tools listed on Smithery and the official MCP Registry


Traction

Distribution

  • Smithery directory — listed and indexed

  • Official MCP Registry — listed and indexed

  • npm: coal-react v0.4.1

  • Docs site live at usecoal.xyz/docs

Engagement Beyond Code

  • Walkthrough articles for builders + merchants

  • Small bounty program — developers building things on top of Coal

  • Test users running real flows on the agent sandbox

  • Daily replies + DMs across X, LinkedIn, Farcaster, Reddit, Discord, Telegram

Inbound Signal

"x402 + APP wire compat actually working is a real one — not many builders go through both envelopes… happy to point the mapper crawler at agent.usecoal.xyz for endpoint stability data showing up in our public catalog."

CDP-verified Coinbase Developer Platform builder

Past Credibility

🥇 1st Place — MNEE Hackathon (Best Commerce & Creator Tooling) — Devpost (https://devpost.com/software/coal-programmable-commerce)

Coal has now evolved into full-stack commerce infrastructure for the agent economy through the 0G APAC Hackathon.

Live Proof Anyone Can Check Right Now


Fundraising Status

Funding & Outlook

Coal is currently self-funded.

  • No venture capital raised

  • Funded through prize winnings from the MNEE Hackathon

    • 🥇 1st Place - Best Commerce & Creator Tooling


Partnerships & Opportunities

Open to conversations with:

  • Ecosystem funds

  • Grant programs

  • Strategic partners

Specifically those aligned with:

  • Agent economy infrastructure

  • On-chain commerce

  • AI × crypto integrations


Go-To-Market Direction

The 0G APAC Hackathon submission serves as the foundation for public launch.

Focus:

  • Crypto-native merchants

  • Developers building agent-driven applications

Core value:

  • A single payment infrastructure that works for:

    • Humans

    • Autonomous AI agents

  • Both operating on the same rails

Team Leader
EEmmanuel Haankwenda
Project Link
Deploy Ecosystem
0G0G
Sector
AIDeFiInfra