Quantum Atomic Payment: How A402 Links Service Execution, Payment, and Result, and What Will Need to Be Replaced in the Era of Quantum Threats

07.11.2026

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

⚙️ Detailed research option

  1. Statement of the problem
  2. What exactly does the A402 do?
  3. Quantum threat: where it is
  4. Selected questions to be tested
  5. Hypotheses and refutation criteria
  6. Evidence from A402
  7. Linking study: PQ-ASC
  8. Experimental plan
  9. Limitations and what is not proven
  10. Conclusion and next step
  11. Sources

1. Statement of the problem

⚙️ Detailed research option

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?

⚙️ Detailed research option

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”

⚙️ Detailed research option

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

⚙️ Detailed research option

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.

IndicatorA402, standard modeA402, liquidity vaultx402, 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 requestsO(1) per channelO(1) per vault cycleO(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?

⚙️ Detailed research option

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.

LevelWhat is used in A402Quantum riskWhat does this change?
On-chain signaturesSchnorr/secp256k1, Taproot on Bitcoin; Schnorr verification in an Ethereum contractShor’s algorithm basically solves the discrete logarithm problem on an elliptic curveForgery of signatures and unauthorized closure/withdrawal of funds in the presence of CRQC
Adapter obligationsPre-signatures and witness  tlinked to T = t·GSame algebraic structure; a post-quantum analogue of the adapter signature is neededBreaking the “payment ↔ disclosure of results” link
HashingHashes of messages, identifiers, resultsGrover’s algorithm provides a quadratic speedup; it is not an “instant hack.”It may be necessary to increase the hash/parameter length
TEEAMD SEV-SNP, remote attestation, code isolationA quantum computer by itself does not break a TEE; but a TEE has different threat modelsTEE 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

⚙️ Detailed research option

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 testedHow to check
1Which property of A402 is violated by quantum forgery of a Schnorr signature?Formal threat model + signature substitution scenario when closing a channel
2Where in A402 is the single point that connects the result and the payment?Protocol audit:  t,  T,  EncRes,  σ̂, σ
3Can the Schnorr adapter signature be replaced by a post-quantum construction without loss  Extract?PQ Adapter Circuit Overview + Property Check
4Will atomicity be preserved if the TEE remains trusted and the signature becomes post-quantum?Model with host compromise and quantum adversary
5How will latency and throughput change with PQ signatures?Prototype: p50/p95 latency, RPS, message size
6Will the on-chain cost remain O(1) per channel?Gas/vB for creation, closing and emergency exit
7What will happen to Bitcoin Taproot paths if PQ signature verification becomes expensive?Estimation script size, witness size, vB
8Could a hybrid Schnorr + PQ design be safer and more practical than a pure PQ replacement?Comparison of three architectures: classical, hybrid, and pure PQ
9Which of A402’s statements are supported by experiment and which are modeled?Proven/Measured/Supposed Table
10What is the migration cost for the service provider and vault?CPU, memory, key size, on-chain verification cost
11Is the output robust to more conservative PQ signature parameters?Sensitivity analysis: key/signature size, gas, latency
12Which of the following experiments best distinguishes between “hybrid” and “pure PQ”?Control experiment with the same threat model

5. Hypotheses and refutation criteria

⚙️ Detailed research option

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

⚙️ Detailed research option

StatementProof in preprintStatus
x402 does not ensure atomicity of execution and payment§1, L1–L2: execution to finalization; payment to deliveryReasoned
A402 embeds execution into channel state§4.1: ASC =  (C,S,B,ζ,k), statuses OPEN/LOCKED/PENDING/CLOSEDDesigned by
Atomicity is achieved by TEE-assisted adapter signatures§4.2:  t,  T=t·G,  EncRes,  pSign, pVerifyDesigned 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_settleDesigned by
The prototype is implemented in C++17, AMD SEV-SNP, Ethereum and Bitcoin§6, Appendix A: Hardhat, Bitcoin Core regtest, Taproot/MASTImplemented
Peak 2875 RPS, latency ≈350 ms§7.3Measured on prototype
Cost O(1) per channel; x402 — O(n)§7.2, Table 1, Appendix AMeasured/Evaluated
Quantum stability has not been investigatedThe 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

⚙️ Detailed research option

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/lineWhat does it give?What’s missingCommunication with PQ-ASC
x402HTTP 402, Programmable Payments via BlockchainThere is no atomicity of execution-payment-deliveryShows why ASC is needed
Payment Channels / Lightning / L402Off-chain micropayments, low latencyThe channel is not aware of the service being performed.ASC adds an execution layer
Adapter signaturesAtomic exchange of signature and secretClassical algebra; need a PQ analogThe core of the “payment ↔ result” relationship
TEE / TeechanHardware isolation and certificationTrust in TEE, side-channel outside the modelVerification of PQ-commitment within TEE
A402ASC + TEE + adapter signatures + vaultNo PQ analysis and PQ implementationBasic architecture for migration
NIST FIPS 203/204/205Standardized PQ primitivesThey are not ready-made adapter signaturesCandidates for a hybrid scheme

7.1 Three architectures for comparison

⚙️ Detailed research option

  1. Classical A402.  Schnorr adapter signatures, TEE, ongoing on-chain verification. Fast, cheap, but quantum-vulnerable in the long run.
  2. 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.
  3. 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

⚙️ Detailed research option

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

⚙️ Detailed research option

  1. 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.
  2. 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.
  3. Select PQ candidates.  Not just one design, but a family: lattice, isogeny, and hybrid adapter designs; the criterion is presence  Extract and verifiable binding to the result.
  4. Measure the cost.  Key/signature/commitment sizes, CPU in the TEE, p95 latency, on-chain verification costs on Ethereum and Bitcoin-like script paths.
  5. 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.
  6. 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

⚙️ Detailed research option

  • 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

⚙️ Detailed research option

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

⚙️ Detailed research option

  1. 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.
  2. NIST.  FIPS 203, 204, 205: Post-Quantum Standards , approved August 13, 2024.  csrc.nist.gov .
  3. NIST NCCoE.  Migration to Post-Quantum Cryptography .  nccoe.nist.gov .
  4. National Quantum Initiative.  Quantum Science Areas: Computing, Networks, Sensors .  quantum.gov .
  5. BIP 340 / BIP 341: Schnorr Signatures and Taproot for Bitcoin – On-chain verification context used in A402.
  6. 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.