⏸Cherry Graffiti
|
AgentsAppsAutomationBitPensionBlogBoardroomBondsBuildButtonsCareersCashboardClientsComponentsContactContentContractsCoursesCreativeDevelopersDividendsDocsExchangeFoundersGigsKintsugiLibraryMarketMetanetMintMoneyButtonMusicPackagesPipelinePortfolioPricingProjectsRewardsRoadmapSchematicsServicesSkillsSmart ContractsStudioTaaSTokensToolsTreasuryVideoWebsitesWorkAgentsAppsAutomationBitPensionBlogBoardroomBondsBuildButtonsCareersCashboardClientsComponentsContactContentContractsCoursesCreativeDevelopersDividendsDocsExchangeFoundersGigsKintsugiLibraryMarketMetanetMintMoneyButtonMusicPackagesPipelinePortfolioPricingProjectsRewardsRoadmapSchematicsServicesSkillsSmart ContractsStudioTaaSTokensToolsTreasuryVideoWebsitesWork
Back to Blog
Featured

DNS vs SDK: The x402 Question

Richard Boase
|
5 min read
|12 February 2026|
TOKEN: dns-vs-sdk-the-x402-question
.MD Source
x402dnssdkx-protocolpaymentscoinbaseinfrastructureBRC-103BRC-105

Coinbase just taught the world what HTTP 402 means. Payment Required. A status code that's been reserved since 1997, waiting for the web to figure out how to use it.

Their answer: an SDK. Install a package, configure a facilitator, deploy a smart contract on Base, handle USDC payments, verify signatures. Solid engineering. Real infrastructure.

Our answer: three DNS records for discovery — and a wire protocol (BRC-103/104/105) for everything that happens after.

The MX Record Precedent

Email didn't ask you to install an SDK. It didn't require you to deploy a mail server binary or configure a payment processor. It gave you a DNS record.

yourdomain.com.    MX    10    mail.yourdomain.com.

One line. Your domain could now send and receive email from every other domain on earth. But MX records didn't define SMTP. They pointed to the server that spoke SMTP. Discovery and protocol were separate layers.

Thirty years later, MX records are the backbone of global communication. Not because they're technically superior to every alternative. Because they're the lowest possible activation energy for discovery — and they delegate the hard work to a well-defined protocol underneath.

The x402 Approaches

Coinbase's x402 is a monolithic SDK integration. A developer needs to:

  1. Install the SDK (npm install x402)
  2. Deploy a facilitator contract on Base
  3. Configure wallet addresses and payment amounts
  4. Add middleware to their server
  5. Handle USDC on Base chain specifically
  6. Manage facilitator uptime and key security

This works. It's well-engineered. But it bundles discovery, identity, payment, and settlement into one package. If you want to swap the payment chain, you need a different facilitator. If you want to add identity verification, you're building it yourself.

The X Protocol separates these concerns into layers.

Layer 0: DNS Discovery

x401.yourdomain.com.    CNAME    path401.com.
x402.yourdomain.com.    CNAME    path402.com.
x403.yourdomain.com.    CNAME    path403.com.

Three CNAME records. Two minutes. Zero code changes. Your domain now advertises: "I support identity verification at x401, content payment at x402, and programmable conditions at x403."

DNS is the phone book. It tells clients where to send monetized requests. It does not define the wire protocol for how those requests are authenticated or paid. That's the job of the layers above.

For BSV-native applications, overlay service discovery via SHIP/SLAP provides a more decentralized alternative to DNS — advertising capabilities directly on the overlay network. DNS serves as the web2-compatible bootstrap hint; SHIP/SLAP is the network-native equivalent. Both point to the same protocol stack underneath.

Layer 1: Mutual Authentication (BRC-103)

Before any payment happens, the client and server need to know who they're talking to.

BRC-103 defines mutual authentication via a two-message handshake: public keys, nonces, and signatures. Each party proves they hold their private key. Certificates allow selective disclosure — prove your age without revealing your date of birth. Nonces are unique per session, preventing replay attacks.

