HTTP/1.1 402 PAYMENT REQUIRED · x402 + MPP dual-stack 500+ tools · 12 rails · 0% seller fee

Cheapest rail right now

Where should an agent transact this minute? Live gas on Ethereum + every major L2 side by side, Base gas tiers, a fee estimate for your transaction type, and ETH spot to price it all in dollars.

$0.050 per call · one payment for the whole workflow
POST /api/skill/cheapest-rail

4 tools run server-side in one request. You pay once, settle once, and get a single response - no orchestration, no per-step payments, and a partial-success envelope if any step fails. USDC over x402 on any supported chain.

When to use this pack

An agent about to do REAL onchain work - deploy a contract, move funds, batch-settle, mint - wants to pick the chain and the moment. Gas varies 10-100x between Ethereum and its L2s and swings hour to hour; eyeballing four gas trackers is human work. One call returns the cross-chain comparison, the chosen chain's slow/standard/fast tiers, a per-transaction-type estimate, and the ETH price to convert gwei into dollars. (x402 tool payments themselves are gasless - this pack is for everything else an agent does on-chain.)

Tools in this pack

All 4 run inside the single $0.050 call above. Each is also callable on its own if you only need one part.

Workflow

  1. l2-gas-comparison with {networks: ["ethereum", "base", "arbitrum", "optimism", "polygon"]} - one row per chain with current gas. This is the headline: sort ascending and you have the cheapest venue.
  2. gas-snapshot with {network: <the winner>} - slow/standard/fast tiers on the chosen chain. If your action is deferrable, the slow tier is often half the fast tier; note the spread.
  3. gas-estimate for your transaction type on that chain - a simple transfer, an ERC-20 transfer, and a contract deploy differ by an order of magnitude in gas units; this converts 'gwei is low' into 'this action costs N'.
  4. crypto-price with {coins: "ETH", currency: "usd"} - multiply units × price × ETH spot to state the cost in dollars, which is the number a budget check actually wants.
  5. Report: { cheapest: <chain>, comparison: [...], tiers: {...}, estimatedCostUsd, decision: 'act now on <chain>' | 'defer - spread suggests off-peak in a few hours' }.

Call it directly

Any x402 client pays the 402 and gets the whole workflow back in one response:

npx agent402-client call cheapest-rail {"networks":"ethereum,base,arbitrum,optimism,polygon"}

Run it in Claude

claude mcp add agent402 -s user -- npx -y agent402-mcp@latest

Then paste this prompt into Claude:

Find the cheapest chain for an ERC-20 transfer right now using Agent402 (networks: ethereum,base,arbitrum,optimism,polygon): (1) l2-gas-comparison with that network list - sort by gas ascending. (2) gas-snapshot {network: <cheapest>} - read the standard tier. (3) gas-estimate on that network for an ERC-20 transfer. (4) crypto-price {coins: "ETH", currency: "usd"} - express the final cost in USD. Return {cheapest, gasStandard, estimatedCostUsd, comparison}.

← All skill packs