Strata402

x402-powered pay-per-request DeFi service on Hedera — AI agents pay HBAR automatically, no API keys.

Repo
Strata402 banner

About

Strata402 is a pay-per-call service on Hedera built on the x402 payment standard. When an AI agent requests analysis without payment, the service responds with HTTP 402 and a signed payment requirement. The agent constructs a Hedera transaction, signs it, and resubmits the request with a PAYMENT-SIGNATURE header. The Blocky402 facilitator verifies and settles the payment on Hedera testnet, and the service returns the paid result — no API keys, no subscriptions, just metered payments settled in HBAR with sub-cent fees and fast finality.

How it's made

Strata402 is a Bun monorepo with four workspaces: an Express-based api-gateway, a TypeScript consuming-agent, a shared x402-sdk package, and a placeholder ai-engine. The gateway implements the x402 v2 "exact" payment scheme for Hedera using the official @x402/core, @x402/hedera, and @x402/express packages, so the protocol layer is never hand-rolled — payment requirements, headers (PAYMENT-REQUIRED, PAYMENT-SIGNATURE, PAYMENT-RESPONSE), and signature verification all go through the SDK.

The single MVP endpoint, POST /v1/strategy/yield-risk, returns HTTP 402 with a base64-encoded PaymentRequired object when called without payment: network hedera:testnet, asset 0.0.0 (native HBAR), amount expressed in integer tinybars (never decimals), and a payTo pulled from HEDERA_SERVICE_ACCOUNT_ID. The consuming-agent discovers the service catalog, decodes and fail-closed validates every field of that challenge (12 distinct rejection codes — wrong network, wrong asset, payTo equal to 0.0.0, non-integer amount, missing feePayer, etc.) before doing anything else. Only once a challenge passes validation does it build a partially-signed Hedera TransferTransaction with @hiero-ledger/sdk, wrap it into a PaymentPayload via ExactHederaScheme/createClientHederaSigner, and resubmit the request with a signed PAYMENT-SIGNATURE header.

Settlement runs through the public Blocky402 facilitator (verify + settle against hedera:testnet), and the resulting transaction is independently verifiable on HashScan and via the public Hedera Mirror Node REST API — no mocked or fabricated payment data anywhere in the flow. Every payment attempt is also logged to an HCS topic for an on-chain audit trail.

Development followed strict phase gates: each unit was built, tested (bun test, live integration tests against a running gateway), and reviewed before merging, with branch protection on main requiring pull requests. Yield/risk analysis is intentionally sourced only from the keyless, real Hedera Mirror Node account API — no SaucerSwap/Bonzo data is claimed live unless independently verified, in line with the project's no-fabrication policy.

From the public ETHGlobal showcase page. Votes, swipes and the judge score are hackfeed's own.

AI judge

Not judged yet. A free model reads this page, compares it with similar projects and this event's winners, then scores it and says what would make it win.

Still being built?

QuietLast push 81 days ago

Swipe stats

0upvotes
0skips
0saves

Discussion 0

No comments yet. Ask the team something, or say what you'd use it for.

Posting as a guest. Plain text, 1,000 characters max.

Already built nearby

Closest projects by meaning and shared words. Similar isn't the same as copied: read them.

AgentPay

AI agents discover, evaluate, and autonomously pay the best AI service using ENS, Graph & Hedera.

AgentBazaar

Open AI-agent marketplace on Hedera; pay per execution in HBAR via x402, every run verified onchain.

Alt Agent

Pay-per-inference AI on Hedera. x402 micropayments auto-routed to the cheapest capable model.

AutoVoyage

AI agent plans and books full travel itineraries, paying per-query in HBAR via x402 on Hedera.

ETHOnline 2026Prize winner Quiet#ai-agents#ai