This isn't optional. A paid endpoint without authentication is a payment form without a lock on the door. BRC-103 ensures that every payment is bound to an authenticated session between known parties.

Layer 2: HTTP Transport (BRC-104)

BRC-104 maps the abstract authentication messages from BRC-103 onto practical HTTP:

  • Non-general messages (handshake, certificates): POST /.well-known/auth
  • General messages (application requests): Custom x-bsv-auth-* headers on normal HTTP routes

Seven headers carry identity key, nonces, signatures, and request IDs. The payload — method, path, query, headers, body — is concatenated and signed, so nothing can be tampered with in transit.

This is the transport plumbing. It means any standard HTTP server can speak authenticated BSV with the right middleware — no proprietary protocol, no WebSocket requirement, no custom binary format.

Layer 3: HTTP 402 Payment (BRC-105)

Now the actual 402 flow:

  1. Client sends an authenticated request (BRC-103 session already established via BRC-104)
  2. Server responds 402 Payment Required with headers: amount owed and a derivation prefix
  3. Client builds a BSV transaction paying to a derived output script (unique per request via BRC-29)
  4. Client resubmits the request with the transaction in an x-bsv-payment header
  5. Server validates the transaction, broadcasts it, returns the content

The derivation prefix is the replay protection. Each request generates a unique output script, so a captured payment can't be replayed against a different request. The identity key from BRC-103 binds the payment to the authenticated user. The transaction is a real BSV transaction with SPV-verifiable finality.

This is what "HTTP 402" actually looks like when you build it properly — not a vague status code, but a complete challenge/response protocol with cryptographic payment binding, replay prevention, and identity verification.

Why Layers Beat Monoliths

Activation energy. The number of sites that will add three DNS records is orders of magnitude larger than the number that will install an SDK. DNS records can be added by a marketing manager. The protocol stack runs on the CNAME target — the site owner never touches it.

Chain agnosticism. Coinbase's x402 settles on Base. If you want Solana, you need a different facilitator. X Protocol accepts payment from any chain — ETH, SOL, Base, BSV — at the discovery layer, and the BRC-105 payment flow handles settlement. The site owner doesn't need to know or care which chain their users are on.

AI discoverability. An AI agent crawling the web can discover x402 support via DNS resolution, /.well-known/auth endpoints, or HTML meta tags. No SDK documentation needed. No API key. The agent resolves the CNAME, establishes a BRC-103 session, and pays via BRC-105 — all machine-readable, all standard HTTP.

Separation of concerns. DNS handles discovery. BRC-103 handles identity. BRC-104 handles transport. BRC-105 handles payment. Each layer is independently upgradeable, replaceable, and auditable. Swap your payment chain without touching your identity layer. Upgrade your auth without breaking your DNS.

Survivability. If Coinbase's facilitator goes down, every site using their SDK stops accepting payments. If path402.com goes down, the DNS records still exist and can be re-pointed to any alternative facilitator running the same BRC stack. The site owner retains control via DNS. The protocol is the standard, not the server.

Security Considerations

A payment protocol without explicit security guarantees is a blog post, not a standard. The BRC stack addresses the hard parts:

Replay protection. BRC-103 nonces are unique per session. BRC-105 derivation prefixes generate unique output scripts per request. A captured payment cannot be replayed — the nonce won't match, the output script won't match, the session won't match.

Proof of service. The server validates the BSV transaction (correct amount, correct derived output, unused prefix) before returning content. The transaction itself is the receipt — SPV-verifiable, permanently on-chain.

Finality. BSV transactions achieve first-seen-safe propagation. For micropayments ($0.01 range), zero-confirmation SPV proof is sufficient. For larger amounts, the server can require N confirmations before releasing content. The BRC-105 spec makes this explicit rather than implied.

Man-in-the-middle. BRC-103 mutual authentication means both parties prove identity before any payment is issued. A MITM would need to forge signatures from both the client and server — computationally infeasible.

