Routing payments across rails · testnet onlySubEtha ↗
SubEtha Router

Your wallet speaks one rail.
The API speaks another.

An API can be perfectly good and still be unreachable — not because of the data, but because it settles on a rail your wallet does not hold. The Router takes a payment on one rail and pays the provider on another. Two legs, two separate funds. No swap, no bridge.

Hackathon-stage implementation on testnet. Unaudited, not production. Both legs settle for real on chain today, and the Router is reachable as a hosted MCP endpoint.

2 rails / 1 requestLIVE PROVIDERS
X402provider-x402
Base Sepolia · USDC
10000
MPPprovider-mpp
Tempo Moderato · pathUSD
10000
Reading the 402 offer is free and open to anyone. Paying needs testnet funds on that rail.
01 / Why

The barrier is the rail,
not the data.

Paid APIs are converging on pricing per call over HTTP 402. How you pay has not converged: x402 exact on one chain, MPP tempo charge on another, each with its own asset.

Without a router

Hold the wrong asset and the endpoint is closed.

You need the exact asset, on the exact chain, that each provider demands. Two providers, two rails, two funded wallets — before you read a single byte.

With the router

Pay once, on the rail you already hold.

The Router pays the provider on theirs, from its own prefunded balance, and hands back the provider's response unchanged.

The mismatch, concretely

Same request.
Two incompatible answers.

  • Both providers price the same shape of request: one call, 10000 base units.
  • Neither will accept the other's asset, and neither runs on the other's chain.
  • Holding one of these does not get you the other, so an agent funded for x402 simply cannot read the MPP provider.
What each provider demands

x402 exact
network eip155:84532 (Base Sepolia)
asset USDC
amount 10000

MPP tempo charge
chainId 42431 (Tempo Moderato)
currency pathUSD
amount 10000

Same price. No common rail.
02 / Try it

Two providers are live.
Check them yourself.

Self-hosted market-data providers we run. You need no wallet, no account and no permission from us to see the payment contract — an unauthenticated request returns the whole offer in the open.

Live · x402 exact

ETH perpetual snapshot

Hyperliquid mark price and 24h change. Base Sepolia · USDC · 10000 base units.

# the 402 offer, no payment involved
curl -si https://provider-x402.subethalabs.com/v1/eth/snapshot \
  | grep -i payment-required
Live · MPP tempo charge

Uniswap v3 spot reference

USDC/WETH pool reference price. Tempo Moderato (42431) · pathUSD · 10000 base units.

# the 402 challenge, no payment involved
curl -si https://provider-mpp.subethalabs.com/v1/eth/snapshot \
  | grep -i www-authenticate

Both answer GET /v1/eth/snapshot and publish /health and /manifest. Payment is testnet; the market data is a read-only mainnet reference and is not an executable quote. Neither provider is operated by Hyperliquid or Uniswap.

03 / How it works

Two payments,
deliberately unlinked.

The Router converts nothing. It takes a payment on the inbound rail and makes a separate payment on the outbound rail, each prefunded on its own chain. Calling it a swap or a bridge would be wrong.

01 · QUOTE

Read the real offer

The Router reads the provider's live offer before quoting, so the price you approve is bound to the offer that will actually be paid.

02 · APPROVE

Explicit, bound approval

Nothing moves on a conversational turn alone. Approval is bound to one quote, and an offer that changes after approval is refused.

03 · PAY IN

Your rail, your asset

The inbound leg settles on the rail you already hold, against the Router's own address on that chain.

04 · PAY OUT

The provider's rail

A separate payment, from the Router's prefunded balance on the provider's chain. The two legs are never exchanged for one another.

05 · RECORD

At most once

A durable journal records each purchase. Repeat or concurrent requests re-send neither leg, and an uncertain outcome stays uncertain rather than retrying blindly.

04 / Scope

What runs today.

Stated narrowly on purpose, so the parts that are still being built are not mistaken for the parts that work.

Live

Two providers, publicly reachable

Both serve their 402 over HTTPS and can be inspected by anyone, without a wallet.

verified
Live

Real testnet settlement on both rails

x402 exact on Base Sepolia and MPP tempo charge on Tempo Moderato, each settled end to end against the live providers.

verified
Live

Router paying a provider

The outbound leg — the Router paying a provider on the provider's own rail — settles for real.

verified
Live

Paying the Router over x402

The inbound leg settles on chain with real funds: a caller holding only Base Sepolia USDC reaches a provider that only takes MPP. Both legs are recorded, on two different networks.

verified
Live

MCP access for agents

Discover, quote, approve and pay through the Router, over local stdio or the hosted HTTP endpoint. Both have settled real payments.

verified
Live

A hosted endpoint

