Skip to main content

Protocol

V0 Demo (Completed)

  • Client SDK wrapper and MCP tool
  • NPM package published
  • Refund request encryption (Lit Protocol)
  • Basic refund flow (cancel, replace, approve/reject)

Protocol V2 (Completed)

  • Switched from proxy pattern to escrow scheme (commerce-payments)
  • PaymentOperator with pluggable conditions and recorders
  • Partial refund support (partial void)
  • EscrowPeriod and Freeze contracts
  • Factory pattern with unified CREATE3 deterministic deployment
  • RefundRequestEvidence for on-chain evidence submission
  • Deployed across 11 chains with unified CREATE3 addresses (same address everywhere)

Escrow Scheme Spec (In Progress)

Developer Experience (In Progress)

  • Documentation restructure and accuracy fixes
  • LLM-friendly docs with MCP integration
  • Simple “API Down” arbiter template for first merchants
  • CI/CD pipeline for SDK and contracts

Protocol Extensions (Future)

  • Bond-based disputes
  • Multiple arbiter support per operator
  • Post-escrow arbitration handling
  • Reputation system for clients, merchants, and arbiters
  • Arbiter marketplace
  • Token wrapper for enforced refund protection

SDK

Phase 0: Operator Deployment (Completed)

  • Fixed all SDK ABIs to match contracts
  • Factory deployment helpers (deployMarketplaceOperator)
  • Condition composition (AND/OR/NOT combinators)
  • Deterministic address computation (CREATE2)
  • Deployed all contracts on Base Sepolia and Base Mainnet

Phase 1: MVP Examples (Completed)

  • 8 examples (deploy-operator, facilitator, server-express, server-hono, merchant-cli, client-cli, arbiter-cli, shared)
  • Full e2e dispute resolution flow

Phase 2: Core SDK (Completed)

  • @x402r/client — Refund requests, freeze, escrow period queries, subscriptions
  • @x402r/merchant — Release, charge, refundInEscrow, refundPostEscrow, refund handling
  • @x402r/arbiter — Decision submission, batch operations, registry, AI hooks
  • @x402r/helpersrefundable() helper for payment options
  • @x402r/core — Types, ABIs, config, deploy utilities
  • 310+ tests across all packages

Phase 3: Client UX (Upcoming)

  • Pre-payment info extraction (getOperatorInfo — discover arbiter, escrow period from operator address)
  • Combined freeze + refund (freezeAndRequestRefund — single call)
  • Condition awareness for clients

Phase 4: Subgraph Integration (Upcoming)

  • Deploy subgraph for payment event indexing
  • Implement 8 stubbed methods (getPaymentState, getMyPayments, etc.)
  • Historical payment listing for all roles

Future SDK Work

  • Evidence/metadata system with pluggable backends (IPFS, Arweave)
  • Encrypted communication channels (XMTP)
  • Session-based billing patterns
  • Multi-arbiter support
  • Dedicated Express/Hono middleware

Contract Status

All contracts use unified CREATE3 addresses — same address on every supported chain (11 chains: Base, Ethereum, Polygon, Arbitrum, Optimism, Celo, Avalanche, Monad, Linea, Base Sepolia, Ethereum Sepolia).
ContractStatus
AuthCaptureEscrowDeployed
ERC3009PaymentCollectorDeployed
PaymentOperatorFactoryDeployed
EscrowPeriodFactoryDeployed
FreezeFactoryDeployed
StaticFeeCalculatorFactoryDeployed
All condition/combinator factoriesDeployed
ProtocolFeeConfigDeployed
RefundRequestEvidenceDeployed
ReceiverRefundCollectorDeployed
Condition singletons (Payer, Receiver, AlwaysTrue)Deployed
All contract addresses are available in @x402r/core via getChainConfig(chainId). See the Installation page for details.

Get Involved

GitHub

Follow development and contribute.

Support

Get in touch with the team.