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:
- 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.
- 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.
- 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