One line of setup, with nothing to clone and no key to place. The Router never holds the caller's key — you sign locally and it receives only the signed credential.

verified
In progress

The SubEtha inbound leg

Paying the Router through SubEtha's own private rail, rather than x402. This one still runs against a synthetic counterparty, so the privacy claim is not yet settled on chain the way the x402 leg is.

building

Finality (deciding when a payment is canonical) is not implemented, and the existing chat UI has not been verified against this end to end. Both are listed here rather than left for you to discover.

05 / Use it

Point an agent at it.
One line.

The Router runs as an MCP server you can register with Claude Code. Nothing to clone, no install, and no key to place anywhere — you sign each payment locally and the Router receives only the signed credential.

What you need

About one cent, and no gas.

  • Base Sepolia USDC — 10000 base units ($0.01) per call. A few calls' worth is plenty.
  • No gas. The x402 EIP-3009 path has the facilitator submit the transaction and pay for it.
  • Discovery and quoting are free. Only purchase costs anything.

The Router holds no key of yours. Its source reads no private key, from the environment or anywhere else, so a hosted Router cannot spend a caller's funds.

Register the hosted Router

claude mcp add --transport http \
subetha-router \
https://router.subethalabs.com/mcp

Then, from the agent

1. subetha_router_quote
→ what you will pay, with decimals
2. subetha_router_purchase
→ the quote + your signed credential
3. subetha_router_status
→ the real tx for both legs

Two things worth knowing before you try it.

Leave a few seconds between payments. The public x402 facilitator collides with its own pending transactions when calls arrive back to back — measured at 2 failures in 20 with no gap, and 0 in 15 with a three second gap.

You may see paid_data_unavailable. That means the payment went through but fetching the data did not, so the funds did move. The Router does not retry on its own, because a blind retry is how you pay twice. Retrying the call works. Our own production check hit this on the first attempt and succeeded on the second.

06 / FAQ

The short answers.

Is this a swap or a bridge?+

No. Nothing is converted and nothing crosses a chain. The Router receives a payment on one rail and makes a separate, independently funded payment on the other. The two legs are never exchanged for one another, which is why the balances on each chain have to be prefunded.

What actually settles for real today?+

Both legs. A caller paying over x402 on Base Sepolia reaches a provider that only accepts MPP on Tempo, and both payments are recorded on their own chains. What is still synthetic is the SubEtha inbound rail specifically — paying the Router privately, through SubEtha rather than x402 — so that part of the privacy story is not yet settled on chain.

Does the Router hold my key?+

No. You sign each payment locally and the Router receives only the signed credential. Its source reads no private key, from the environment or anywhere else, so the hosted Router cannot spend a caller's funds even though it settles their payments.

Do I need a wallet to check the providers?+

Not to read the offer. An unauthenticated GET returns the entire 402 challenge — price, asset, chain, recipient — and that is what the buttons above fetch live. You only need testnet funds on the matching rail if you want to actually pay and receive the data.

Can the Router spend without my approval?+

Approval is bound to one specific quote. A conversational turn alone moves nothing, and if the provider's offer changes between quoting and paying, the purchase is refused rather than paid at the new terms.

What happens if a request is retried?+

A durable journal records each purchase, so repeat or concurrent requests re-send neither leg. An outcome that cannot be confirmed is kept as uncertain rather than retried blindly, since a blind retry is how you pay twice.

Is this production software?+

No. It is a hackathon-stage implementation on testnet, unaudited, and not operated as a service. The market data the providers return is a read-only mainnet reference and is not an executable quote.

07 / Context

Why we ended up
building this.

We were building SubEtha — private machine payments for x402, settled on zERC20 — and kept hitting the same wall from the other side: a payment method is only as useful as the set of APIs that accept it. Routing is what makes a rail worth holding. The privacy work and this are the same problem approached from two ends.

決済レールをまたぐルーティング · testnet 限定SubEtha ↗
SubEtha Router

手元のレールと、
APIのレールが噛み合わない。

APIの品質に問題がなくても、決済レールが手持ちと違うだけで到達できません。Routerはあるレールで支払いを受け取り、別のレールでプロバイダに支払います。2つのレグは独立した支払いで、交換もブリッジもしません。

ハッカソン段階の実装です。未監査・テストネット限定・非本番。両レグとも実決済がオンチェーンで成立しており、ホスト済みMCPエンドポイントから利用できます。

2 rails / 1 requestLIVE PROVIDERS
X402provider-x402
Base Sepolia · USDC
10000
MPPprovider-mpp
Tempo Moderato · pathUSD
10000
402の提示は無料で誰でも確認できます。支払いには該当レールのテストネット資金が要ります。
01 / 背景

障壁はデータではなく、
レール。

