A research paper at the intersection of agent-based commerce, payment channels, TEEs, and post-quantum cryptography. A402 achieves what x402 cannot: it ties payment to service execution and result delivery in a single atomic “execute-payment-delivery” operation. However, this atomicity relies on TEEs and Schnorr adapter signatures over discrete logarithm cryptography. This creates a verifiable paradox: a protocol can be atomic today but become non-atomic or insecure after the advent of a cryptographically relevant quantum computer . This gap between “atomic now” and “post-quantum later” is explored below. A402 is a powerful paper on how to make service payment atomic in agent-based commerce. Its main engineering contributions are ASC, TEE-assisted adapter signatures, and liquidity vault, which together provide sub-second latency and O(1) on-chain cost per channel. But this design inherits the cryptographic assumptions of its era.
A scientifically interesting next step is not to “add a quantum word to the title,” but to rigorously answer the question: what minimal post-quantum replacement preserves Exec-Pay-Deliver atomicity, and at what cost? If the answer turns out to be negative for a pure PQ replacement, this is also a valuable result: it demonstrates the need for a hybrid architecture with an explicitly described trust model during the transition period.
A new testable question follows from this comparison: Is it possible to construct a PQ-ASC in which a quantum adversary can neither obtain a result without payment nor finalize a payment without a result, and the TEE remains only a verification accelerator, but not the sole guardian of atomicity?
Content
- Statement of the problem
- What exactly does the A402 do?
- Quantum threat: where it is
- Selected questions to be tested
- Hypotheses and refutation criteria
- Evidence from A402
- Linking study: PQ-ASC
- Experimental plan
- Limitations and what is not proven
- Conclusion and next step
- Sources
1. Statement of the problem
Autonomous AI agents are increasingly calling paid services without pre-established accounts, contracts, or trust relationships. Such interactions require a payment primitive that simultaneously:
- does not require a manual intermediary;
- allows you to pay for an individual service call, rather than for “platform access”;
- does not force an honest performer to work for free;
- does not allow you to get results without payment;
- Withstands high frequency and low latency.
Preprint A402 identifies three limitations of x402: (L1) execution occurs before payment finalization, creating a risk of non-payment; (L2) payment is confirmed first, then the result is delivered, allowing the result to be retained after payment; (L3) latency, fees, and privacy are limited by on-chain confirmation. A402 proposes Atomic Service Channels (ASC)—a channel whose state embeds not only the distribution of funds but also the service execution status. This is a profound engineering shift: payment becomes a contingent obligation tied to the outcome.
But here’s where the scientific problem begins. The atomicity of A402 is ensured by the TEE and adapter signatures. If the underlying signature becomes quantum-vulnerable, it’s not the “speed” that changes, but the proof itself that the payment cannot be finalized without revealing the result . Therefore, the correct research question is not “Is A402 faster than x402?”—this has already been measured in the preprint—but “Will the atomicity of A402 be preserved when replacing quantum-vulnerable primitives with post-quantum ones, and at what cost?”
2. What exactly does the A402 do?
A402 has four entities: the client C, the TEE-protected vault U, the executor S , and the blockchain L. The vault manages the ASC, forwards requests and results, and can also aggregate payments. The key idea is Exec-Pay-Deliver atomicity : a payment is finalized if and only if the request is correctly executed and the result is delivered.
2.1. Adapter signature as a “secret lock”
An adapter signature allows you to create a pre-signature σ̂ for a statement T = t·G. It is not a regular valid signature, but if a witness appears t, the pre-signature can be converted into a valid signature σ. Anyone who sees σ and σ̂can extract t. In A402, the performer generates t within the TEE, encrypts the result EncRes using t , and issues a pre-signature for the payment message. Vault verifies the pre-signature and issues a conditional signature. The performer reveals t, after which the result is either decrypted off-chain or t extracted from the on-chain closure.
T = t G → σ̂ = pSign(sk S , m, T) → σ = Adapt(σ̂, t) → t = Extract(σ, σ̂, T)
2.2 Why it’s better than x402 – according to the preprint
A402 moves high-frequency interactions to the off-chain ASC, keeping only creation, closure, and, if necessary, emergency exits on-chain. The preprint reports a peak throughput of 2,875 RPS and an average latency of approximately 350 ms ; the on-chain channel lifetime cost is independent of the number of requests, approaching O(1) per channel, rather than O(n) per request as in the x402 model.
| Indicator | A402, standard mode | A402, liquidity vault | x402, score for 100 queries |
|---|---|---|---|
| Ethereum Life Cycle Cost | $3.35 | $2.05 | ≈ $95.02 |
| Bitcoin lifecycle cost | $1.54 | $1.54 | ≈ $145.50 |
| On-chain costs as a function of the number of requests | O(1) per channel | O(1) per vault cycle | O(n) |
The numbers are taken from §7 and Appendix A of the preprint. These are results from prototype and test networks, not a production benchmark.
3. Quantum threat: where exactly does it take place?
Preprint A402 does not explore quantum stability. This is not a criticism: the work addresses a different problem. But for a scientific paper, it is important to clearly distinguish between the three levels.
| Level | What is used in A402 | Quantum risk | What does this change? |
|---|---|---|---|
| On-chain signatures | Schnorr/secp256k1, Taproot on Bitcoin; Schnorr verification in an Ethereum contract | Shor’s algorithm basically solves the discrete logarithm problem on an elliptic curve | Forgery of signatures and unauthorized closure/withdrawal of funds in the presence of CRQC |
| Adapter obligations | Pre-signatures and witness tlinked to T = t·G | Same algebraic structure; a post-quantum analogue of the adapter signature is needed | Breaking the “payment ↔ disclosure of results” link |
| Hashing | Hashes of messages, identifiers, results | Grover’s algorithm provides a quadratic speedup; it is not an “instant hack.” | It may be necessary to increase the hash/parameter length |
| TEE | AMD SEV-SNP, remote attestation, code isolation | A quantum computer by itself does not break a TEE; but a TEE has different threat models | TEE remains a trusted component, not a “quantum shield” |
Important: In August 2024, NIST approved FIPS 203, 204, and 205—standards for post-quantum key establishment and digital signatures. However, this does not mean that every protocol is automatically post-quantum. An adapter signature is not just a signature. A construction is needed that preserves the properties of pSign, pVerify, Adapt and Extract while remaining secure in the post-quantum model.
4. Selected questions to be tested
The research question constructor selected questions that directly link the A402 mechanism, cryptographic primitives, the experiment, and practical migration. These aren’t “all 75 questions,” but rather the core of a single article.
| No. | Question to be tested | How to check |
|---|---|---|
| 1 | Which property of A402 is violated by quantum forgery of a Schnorr signature? | Formal threat model + signature substitution scenario when closing a channel |
| 2 | Where in A402 is the single point that connects the result and the payment? | Protocol audit: t, T, EncRes, σ̂, σ |
| 3 | Can the Schnorr adapter signature be replaced by a post-quantum construction without loss Extract? | PQ Adapter Circuit Overview + Property Check |
| 4 | Will atomicity be preserved if the TEE remains trusted and the signature becomes post-quantum? | Model with host compromise and quantum adversary |
| 5 | How will latency and throughput change with PQ signatures? | Prototype: p50/p95 latency, RPS, message size |
| 6 | Will the on-chain cost remain O(1) per channel? | Gas/vB for creation, closing and emergency exit |
| 7 | What will happen to Bitcoin Taproot paths if PQ signature verification becomes expensive? | Estimation script size, witness size, vB |
| 8 | Could a hybrid Schnorr + PQ design be safer and more practical than a pure PQ replacement? | Comparison of three architectures: classical, hybrid, and pure PQ |
| 9 | Which of A402’s statements are supported by experiment and which are modeled? | Proven/Measured/Supposed Table |
| 10 | What is the migration cost for the service provider and vault? | CPU, memory, key size, on-chain verification cost |
| 11 | Is the output robust to more conservative PQ signature parameters? | Sensitivity analysis: key/signature size, gas, latency |
| 12 | Which of the following experiments best distinguishes between “hybrid” and “pure PQ”? | Control experiment with the same threat model |
5. Hypotheses and refutation criteria
H1. Atomicity. A hybrid PQ-ASC in which the TEE verifies the post-quantum adapter commitment preserves Exec-Pay-Deliver atomicity in the quantum adversary model if the TEE is not compromised.
H2. Performance. By moving the heavy PQ check to the TEE and using on-chain checks only on the failover path, the average latency will remain sub-second, and the throughput will be on the order of thousands of RPS on a vault cluster.
H3. Economics. On-chain cost will remain O(1) per channel or vault cycle, but absolute cost will increase due to the size of PQ signatures and verifications.
Refutation criteria. H1 is refuted if there is a scenario where the performer receives payment without revealing the result or the vault receives the result without payment. H2 is refuted if the p95 delay exceeds the sub-second budget for a realistic PQ signature size. H3 is refuted if the cost of the escape route makes micropayments economically impractical.
6. Evidence from A402: What is already known
| Statement | Proof in preprint | Status |
|---|---|---|
| x402 does not ensure atomicity of execution and payment | §1, L1–L2: execution to finalization; payment to delivery | Reasoned |
| A402 embeds execution into channel state | §4.1: ASC = (C,S,B,ζ,k), statuses OPEN/LOCKED/PENDING/CLOSED | Designed by |
| Atomicity is achieved by TEE-assisted adapter signatures | §4.2: t, T=t·G, EncRes, pSign, pVerify | Designed by |
| TEE is registered through remote certification | §4.1, Algorithm 1: VerifyAtt(att, pk, hcode) | Designed by |
| Liquidity vault aggregates closings | §4.3: Private ASC Creation/Closing and Aggregated tx_settle | Designed by |
| The prototype is implemented in C++17, AMD SEV-SNP, Ethereum and Bitcoin | §6, Appendix A: Hardhat, Bitcoin Core regtest, Taproot/MAST | Implemented |
| Peak 2875 RPS, latency ≈350 ms | §7.3 | Measured on prototype |
| Cost O(1) per channel; x402 — O(n) | §7.2, Table 1, Appendix A | Measured/Evaluated |
| Quantum stability has not been investigated | The preprint does not contain a PQ analysis section. | Open question |
A key caveat: Preprint A402 does not claim quantum security. Moreover, the Schnorr signature used over secp256k1 and adapter signatures of the same family are, in principle, in a class that Shor’s algorithm can attack given a sufficiently large, fault-tolerant quantum computer. Such a computer does not exist today; therefore, this is a study of the migration architecture, not a statement that “A402 has already been broken.”
7. Bridging Study: From A402 to PQ-ASC
In order to link several works into a coherent study, it is proposed not to “glue” x402, Lightning/L402, Teechan and A402 together, but to construct a single comparison axis.
| Work/line | What does it give? | What’s missing | Communication with PQ-ASC |
|---|---|---|---|
| x402 | HTTP 402, Programmable Payments via Blockchain | There is no atomicity of execution-payment-delivery | Shows why ASC is needed |
| Payment Channels / Lightning / L402 | Off-chain micropayments, low latency | The channel is not aware of the service being performed. | ASC adds an execution layer |
| Adapter signatures | Atomic exchange of signature and secret | Classical algebra; need a PQ analog | The core of the “payment ↔ result” relationship |
| TEE / Teechan | Hardware isolation and certification | Trust in TEE, side-channel outside the model | Verification of PQ-commitment within TEE |
| A402 | ASC + TEE + adapter signatures + vault | No PQ analysis and PQ implementation | Basic architecture for migration |
| NIST FIPS 203/204/205 | Standardized PQ primitives | They are not ready-made adapter signatures | Candidates for a hybrid scheme |
7.1 Three architectures for comparison
- Classical A402. Schnorr adapter signatures, TEE, ongoing on-chain verification. Fast, cheap, but quantum-vulnerable in the long run.
- Hybrid PQ-ASC. Classical and post-quantum verification coexist; the TEE verifies the PQ commitment off-chain, while on-chain verification is only a fallback path. The tradeoff is complexity and message size.
- Pure PQ-ASC. Post-quantum primitives only. Maximum security, but potentially large signatures, expensive on-chain verification, and immature adapter designs.
7.2 What should remain invariant
Payment is finalized ⇔ the result is delivered and correct;
the result is not disclosed free of charge ⇔ the payment is not finalized without t.
In the PQ version, one must prove that the disclosure of the post-quantum witness t also irreversibly links the decryption of the result and the finalization of the payment. This doesn’t follow automatically from the signature replacement: PQ schemes have a different structure of keys, commitments, and proofs.
8. Experimental plan
- Reproduce baseline A402. Repeat measurements from §7: 100–10,000 requests, 100 ASC, 200 ms execution, 10 ms network; record RPS, p50/p95 latency, gas/vB.
- Formalize the PQ threat. Distinguish between the adversaries: quantum adversary versus signatures; quantum adversary versus adapter commitment; classical adversary versus TEE. Each has its own claims.
- Select PQ candidates. Not just one design, but a family: lattice, isogeny, and hybrid adapter designs; the criterion is presence
Extractand verifiable binding to the result. - Measure the cost. Key/signature/commitment sizes, CPU in the TEE, p95 latency, on-chain verification costs on Ethereum and Bitcoin-like script paths.
- Check the fallback paths. Scenarios: vault unavailable, the contractor is silent, the client is attempting free-riding, the contractor is attempting to collect payment without success.
- Conduct a sensitivity analysis. What happens with more conservative PQ parameters and a 10x increase in load?
Success metrics: (1) no atomicity violation scenarios in the model; (2) p95 latency in sub-second budget; (3) O(1) on-chain cost per channel; (4) acceptable escape cost.
9. Limitations and what is not proven
- Preprint A402 does not contain a quantum analysis; all conclusions about PQ migration are a research program, not the result of the authors of A402.
- The A402 experiments were conducted on the Ethereum and Bitcoin regtest testnets; this is not an industrial audit.
- TEE side-channel and hardware compromise are outside the A402 threat model and cannot be ignored in a PQ article.
- NIST FIPS 203/204/205 standardize KEMs and signatures, but do not provide an out-of-the-box adapter signature for A402.
- It is impossible to state a precise date for the emergence of a cryptographically relevant quantum computer; the correct formulation is “long-term risk and architectural preparation.”
- You can’t compare A402 and x402 just by RPS: they have different trust models and different guarantees.
10. Conclusion and next step
A402 is a powerful paper on how to make service payments atomic in agent-based commerce. Its main engineering contributions are ASC, TEE-assisted adapter signatures, and liquidity vault, which together deliver subsecond latency and O(1) on-chain cost per channel. However, this design inherits the cryptographic assumptions of its era.
A scientifically interesting next step is not to “add a quantum word to the title,” but to rigorously answer the question: what minimal post-quantum replacement preserves Exec-Pay-Deliver atomicity, and at what cost? If the answer turns out to be negative for a pure PQ replacement, this is also a valuable result: it demonstrates the need for a hybrid architecture with an explicitly described trust model during the transition period.
A new testable question follows from this comparison: Is it possible to construct a PQ-ASC in which a quantum adversary can neither obtain a result without payment nor finalize a payment without a result, and the TEE remains only a verification accelerator, but not the sole guardian of atomicity?
Sources
- Yue Li, Lei Wang, Kaixuan Wang, Zhiqiang Yang, Ke Wang, Zhi Guan, Jianbo Gao. A402: Binding Cryptocurrency Payments to Service Execution for Agentic Commerce . Preprint 2603.01179v2. Used §1–§7, Appendix A.
- NIST. FIPS 203, 204, 205: Post-Quantum Standards , approved August 13, 2024. csrc.nist.gov .
- NIST NCCoE. Migration to Post-Quantum Cryptography . nccoe.nist.gov .
- National Quantum Initiative. Quantum Science Areas: Computing, Networks, Sensors . quantum.gov .
- BIP 340 / BIP 341: Schnorr Signatures and Taproot for Bitcoin – On-chain verification context used in A402.
- The research question constructor “Quantum Technologies: 75 questions for a research article” is used as a methodological framework for selecting questions, and not as a source of scientific facts.
This document is intended as a research overview and instructional tool. It does not replace a peer-reviewed article, protocol audit, or cryptographic proof. Publication in a scientific journal will require a formal model, a new PQ construct, and reproducible experiments.
