Skip to content

Overview

What is x402 RPC Proxy?

x402 RPC Proxy is a production-grade, Web3-native RPC gateway and two-sided marketplace that provides secure, metered, and monetizable access to blockchain infrastructure.

At its core, x402 solves a fundamental gap in the Web3 ecosystem: there is no standardized, enforceable economic model for RPC access. Public endpoints are rate-limited and unreliable. Private endpoints have no built-in payment layer. Providers have no mechanism to monetize infrastructure fairly. x402 addresses all of these at the protocol level.

x402 acts as a unified intermediary layer between API consumers (developers, applications, autonomous agents) and RPC providers (infrastructure operators, node services). It enforces authentication, metering, and payment before any request reaches an upstream node — making RPC access programmable, auditable, and economically sovereign.


The x402 Protocol

The name "x402" references HTTP 402 Payment Required — a status code reserved since 1991 for future use in micropayment systems. x402 fulfills this vision for blockchain infrastructure:

  • When a client has insufficient credits, the gateway returns 402 Payment Required with structured payment metadata
  • The client resolves the payment on-chain
  • Credits are issued and the request proceeds

This creates a machine-readable, protocol-native payment enforcement mechanism compatible with both human-operated clients and autonomous AI agents.


Platform Architecture at a Glance

x402 operates as a four-layer system:

┌─────────────────────────────────────────────┐
│              Client Layer                   │
│  Apps · Backends · AI Agents · Wallets      │
└─────────────────────┬───────────────────────┘
                      │ JSON-RPC 2.0 / REST
┌─────────────────────▼───────────────────────┐
│            Gateway Layer (x402)             │
│  Auth · Credit Check · Routing · Metering   │
└──────┬────────────────────────┬─────────────┘
       │                        │
┌──────▼──────┐        ┌────────▼────────────┐
│  Payment &  │        │   RPC Provider      │
│  Credit     │        │   Layer             │
│  Layer      │        │   EVM · Cosmos ·    │
│             │        │   Solana (planned)  │
└─────────────┘        └─────────────────────┘

Every request follows a deterministic lifecycle:

  1. Client sends a JSON-RPC 2.0 request to /mcp
  2. Gateway validates the JWT (wallet-issued session token)
  3. Credit balance is checked for the authenticated address
  4. If insufficient → 402 Payment Required is returned with plan metadata
  5. If sufficient → credits are atomically deducted
  6. Request is routed to the appropriate RPC provider
  7. Response is returned transparently to the client

See the Architecture guide for a full breakdown of each layer.


Who Uses x402?

RPC Consumers

Developers, application backends, and autonomous agents that require reliable blockchain access:

  • Access all supported chains through a single unified endpoint (/mcp)
  • Authenticate using wallet-native standards — no API keys or passwords
  • Pay on-chain and receive credits; spend credits per request
  • Benefit from automatic failover across multiple providers
  • Monitor usage, credit balance, and payment history via dashboard

Typical consumer profiles:

ProfileUse Case
dApp BackendContract reads/writes with predictable cost
Indexing ServiceHigh-volume eth_getLogs and historical queries
AI AgentAutonomous blockchain queries with built-in payment resolution
Internal ToolingEnterprise teams with controlled spend per wallet

RPC Providers

Infrastructure operators publishing RPC endpoints to the marketplace:

  • Register and manage multi-chain RPC endpoints across protocols (JSON-RPC, REST, gRPC, WebSocket)
  • Serve EVM, Cosmos, and Solana (planned) traffic through a standardized interface
  • Earn revenue proportional to verified request volume
  • Participate in the marketplace without managing billing, auth, or metering directly

Note

Pricing plans are defined and managed by the platform to ensure consistency and fairness across providers.


Supported Chains & Protocols

Blockchain Ecosystems

EcosystemAuth StandardStatus
EVM (Ethereum, Polygon, Arbitrum, Base, ...)SIWE — Sign-In with EthereumAvailable
Cosmos (Cosmos Hub, Osmosis, ...)SIWC — Sign-In with CosmosAvailable
SolanaSIWS — Sign-In with SolanaComing Soon

Transport Protocols