有料APIは HTTP 402 で1回ごとに課金する形に収束しつつあります。収束していないのは支払い方法です。あるチェーンでは x402 exact、別のチェーンでは MPP tempo charge、資産もそれぞれ違います。

Routerがない場合

手持ちが違えば、APIは閉じている。

プロバイダごとに、要求されるチェーンの、要求される資産が要ります。プロバイダが2つならレールも2つ、資金を入れたウォレットも2つ。データを1バイト読む前の話です。

Routerがある場合

手持ちのレールで、1回払うだけ。

Routerが自分の事前資金でプロバイダ側のレールに支払い、プロバイダの応答をそのまま返します。

具体的な不一致

同じリクエスト。
噛み合わない2つの答え。

  • どちらのプロバイダも、同じ形のリクエストに同じ 10000 base units を提示します。
  • しかし互いの資産は受け付けず、互いのチェーン上にも存在しません。
  • 一方を持っていても他方にはならないため、x402 用に資金を入れたエージェントは MPP のプロバイダを読めません。
各プロバイダの要求

x402 exact
network eip155:84532 (Base Sepolia)
asset USDC
amount 10000

MPP tempo charge
chainId 42431 (Tempo Moderato)
currency pathUSD
amount 10000

同じ金額。共通のレールなし。
02 / 試す

2つのプロバイダが公開中。
ご自身で確認できます。

当方が自前でホストしているマーケットデータ提供元です。ウォレットもアカウントも許可も不要——認証なしのリクエストで、支払い条件がそのまま返ります。

Live · x402 exact

ETH 無期限先物スナップショット

Hyperliquid の mark price と24時間変化。Base Sepolia · USDC · 10000 base units。

# 402の提示内容。支払いは発生しません
curl -si https://provider-x402.subethalabs.com/v1/eth/snapshot \
  | grep -i payment-required
Live · MPP tempo charge

Uniswap v3 スポット参照値

USDC/WETH プールの参照価格。Tempo Moderato (42431) · pathUSD · 10000 base units。

# 402チャレンジ。支払いは発生しません
curl -si https://provider-mpp.subethalabs.com/v1/eth/snapshot \
  | grep -i www-authenticate

どちらも GET /v1/eth/snapshot で応答し、/health と /manifest を公開しています。決済はテストネット、市場データはメインネットの読み取り専用の参照値で、約定可能な気配値ではありません。Hyperliquid・Uniswap が運営するものでもありません。

03 / 仕組み

2つの支払いは、
意図的に切り離す。

Routerは資産を変換しません。受信レールで支払いを受け取り、送信レールで別の支払いを行います。各レールはそれぞれのチェーンで事前に資金供給されており、交換やブリッジと説明するのは誤りです。

01 · QUOTE

実提示を読む

見積もりの前にプロバイダの実提示を読むため、承認する金額は実際に支払われる提示に束縛されます。

02 · APPROVE

明示的な承認

会話のやり取りだけでは何も動きません。承認は1つの見積もりに束縛され、承認後に提示が変われば拒否します。

03 · PAY IN

手元のレールで払う

受信レグは、あなたが既に持っているレール上で、そのチェーンにあるRouterのアドレスに対して成立します。

04 · PAY OUT

プロバイダのレールへ

プロバイダ側チェーンにあるRouterの事前資金からの、別個の支払いです。2つのレグが互いに交換されることはありません。

05 · RECORD

多くとも1回

各購入は耐久的な journal に記録されます。再送・並行要求でもどちらのレグも再実行されず、結果が不確かな場合は不確かなまま保持します。

04 / 現在地

いま動いているもの。

構築中の部分が、動いている部分と混同されないよう、意図的に狭く記載しています。

動作

2つのプロバイダを公開

どちらも HTTPS で402を返し、ウォレットなしで誰でも検証できます。

検証済み
動作

両レールの実テストネット決済

Base Sepolia の x402 exact と Tempo Moderato の MPP tempo charge を、公開プロバイダに対して端から端まで通しています。

検証済み
動作

Routerからプロバイダへの支払い

送信レグ——Routerがプロバイダ側のレールで支払う部分——は実決済が成立しています。

検証済み
動作

x402でRouterに支払う(受信レグ)

受信レグが実資金でオンチェーン成立します。Base Sepolia の USDC しか持たない呼び出し側が、MPPしか受け付けないプロバイダに到達できます。両レグとも別々のネットワーク上に記録が残ります。

検証済み
動作

エージェント向けMCP

Router経由での発見・見積・承認・支払い。ローカルのstdioと、ホスト版のHTTPの両方で実決済が成立しています。

検証済み
動作

ホスト済みエンドポイント

セットアップは1行。cloneも鍵の事前配置も不要です。Routerは呼び出し側の鍵を持たず、署名は手元で作られ、サーバには署名済みのcredentialだけが届きます。