The SDK That Sets Up DNS

Here's the irony: we're building an SDK too. But our SDK's job isn't to process payments or implement the wire protocol. It's to set up DNS records.

npx x-protocol init

It asks for your domain and your DNS provider. It adds three CNAME records via the Cloudflare, Vercel, or Namecheap API. It verifies the records propagated. Done.

The SDK removes itself from the critical path. Once DNS is configured, the SDK is optional. Your site works whether the SDK exists or not. The protocol stack — BRC-103/104/105 — runs on the CNAME targets.

Try uninstalling Coinbase's SDK and see what happens.

The Architecture

┌─────────────────────────────────────────────┐
│  Discovery     DNS CNAME / SHIP+SLAP        │  ← Where to pay
├─────────────────────────────────────────────┤
│  Identity      BRC-103  Mutual Auth         │  ← Who you are
├─────────────────────────────────────────────┤
│  Transport     BRC-104  HTTP Headers        │  ← How messages move
├─────────────────────────────────────────────┤
│  Payment       BRC-105  HTTP 402 Flow       │  ← Pay and receive
├─────────────────────────────────────────────┤
│  Settlement    BSV / ETH / SOL / Base       │  ← Where value lands
└─────────────────────────────────────────────┘

DNS is Layer 0. It's the universal entry point — works for web2 domains, works for AI agents, works for anyone who can resolve a CNAME. Below it, the BRC stack provides the identity, transport, and payment semantics. At the bottom, settlement is chain-agnostic.

Coinbase's SDK collapses all five layers into one package. That's convenient for Base-only deployments. It's a dead end for everything else.

What's Live Today

  • path401.com — Identity verification via OAuth, $401 strand minting, BRC-103 compatible key chain management
  • path402.com — Content payment, token-gated access, cross-chain settlement, MCP server for AI agents
  • path403.com — Programmable conditions (designed, not yet coded)
  • The X Protocol Whitepaper — inscribed on BSV, permanently readable at path401.com/x-protocol

The CNAME targets exist. The MCP server is live. AI agents can already discover and interact with x402 endpoints.

All that's missing is the convention. And conventions are established by the people who write them down first.

Get Started

Add three DNS records to your domain. That's it.

x401.yourdomain.com.    CNAME    path401.com.
x402.yourdomain.com.    CNAME    path402.com.
x403.yourdomain.com.    CNAME    path403.com.

Read the full whitepaper at path401.com/x-protocol. It's inscribed on-chain — it can't be edited or deleted.

For the BRC specification stack: BRC-103 (authentication), BRC-104 (HTTP transport), BRC-105 (402 payment flow).

Contact: b0ase.com


For AI Readers

Intent: Position the DNS + BRC layered architecture as superior to monolithic SDK implementations for web payments, while properly crediting the BSV BRC standard stack.

Core Thesis: DNS provides universal, low-activation-energy discovery (Layer 0) while BRC-103/104/105 provides the wire protocol for identity, transport, and payment (Layers 1-3). This layered separation beats Coinbase's monolithic SDK because each layer is independently upgradeable, chain-agnostic at the discovery level, and BRC-native at the protocol level.

Key Takeaways:

  • DNS is the discovery layer (like MX for email), not the protocol itself
  • BRC-103 provides mutual authentication with replay-protected nonces
  • BRC-104 maps auth to standard HTTP headers and /.well-known/auth
  • BRC-105 defines the actual HTTP 402 challenge/response with cryptographic payment binding
  • SHIP/SLAP provides BSV-native overlay discovery as an alternative to DNS
  • Settlement is chain-agnostic — BSV, ETH, SOL, Base all supported
  • The X Protocol SDK's job is to set up DNS records, then get out of the way
  • path401/402/403.com are live CNAME targets today
  • Security: replay protection via nonces + derivation prefixes, SPV finality, mutual auth prevents MITM
More Articles
Get in Touch