A402: Bridging Web 3.0 Payments and Web 2.0 Services with Atomic Service Channels

Yue Li, Lei Wang (6656), Kaixuan Wang, Zhiqiang Yang, Ke Wang, Zhi Guan, Jianbo Gao

A402: Making "Agentic Commerce" Atomic and Affordable

TL;DR

A402 is a trust-minimized architecture that binds cryptocurrency payments directly to the successful execution and delivery of digital services. By introducing Atomic Service Channels (ASCs) and leveraging TEE-assisted adaptor signatures, it enables high-frequency, low-latency micropayments for autonomous AI agents while ensuring that payment only occurs if the service is correctly delivered.

What Problem Does This Paper Address?

We are entering the era of "agentic commerce," where autonomous AI agents—not humans—are the primary consumers of digital services like cloud functions, data oracles, and specialized AI skills. Traditional financial systems, built on identity-based authentication (KYC) and coarse-grained subscriptions, are ill-suited for machines that lack legal identities and need to interact with unknown providers at high frequencies.

While blockchain-based payments offer a programmable alternative, current standards like x402 (the "Payment Required" HTTP status code for Web3) have a critical flaw: lack of atomicity. In x402, a provider might receive payment but fail to deliver the result, or a provider might execute a task "optimistically" and never get paid. Furthermore, processing every tiny transaction on-chain is prohibitively slow and expensive. A402 aims to bridge this gap by creating a "fair exchange" mechanism where execution, payment, and delivery are cryptographically locked together.

Methods

The authors propose a three-tier architecture to solve the atomicity and scalability issues:

  1. Atomic Service Channels (ASCs): These are off-chain channels that extend the concept of traditional payment channels. Instead of just tracking balances, ASCs embed the state of service execution directly into the channel protocol.
  2. TEE-Assisted Adaptor Signatures: This is the core technical innovation. The service provider executes the requested task inside a Trusted Execution Environment (TEE). The TEE generates an "adaptor signature"—a pre-signature that is cryptographically "locked." To unlock the signature and claim the payment, the provider must reveal a secret witness ($t$). Crucially, this same witness is used to encrypt the service result. Therefore, the provider can only get paid by revealing the key that allows the client to decrypt the result.
  3. Privacy-Preserving Liquidity Vault: To handle scalability and privacy, A402 uses a TEE-backed vault that manages multiple ASCs. It aggregates many small settlements into a single on-chain transaction, hiding individual interaction patterns and significantly reducing gas fees.

Datasets

As a systems and protocol paper, A402 is evaluated using custom implementation benchmarks rather than standard ML datasets:

  • Integrations: The protocol was implemented on both Bitcoin (using Taproot/P2TR outputs) and Ethereum (using Solidity smart contracts).
  • Workload Simulation: The authors used a client workload generator simulating 100 concurrent clients issuing between 100 and 10,000 requests.
  • Hardware: Evaluation was conducted on servers equipped with AMD EPYC CPUs, utilizing AMD SEV-SNP for the TEE components.

Key Insights and Ideas

  • The "Fair Exchange" Breakthrough: By linking the decryption key of the service result to the cryptographic witness of the payment signature, A402 achieves "Exec-Pay-Deliver" atomicity. You can't have the money without giving the result, and you can't get the result without releasing the money.
  • Decoupling from Blockchain Latency: By moving the service-payment binding off-chain into ASCs, the system's performance is limited by network speed and TEE processing, not by the underlying blockchain's block times.
  • Amortized On-Chain Costs: A402 changes the cost model from $O(n)$—where every request costs gas—to $O(1)$, where only the opening and closing of a vault or channel incurs a fee, regardless of how many thousands of requests happen in between.

Key Results

  • High Throughput: The prototype achieved a peak throughput of 2,875 Requests Per Second (RPS), which is orders of magnitude higher than the base-layer throughput of Bitcoin (~7 TPS) or Ethereum (~30 TPS).
  • Low Latency: End-to-end request completion averaged ~350 ms, making it suitable for real-time M2M interactions.
  • Massive Cost Savings: On Ethereum, A402 reduced on-chain costs by 28x to 46x compared to x402. On Bitcoin, for a batch of 100 requests, A402 was 94x more economical in terms of fees.
  • Trust Minimization: Even if the Liquidity Vault goes offline or becomes malicious, the protocol provides "on-chain escape" mechanisms allowing users to reclaim their funds unilaterally.

Limitations and Future Work

  • Hardware Trust: The security model relies on the integrity of TEEs (like AMD SEV-SNP). While these are industry standards, any zero-day vulnerability in the hardware could compromise the "fair exchange" guarantee.
  • Network Assumptions: The protocol assumes a "reliable eventual message delivery" for liveness. In highly adversarial network conditions (e.g., total eclipse attacks), the dispute resolution process could become complex.
  • Future Directions: The authors suggest extending A402 to support multi-hop service composition, where an agent pays one provider who, in turn, pays several sub-providers, maintaining atomicity across the entire chain.

Summary updated

Abstract

The rapid proliferation of autonomous AI agents is driving a shift toward Machine-to-Machine (M2M) commerce, where software agents are expected to autonomously invoke and pay for Web 2.0 services. While Web 3.0 payments offer a programmable foundation for such interactions, the recently proposed x402 standard fails to enforce end-to-end atomicity across service execution, payment, and result delivery. In this paper, we present A402, a trust-minimized payment architecture that securely binds Web 3.0 payments to Web 2.0 services. A402 introduces Atomic Service Channels (ASCs), a new channel protocol that integrates service execution into payment channels, enabling real-time, high-frequency micropayments for M2M commerce. Within each ASC, A402 employs an atomic exchange protocol based on TEE-assisted adaptor signatures, ensuring that payments are finalized if and only if the requested service is correctly executed and the corresponding result is delivered. To further ensure privacy, A402 incorporates a TEE-based Liquidity Vault that privately manages the lifecycle of ASCs and aggregates their settlements into a single on-chain transaction, revealing only aggregated balances. We implement A402 and evaluate it against x402 with integrations on both Bitcoin and Ethereum. Our results show that A402 delivers orders-of-magnitude performance and on-chain cost improvements over x402 while providing trust-minimized security guarantees.
BibTeX
@misc{li2026bridging,
  author = {Yue Li and Lei Wang (6656) and Kaixuan Wang and Zhiqiang Yang and Ke Wang and Zhi Guan and Jianbo Gao},
  title = {{A402: Bridging Web 3.0 Payments and Web 2.0 Services with Atomic Service Channels}},
  year = {2026},
  eprint = {2603.01179},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2603.01179},
}

Loading related content...

Figure