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

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

<p>Coal started as a crypto checkout platform that won 🥇 1st Place at the MNEE Hackathon.</p><p>During the 0G APAC Hackathon, it evolved into full-stack commerce infrastructure for the agent economy.</p><p>Below is exactly what shipped during this hackathon period.</p><hr><h1>New 0G Integrations (All on Mainnet)</h1><ol><li><p><strong>0G Chain — Receipt Anchoring (V2 Upgrade)</strong></p></li></ol><ul><li><p>Deployed CoalReceiptAnchor V2 at: 0x24a80A3Bb16d26D4063Ecd4B2fD64C6856E25E8b</p></li><li><p>Calls DASigners precompile via epochNumber()</p></li><li><p>Embeds DA epoch into every anchored event</p></li></ul><p></p><p><strong>Three anchor functions:</strong></p><ul><li><p>anchorReceipt</p></li><li><p>anchorEntitlement</p></li><li><p>anchorProfile</p></li></ul><p></p><ol start="2"><li><p><strong>0G Compute — Verifiable AI Execution</strong></p></li></ol><ul><li><p>Per-response TEE attestation</p></li><li><p>Verified via broker.inference.verifyService</p></li><li><p>Response metadata includes:</p><ol><li><p>verificationStatus: sealed_tee</p></li><li><p>provider</p></li><li><p>timestamp<br></p></li></ol></li></ul><ol start="3"><li><p><strong>0G KV — Real-Time State Layer</strong></p></li></ol><ul><li><p>Merchant profile → merchant:profile:latest</p></li><li><p>Memory pointer → merchant:memory:latest</p></li><li><p>Paywall manifests → paywall:{id}:manifest:latest</p></li></ul><p></p><ol start="4"><li><p><strong>0G DA — Event Streaming Pipeline</strong></p></li></ol><ul><li><p>gRPC-based system with custom .proto definitions</p></li><li><p>6 event types</p></li><li><p>Blob dispersal + confirmation polling (≤5 retries)</p></li><li><p>Fire-and-forget non-blocking architecture</p></li></ul><p>Dedicated sidecar (Singapore EC2): 54.179.237.217:51001</p><p></p><ol start="5"><li><p><strong>0G Storage — Immutable Data Layer</strong></p></li></ol><ul><li><p>Published merchant profiles + encrypted memory snapshots</p></li><li><p>Content-addressed storage with payload hash deduplication</p></li></ul><hr><h1>Agent-Native Features</h1><p><strong>Agent Discovery: GET /api/agent/discover</strong></p><p>Returns active merchants, products, paywalls, and 0G Storage roots verifiable on-chain.</p><p></p><p><strong>Autonomous Agent Sandbox: </strong><a href="https://agent.usecoal.xyz">https://agent.usecoal.xyz</a></p><p>Features:</p><ol><li><p>Auto-created Privy wallets per user</p></li><li><p>Local persistence</p></li><li><p>MetaMask funding</p></li><li><p>Balance polling every 10s<br></p></li></ol><p><strong>Full loop: discover → checkout → pay → verify</strong></p><p>Gasless Payments (ERC-3009)</p><ol><li><p>Agent signs transferWithAuthorization off-chain</p></li><li><p>Operator wallet submits</p></li><li><p>Gas (~$0.001) covered by Coal<br></p></li></ol><p>x402 Paywalls</p><ol><li><p>Full HTTP 402 flow with X-PAYMENT header</p></li><li><p>On-chain verification via ERC-20 event decoding</p></li><li><p>200 OK after payment<br></p></li></ol><p><strong>Dual-protocol</strong></p><ul><li><p>Same /verify endpoint accepts:</p><ol><li><p>Coinbase x402 (v1)</p></li><li><p>OKX APP (v2) envelopes<br></p></li></ol></li></ul><p><strong>Double-spend protection</strong></p><ol><li><p>Verifies session existence before transfer</p></li></ol><hr><h1>Human Commerce Features</h1><p><strong>Public Receipt Verification</strong> <a href="https://usecoal.xyz/verify/{id}">https://usecoal.xyz/verify/{id}</a></p><p>Includes:</p><ul><li><p>3-step proof trail</p></li><li><p>Live badges (Base / Storage / Chain)</p></li><li><p>Direct explorer links<br></p></li></ul><p><strong>0G Monitoring Panel</strong></p><ul><li><p>Real-time health across all 5 components</p></li><li><p>Activity feed</p></li><li><p>Manual publish trigger<br></p></li></ul><p><strong>Merchant Console</strong></p><ul><li><p>Products</p></li><li><p>Payment links</p></li><li><p>Paywalls</p></li><li><p>Subscriptions</p></li><li><p>Team management</p></li><li><p>Transactions</p></li><li><p>Analytics</p></li></ul><hr><h1>Payment Infrastructure</h1><p><strong>Verification cron</strong></p><ol><li><p>Minimum 2-block confirmations</p></li><li><p>Sanctions screening</p></li><li><p>Atomic transaction upserts</p></li><li><p>Optimistic session locking<br></p></li></ol><p><strong>Async anchoring</strong></p><ol><li><p>Retries failed writes from backlog<br></p></li></ol><p><strong>7 security passes</strong></p><ol><li><p>Timing-safe auth</p></li><li><p>Sanctions screening</p></li><li><p>SSRF protection</p></li><li><p>RBAC for financial operations</p></li><li><p>Block confirmation enforcement</p></li><li><p>TOCTOU protections</p></li><li><p>Atomic verification guarantees</p></li></ol><hr><h1>Developer Experience</h1><p>• Full OpenAPI 3.0.3 spec <a href="https://api.usecoal.xyz/api/docs/ui">https://api.usecoal.xyz/api/docs/ui</a></p><p>• Public docs <a href="https://usecoal.xyz/docs">https://usecoal.xyz/docs</a></p><p>Covers:</p><ol><li><p>Architecture</p></li><li><p>0G integrations</p></li><li><p>Examples<br></p></li></ol><p>Runnable example apps</p><ol><li><p>coal-react-checkout</p></li><li><p>coal-agent</p></li><li><p>coal-mcp-server</p></li><li><p>coal-oracle-agent</p></li><li><p>demo-store<br></p></li></ol><p>React SDK shipped on npm as coal-react v0.4.1</p><p>MCP server with 13 tools listed on Smithery and the official MCP Registry</p><hr><h1>Traction</h1><p><strong>Distribution</strong></p><ul><li><p>Smithery directory — listed and indexed</p></li><li><p>Official MCP Registry — listed and indexed</p></li><li><p>npm: coal-react v0.4.1</p></li><li><p>Docs site live at <a href="http://usecoal.xyz/docs">usecoal.xyz/docs</a><br></p></li></ul><p><strong>Engagement Beyond Code</strong></p><ul><li><p>Walkthrough articles for builders + merchants</p></li><li><p>Small bounty program — developers building things on top of Coal</p></li><li><p>Test users running real flows on the agent sandbox</p></li><li><p>Daily replies + DMs across X, LinkedIn, Farcaster, Reddit, Discord, Telegram<br></p></li></ul><p><strong>Inbound Signal</strong></p><p>"x402 + APP wire compat actually working is a real one — not many builders go through both envelopes… happy to point the mapper crawler at <a href="http://agent.usecoal.xyz">agent.usecoal.xyz</a> for endpoint stability data showing up in our public catalog."</p><p>—<strong> CDP-verified Coinbase Developer Platform builder</strong></p><p>Past Credibility</p><p>🥇 1st Place — MNEE Hackathon (Best Commerce &amp; Creator Tooling) — Devpost (<a href="https://devpost.com/software/coal-programmable-commerce">https://devpost.com/software/coal-programmable-commerce</a>)<br></p><p>Coal has now evolved into full-stack commerce infrastructure for the agent economy through the 0G APAC Hackathon.<br></p><p><strong>Live Proof Anyone Can Check Right Now</strong></p><hr>