ProtocolUse Case
JSON-RPCStandard EVM and Cosmos RPC calls
RESTREST-based chain APIs (e.g., Cosmos LCD)
gRPCHigh-performance binary transport
WebSocketSubscriptions and streaming event feeds

Authentication Model

x402 uses wallet-native authentication — no usernames, passwords, or API keys. Identity is proven cryptographically at the session level.

How It Works

  1. Client requests a one-time nonce tied to their wallet address
  2. Wallet signs a structured message (EIP-4361 for Ethereum, equivalent for Cosmos)
  3. Gateway verifies the signature on-chain and issues a JWT access token
  4. All subsequent requests carry the JWT in the Authorization header
  5. Tokens expire after 1 hour; refresh tokens enable seamless re-authentication

Supported Standards

StandardDescription
SIWESign-In with Ethereum (EIP-4361)
SIWCSign-In with Cosmos (ADR-036 equivalent)
SIWSSign-In with Solana (planned)

See the Authentication guide for the full flow, token management, and error handling.


Payment & Credit Model

x402 introduces a credit-based metering system backed by verifiable on-chain payments.

Credit Tiers by Method Type

Method CategoryExamplesCredits
Standard readseth_blockNumber, eth_getBalance1
Historical querieseth_getLogs, eth_getStorageAt5
Write operationseth_sendRawTransaction10

Pricing Plans

PlanAssetAmountCreditsCost per Credit
StarterUSDC$1010,000$0.001
ProUSDC$5060,000$0.00083
EnterpriseCustomCustomCustomNegotiated

Credits are non-expiring and tied to the wallet address across chains.

See the Payments guide for the full payment flow and API reference.


Security Model

LayerMechanism
IdentityWallet signature verification (no shared secrets)
SessionShort-lived JWT with cryptographic signing
RequestCredit check enforced before any upstream call
PaymentOn-chain transaction verification (not self-reported)
Abuse preventionCredit exhaustion triggers hard stop, not soft degradation
Token hygieneSingle-use refresh tokens; full revocation on logout

Key properties:

  • Non-custodial — x402 never holds private keys or manages wallets
  • Verifiable — all payment claims are verified against on-chain state
  • Deterministic — credits are deducted atomically before request execution
  • Auditable — full payment and usage history is queryable via API

Reliability & Failover

  • Multi-provider routing — each chain can have multiple registered providers
  • Automatic failover — on provider failure, traffic is rerouted seamlessly
  • Retry policies — configurable retry behavior per provider
  • Stateless gateway — horizontal scaling with no shared state beyond session tokens

Rate Limits

Requests are governed by credits rather than traditional rate limits. Soft connection limits apply per tier:

TierMax Requests/sec
Standard50
Pro200
EnterpriseUnlimited

Design Principles

PrincipleDescription
Marketplace-firstTwo-sided platform connecting providers and consumers
Protocol-nativeBuilt on open standards: JSON-RPC 2.0, SIWx, HTTP 402
Chain-agnosticConsistent interface and economics across ecosystems
Economic sovereigntyConsumers pay on-chain; no intermediary custody
Deterministic meteringCredits enforced atomically — no ambiguous billing
Enterprise-readyScalable, observable, extensible, and auditable

Value Proposition

For Consumers

  • Unified access to all supported chains through one endpoint and credential
  • Pay-as-you-go model with on-chain, verifiable payments
  • No vendor lock-in — wallet-based identity works across any client
  • Works for agents — HTTP 402 is machine-readable; autonomous systems can self-fund and resume

For Providers

  • Monetization without complexity — no billing infrastructure to build or maintain
  • Revenue tied to actual usage — no flat-rate commitments
  • Protocol-level enforcement — the gateway handles all payment and auth

For the Ecosystem

  • Standardized economic layer for metered RPC access
  • Foundation for autonomous Web3 agents that pay their own way

Getting Started

StepGuide
1. Authenticate with your walletAuthentication
2. Purchase credits on-chainPayments
3. Send your first RPC requestQuickstart
4. Explore all available methodsMCP Endpoint
5. Understand system internalsArchitecture

x402 establishes a foundational economic infrastructure layer for the next generation of multi-chain, pay-per-use applications — and the autonomous agents that will operate them.

Built on open standards — JSON-RPC 2.0, HTTP 402, SIWx.