検証済み
構築中

SubEthaの受信レグ

x402ではなく、SubEtha自身の秘匿レールでRouterに支払う部分です。ここは依然として合成の相手に対して動作するため、秘匿性の主張はx402レグのようにはオンチェーンで成立していません。

実装中

finality(どの時点で決済を確定とみなすか)は未実装で、既存のchat UIとの端から端までの検証も行っていません。後から気づくより先に書いておきます。

05 / 使う

エージェントから、
1行で。

RouterはMCPサーバとして動いており、Claude Codeに登録できます。cloneもインストールも、鍵をどこかに置く必要もありません。支払いごとの署名は手元で作られ、Routerには署名済みのcredentialだけが届きます。

必要なもの

1セント程度。ガスは不要。

  • Base Sepolia の USDC — 1回 10000 base units($0.01)。数回分あれば足ります。
  • ガスは不要です。 x402 の EIP-3009 経路では facilitator が送信し、gas を負担します。
  • 発見と見積は無料です。費用がかかるのは purchase だけです。

Routerは利用者の鍵を持ちません。ソースは環境変数を含めどこからも秘密鍵を読まないため、ホスト版のRouterが呼び出し側の資金を動かすことはできません。

ホスト版Routerを登録する

claude mcp add --transport http \
subetha-router \
https://router.subethalabs.com/mcp

エージェントからの呼び出し

1. subetha_router_quote
→ 支払う額(decimals つき)
2. subetha_router_purchase
→ quote と自分で署名した credential
3. subetha_router_status
→ 両レグの実 tx

試す前に知っておくとよいことが2つあります。

決済は数秒空けてください。 公開の x402 facilitator は、連続して呼ぶと自分の保留中トランザクションと衝突します(実測で、間隔なしでは20回中2回失敗、3秒空けると15回中0回)。

paid_data_unavailable が返ることがあります。 支払いは成立したがデータ取得に失敗した状態で、資金は動いています。安易な再送は二重払いにつながるため、Routerは自動では再試行しません。呼び直せば通ります。私たち自身の本番確認でも1回目がこれで、2回目は成功しました。

06 / FAQ

短い回答。

スワップやブリッジですか?+

いいえ。何も変換せず、チェーンを跨ぎもしません。あるレールで支払いを受け取り、別のレールで独立に資金手当てされた支払いを行います。2つのレグが互いに交換されることはなく、だからこそ各チェーン上の残高を事前に用意しておく必要があります。

今、実際に決済が動いているのはどこまで?+

両レグです。Base Sepolia の x402 で支払う呼び出し側が、Tempo の MPP しか受け付けないプロバイダに到達し、それぞれのチェーンに記録が残ります。まだ合成なのは SubEtha の受信レール——x402 ではなく SubEtha 経由で秘匿的にRouterへ支払う部分——であり、秘匿性に関してはその分がまだオンチェーンで成立していません。

Routerは私の鍵を預かりますか?+

いいえ。署名は手元で作られ、Routerには署名済みのcredentialだけが届きます。ソースは環境変数を含めどこからも秘密鍵を読まないため、決済を仲介していても、ホスト版のRouterが呼び出し側の資金を動かすことはできません。

プロバイダを確認するのにウォレットは要りますか?+

提示を読むだけなら不要です。認証なしの GET で402チャレンジ全体——金額・資産・チェーン・受取先——がそのまま返り、上のボタンはそれを実際に取得しています。実際に支払ってデータを受け取る場合のみ、該当レールのテストネット資金が必要です。

承認なしにRouterが支払うことはありますか?+

承認は特定の見積もり1つに束縛されます。会話のやり取りだけでは何も動かず、見積もりから支払いまでの間にプロバイダの提示が変われば、新しい条件で支払うのではなく拒否します。

リクエストが再送された場合は?+

各購入は耐久的な journal に記録されるため、再送・並行要求でもどちらのレグも再実行されません。確認できない結果は不確かなまま保持します。安易な再試行こそが二重払いの原因だからです。

本番運用できますか?+

いいえ。ハッカソン段階のテストネット実装で、未監査、サービスとして運用してもいません。プロバイダが返すマーケットデータは読み取り専用のメインネット参照値であり、執行可能な気配値ではありません。

07 / 背景

なぜこれを
作ることになったか。

私たちは SubEtha——x402 の秘匿マシン決済を zERC20 で精算する仕組み——を作っていて、反対側から同じ壁にぶつかりました。決済手段の有用性は、それを受け付けるAPIの数で決まります。ルーティングは、そのレールを持つ価値を成立させる部分です。秘匿性の取り組みとこれは、同じ問題を両端から見たものです。