Tech Stack

Next
React
Solidity
Ethers
Web3
Node

Fundraising Status

<h2><strong>Funding &amp; Outlook</strong></h2><p>Coal is currently <strong>self-funded</strong>.</p><ul><li><p>No venture capital raised</p></li><li><p>Funded through prize winnings from the <strong>MNEE Hackathon</strong></p><ul><li><p>🥇 1st Place - <em>Best Commerce &amp; Creator Tooling</em></p></li></ul></li></ul><hr><h2><strong>Partnerships &amp; Opportunities</strong></h2><p>Open to conversations with:</p><ul><li><p>Ecosystem funds</p></li><li><p>Grant programs</p></li><li><p>Strategic partners</p></li></ul><p>Specifically those aligned with:</p><ul><li><p>Agent economy infrastructure</p></li><li><p>On-chain commerce</p></li><li><p>AI × crypto integrations</p></li></ul><hr><h2><strong>Go-To-Market Direction</strong></h2><p>The 0G APAC Hackathon submission serves as the <strong>foundation for public launch</strong>.</p><p>Focus:</p><ul><li><p>Crypto-native merchants</p></li><li><p>Developers building agent-driven applications</p></li></ul><p>Core value:</p><ul><li><p>A single payment infrastructure that works for:</p><ul><li><p>Humans</p></li><li><p>Autonomous AI agents</p></li></ul></li><li><p>Both operating on the <strong>same rails</strong></p></li></ul>

Sector
AIDeFiInfra

Builders Also Viewed