---
title: Atomic Service Channels (ASCs)
url: https://www.emergentmind.com/topics/atomic-service-channels-ascs
type: topic
---

# Atomic Service Channels (ASCs)

Atomic Service Channels (ASCs) are off-chain channel constructions that bind service exchange to balance settlement so that the composite interaction is atomic rather than decomposed into separable payment and delivery steps. In the current arXiv literature, the term is used in two closely related but non-identical senses. In Cross-Channel, an ASC between parties \(\mathcal{S}\) and \(\mathcal{R}\) spanning blockchains \(\alpha\) and \(\beta\) is a pair of off-chain state channels \(\Omega^\alpha_0,\Omega^\beta_0\) for high-frequency cross-chain services such as payments, information exchanges, and barter trades. In A402, an ASC with respect to blockchain \(\mathcal{L}\) is a tuple \((C,S,\Gamma)\) that integrates service execution into a payment channel for Machine-to-Machine commerce, with explicit exec-pay-deliver atomicity and optional private settlement through a TEE-based Liquidity Vault [2212.07265, 2603.01179].

## 1. Definitions and conceptual scope

Cross-Channel defines the atomicity goal as an all-or-nothing property over the paired channels: either \(\mathcal{S}\) and \(\mathcal{R}\) remain in their pre-service states, or they swap states atomically so that \(\mathcal{S}\) obtains \(\mathcal{R}\)-offered assets and \(\mathcal{R}\) obtains \(\mathcal{S}\)-offered assets, with no intermediate leakage. Its notion of fairness is that neither party can learn or enjoy the exchanged object—cryptocurrency, encrypted data, or digital commodity—before the other party has irrevocably committed its own side. A402 formalizes an ASC as \((C,S,\Gamma)\), where \(\Gamma=(\mathbf{B},\sigma)\), \(\mathbf{B}=\langle b^c,b^s\rangle\), and \(\sigma\in\{OPEN,LOCKED,PENDING,CLOSED\}\). It exposes three interfaces:
\[
\texttt{openASC}(C,S,v)\to\{\Gamma_0,tx_{(create)}\},\quad \Gamma_0=(\langle v,0\rangle,OPEN),
\]
\[
\texttt{execPayDeliver}(\Gamma_k,req,\delta)\to\{\Gamma_{k+1},res,ok\},
\]
\[
\texttt{closeASC}(\Gamma_{final})\to tx_{(close)}.
\]

A402 also contrasts ASCs with a standard payment channel \(\Pi_{PC}\), which tracks only \(\mathbf{B}\) and supports Open, Pay, and Close. In that formulation there is no notion of service execution or result delivery, and state transitions are purely asset-centric. The explicit consequence given is that such channels lack any binding between off-chain service execution and on-chain payment, leading to fairness violations such as free-riding or non-payment.

| Dimension | Cross-Channel ASC | A402 ASC |
|---|---|---|
| Formal object | pair \(\Omega^\alpha_0,\Omega^\beta_0\) | tuple \((C,S,\Gamma)\) |
| Primary setting | cross-chain services across \(\alpha,\beta\) | Web 3.0 payments bound to Web 2.0 services |
| Native operations | hierarchical off-chain service exchange and cross-chain settlement | \(\texttt{openASC}\), \(\texttt{execPayDeliver}\), \(\texttt{closeASC}\) |
| Core enforcement | hierarchical settlement, general fair exchange, HTLC-style hash-timelock | TEE-assisted adaptor signatures, dispute window, TEE-based Liquidity Vault |

These definitions place ASCs at the intersection of payment channels, fair exchange, and interoperability. This suggests that the term is not merely a synonym for a faster payment channel, but a label for protocols that make service semantics part of the channel state and settlement logic [2212.07265, 2603.01179].

## 2. Channel architecture and state semantics

The Cross-Channel construction is organized around a hierarchical channel structure designed to avoid the “Unsettled-Amount Congestion” problem, namely funds that are reserved but cannot be re-used until channel closure. Each channel \(\Omega\) carries a state
\[
\mathsf{State}_\Omega = \bigl[p_1\mapsto v_1,\;p_2\mapsto v_2,\;\dots\bigr]_\Omega
\]
subject to the invariant
\[
\sum_i v_i = C_\Omega,
\]
where \(C_\Omega\) is the on-chain deposit of \(\Omega\). At layer \(0\), the ASC consists of the main channels \(\Omega^\alpha_0,\Omega^\beta_0\). When a party needs to spend an unsettled receipt \(Tr\) of value \(v\) in \(\Omega\), it negotiates a sub-channel \(\Omega'\) at layer \(1\) with another counterparty to re-use that \(v\) off-chain. More generally, a layer-\(k\) channel \(\Omega_k\) may spawn a layer-\((k+1)\) sub-channel \(\Omega_{k+1}\) to mobilize newly issued, unsettled receipts of its parent. If the network contains \(N\) nodes and each pair shares a persistent channel at layer \(0\), then exchanged receipts flow off-chain until closure, giving effectively \(O(N)\) parallel throughput.

A402 uses a narrower but more explicit state machine. During atomic exchange, the state variable maintained by \(\mathcal{U}\) and \(S\) is
\[
\Gamma_{(cid)}=(C,S,\langle b^c_{free},b^c_{locked},b^s\rangle,\sigma,k),
\]
where \(k\) is a version counter and \(\sigma\in\{OPEN,LOCKED,PENDING\}\) during channel operation. The creation phase begins when \(C\) calls \(C.\texttt{reqOpenASC}(\mathcal{U},S,v,\mathcal{L},\pi)\). The delegated manager \(\mathcal{U}\) initializes its TEE committee per policy \(\pi\), checks that no existing \(ASC(C,S)\) exists, and ensures a secure channel \(SC\) with \(S\). It then runs \(\mathcal{U}.\texttt{openASC}(C,S,v)\), submits \(tx_{(create)}\) to \(\mathcal{L}\), and awaits confirmation. On-chain, \(\mathcal{L}\) locks \(v\) funds in a 2-of-2 or smart-contract address; locally, \(\mathcal{U}\) and \(S\) record \(\Gamma_0\) in state \(OPEN\).

The architectural difference is direct. Cross-Channel generalizes balance mobility by recursively nesting sub-channels, whereas A402 serializes service execution inside one channel by enforcing the state trajectory \(OPEN\to LOCKED\to PENDING\to OPEN\), thereby ensuring exactly one request in flight [2212.07265, 2603.01179].

## 3. Atomic exchange and fair-service enforcement

Cross-Channel’s general fair exchange protocol \(\Theta\) is built from zk-SNARK and Pedersen \((t,n)\)-VSS. In setup, the parties build an arithmetic circuit \(C_\Theta\) that, on private inputs \(\vec{w}=(m,k,[k_1,\ldots,k_n])\), verifies three conditions: \(m\) encrypts under key \(k\) to ciphertext \(\overline m\); \(k\) shares into \(\{k_i\}\) via \((t,n)\)-VSS; and the hash-locks \(h(m),h(k)\) match public values. Then \(\mathsf{Setup}(1^\lambda,C_\Theta)\to(\mathsf{pk},\mathsf{vk})\). In the share phase, each party runs Pedersen \((t,n)\)-VSS.Share on the secret key \(k\), commits \(h(k)\), uploads \(\{h(k_i)\}\) on-chain, selects \(n\) random miners, and encrypts and signs shares to them; miners verify commitments and may appeal on-chain if a share is invalid. In the exchange phase, the sender computes \(\overline m\) and
\[
\pi=\mathsf{Prove}(\mathsf{pk},(h(m),h(k)),(\overline m,m,k,[k_i])),
\]
and the parties swap \((\pi,\overline m,h(m),h(k))\), after which each runs \(\mathsf{Verify}(\mathsf{vk},\cdot)\). In the recover phase, both send on-chain \(\mathsf{Recover}\) requests, VSS recipients submit \(\mathsf{Tx}_{\text{Recover}(k_i)}\), the contract verifies \(\{h(k_i)\}\), and once at least \(t\) valid shares are collected, the requester reconstructs \(k\) by Lagrange interpolation and decrypts.

Cross-chain settlement in Cross-Channel then uses an HTLC-style hash-timelock on final channel balances. Parties lock final states under hash \(h(\mathsf{pre})\) with time-outs \(T_3>T_4\), and the “lock”, “update”, and “refund” steps mirror classic HTLC. The fairness guarantee in \(\Theta\) rests on
\[
n \ge t+\ell,\qquad t>\ell,
\]
where \(\ell\) is the maximum number of Byzantine miners. The stated consequence is twofold: no \(\ell\)-colluding adversaries can reconstruct \(k\), and at least \(t\) honest nodes can always supply shares for correct recovery.

A402 replaces zk-SNARK/VSS fair exchange with an atomic exchange protocol based on TEE-assisted adaptor signatures. After \(\mathcal{U}\) locks \(\delta\) by moving balance from \(b^c_{free}\) to \(b^c_{locked}\) and setting \(\sigma\leftarrow LOCKED\), \(S\) executes the request inside a TEE, samples \(t\in\mathbb{Z}_q\), sets \(T=t\cdot G\), encrypts the result as \(EncRes=Enc_t(res)\), computes \(h=H(res)\) and \(m=H(cid\|rid\|\delta\|h)\), and generates the adaptor pre-signature \(\hat{\sigma}_S\leftarrow pSign(sk_S,m,T)\). The manager verifies \(pVerify(pk_S,m,T,\hat{\sigma}_S)=1\), issues the conditional payment signature \(\sigma_U\leftarrow Sign_U(m,\delta)\), and moves the state to \(PENDING\). The provider then either reveals \(t\) off-chain or performs on-chain fallback by computing \(\sigma_S\leftarrow Adapt(\hat{\sigma}_S,t)\) and calling \(S.\texttt{forceCloseASC}(cid,\sigma_S)\). On secret reveal, \(\mathcal{U}\) decrypts \(res=Dec_t(EncRes)\), adjusts balances, returns the channel to \(OPEN\), and delivers the result to \(C\).

A402 states the end-to-end property as exec-pay-deliver atomicity. Its formal definition is
\[
Pr[(S\ \text{obtains}\ \delta \land \mathcal{U}\ \text{does not obtain}\ res)\ \lor\ (\mathcal{U}\ \text{obtains}\ res \land S\ \text{does not obtain}\ \delta)] \le negl(\lambda).
\]
The accompanying argument is that the TEE enforces execution before \(pSign\), while the adaptor signature ensures that payment finalization reveals \(t\), which is the decryption key for the result [2212.07265, 2603.01179].

## 4. Closure, settlement, and liquidity aggregation

Cross-Channel closes by running the same close routine simultaneously in \(\xi^\alpha\) and \(\xi^\beta\). After CloseRequest messages from all parties, the smart contract \(\xi\) sets the state to \(COLLECTING\), starts a timer \(T_{close}\), and broadcasts a CloseEvent. While \(T_{close}\) has not expired, each party uploads \(f_i\), its computed final balance vector at its channel level, together with the set \(\{Sr_i\}\) of sub-channel receipts it opened. On expiry, \(\xi\) verifies each channel layer by layer from level \(0\) to level \(L\). If \(\sum f_i\neq deposit(\Omega)\) or signatures are invalid, then \(\Omega\) and all its descendants are marked \(FAILED\); otherwise the contract sets on-chain balances per \(f_i\). Any failure at layer \(k\) invalidates that layer and all higher layers. Every successful layer deposits its final state; failed ones revert to parent balances.

A402 separates cooperative closure, unilateral client closure, unilateral provider closure, and vault settlement. In the cooperative path, \(C\) or \(S\) requests closure, \(\mathcal{U}\) runs \(\texttt{closeASC}(\Gamma)\), \(\mathcal{L}\) executes \(tx_{close}\), and the state becomes \(CLOSED\). In unilateral client closure, \(C.\texttt{forceCloseASC}(cid,\Gamma)\) starts an on-chain procedure with dispute window \(\Delta\); if no challenge is raised, \(C\) finalizes closure and the state becomes \(CLOSED\). In unilateral provider closure, \(S.\texttt{forceCloseASC}(cid,\sigma_S)\) acts differently depending on channel state: if \(\sigma=OPEN\), the result is cooperative-style close; if \(\sigma=PENDING\), the on-chain close with adaptor signature reveals \(t\) on-chain, allowing \(\mathcal{U}\) to extract it and decrypt the result before final closure.

The TEE-based Liquidity Vault extends A402 from per-channel settlement to private balance aggregation. Each participant \(p\) has off-chain vault state \(\mathcal{V}_p=(v_p^{free},v_p^{locked})\). After \(p\) submits \(tx_{init}\) to \(\mathcal{L}\), the vault committee records the deposit by increasing \(v_p^{free}\). Opening a private ASC from vault balances requires no on-chain transaction: the vault debits \(v_C^{free}\), generates \(cid\), and creates \(\Gamma=(C,S,\langle v,0,0\rangle,OPEN,k=0)\) off-chain. Closure credits balances back when \(\Gamma.\sigma=OPEN\). Settlement later aggregates the free balance into a single on-chain transaction
\[
tx_{settle}=\mathcal{U}.buildSettleTX(p,v_p^{free}),
\]
after which \(v_p^{free}\leftarrow 0\). The exposed on-chain quantity is only the aggregate
\[
total\_vout=\sum_{i\in settlements}\Delta_i,
\]
in one \(tx_{settle}\) [2212.07265, 2603.01179].

## 5. Security model, dispute handling, and interpretive issues

Cross-Channel assumes that \(\mathcal{S}\) and \(\mathcal{R}\) may be arbitrarily malicious and that miners run a BFT chain tolerating \(\ell<\tfrac{N-1}{3}\) Byzantine nodes. The fairness of \(\Theta\) is attributed to zk-SNARK soundness and zero-knowledge together with the \((t,n)\)-VSS thresholds, so that there is no information leak and proofs are unforgeable. Invalid share appeals are stated to abort safely even under asynchronous delays. Atomicity of cross-chain settlement is guaranteed by the HTLC timers \(T_3>T_4\). To mitigate asynchrony, an extra timer \(T_5\) allows any honest miner who learns \(\mathsf{pre}\) after timeout to complete the settlement and claim a small on-chain reward. Latency avoidance is achieved because payments, data swaps, and sub-channel openings occur off-chain, while on-chain interaction is limited to channel open and close, key-share appeals, and final HTLC locks and updates.

A402 frames its guarantees as trust-minimized asset security, exec-pay-deliver atomicity, and unlinkability in vault mode. Regardless of \(\mathcal{U}\) or \(S\) availability or honesty, \(C\) and \(S\) can unilaterally force on-chain settlement via \(\texttt{forceCloseASC}\) or \(\texttt{forceSettleVault}\), and assets are never locked indefinitely because of the challenge windows. Its primitive set explicitly includes adaptor signatures \(\Pi_{AS}\), collision-resistant hash \(H\), symmetric encryption \(Enc_t/Dec_t\), and TEE remote attestation \(VerifyAtt\). In vault mode, on-chain observers see vault initialization and settlement, but not individual ASC creation and closure, so the observer cannot link \(\delta_i\) or the client-service graph for individual ASCs.

A recurring misunderstanding addressed directly by the literature is the identification of ASCs with ordinary payment channels. A402 rejects that equivalence by defining the absence of service execution and result delivery as the central limitation of \(\Pi_{PC}\). Cross-Channel broadens the exchange object beyond coins to encrypted data and digital commodities, while preserving on-chain recourse. This suggests that the defining feature of an ASC is not simply off-chain balance movement, but an enforceable coupling between service execution, counter-performance, and final settlement [2212.07265, 2603.01179].

## 6. Empirical evaluation and practical significance

Cross-Channel was deployed on two 100-node Ethereum testnets (PoW) across 50 AliCloud VMs, simulating up to \(1\,000\) transactions per chain. Reported gas consumption at Gwei price \(=1\) is approximately \(70\) k gas for Open, approximately \(345\) k gas for Upload (key shares), approximately \(150\) k gas for Close (hierarchical settlement), \(79\)–\(146\) k gas for Lock/Update, and approximately \(109\) k gas for Update-EIE (with key recovery). For \(N\) cross-chain exchanges, the paper reports that Cross-Channel uses approximately \(1.33\) M gas total, while a naïve HTLC uses \(0.43\) M \(\times N\) and MAD-HTLC uses \(0.76\) M \(\times N\). Transaction confirmation latency for open, lock, update, and close remains \(3\)–\(7\) s even at \(100\) nodes. Throughput scales linearly in \(N\) channels: with \(500\) channels, approximately \(100\) nodes \(\times 5\) per channel, the system sustained \(3\times 10^6\) receipts/s in pure coin exchange and \(3\times 10^5\) Tr/s in encrypted-info exchange. Off-chain cryptographic overhead is also quantified: zk-SNARK proving time is sub-second even for \(10\,000\)-block messages, proof size is approximately \(1\) kB, verification is approximately ms, and VSS.Share, Verify, and Recover are all msec-level at \((t,n)\) up to \((51,151)\).

A402 reports both Ethereum and Bitcoin integrations and evaluates them against x402. On Ethereum, the ASC Manager contract exposes createASC, closeASC, initForceClose, finalForceClose, forceClose, initVault, settleVault, initForceSettle, and finalForceSettle. Standard ASC mode costs \(26\,050\) gas for createASC and \(57\,637\) gas for closeASC, for a total of \(83\,687\) gas (\(\$3.35\)) per channel. Vault mode costs \(23\,846\) gas for initVault and \(27\,490\) gas for settleVault, for \(51\,336\) gas (\(\$2.05\)). The x402 baseline is \(22\,580+23\,530\times n\) gas, stated as \(\$0.9+\$0.94\times n\) per request. On Bitcoin, using Taproot (P2TR) with MAST, createASC costs \(153\) vB (\(\$0.765\) @ \(10\) sat/vB), closeASC costs \(155\) vB (\(\$0.775\)), and total channel cost is \(308\) vB (\(\$1.54\)); \(S.\texttt{forceClose}\) costs \(208\) vB (\(\$1.04\)) and \(C.\texttt{forceClose}\) costs \(192\) vB (\(\$0.96\)). The x402 two-transaction flow costs \(291\) vB (\(\$1.455\)) per request, which the paper characterizes as linear \(O(n)\).

For off-chain performance, A402 reports a peak throughput of \(2\,875\) RPS at \(5\,000\) concurrent requests and average latency rising from \(340\) ms to \(370\) ms as load scales from \(100\) to \(10\,000\). It compares this with on-chain baselines of approximately \(30\) TPS for Ethereum and approximately \(7\) TPS for Bitcoin, yielding approximately \(95\times\) and approximately \(410\times\) higher throughput respectively, and contrasts sub-second ASC latency with seconds-to-minutes on mainnets, including approximately \(13\) s for Solana, approximately \(13\) min for Ethereum, and approximately \(60\) min for Bitcoin. At \(n=100\) requests on Ethereum, the reported costs are \(83\,687\) gas \(=\$3.35\) for standard A402, \(51\,336\) gas \(=\$2.05\) for vault A402, and \(2\,375\,580\) gas \(=\$95.02\) for x402, for an approximately \(28\times\)–\(46\times\) reduction; on Bitcoin, \(308\) vB \(=\$1.54\) for A402 versus \(291\) vB \(\times 100=\$145.50\) for x402, for a \(94\times\) reduction. Appendix results further state that adding more vault replicas scales capacity linearly while per-request latency remains stable because it is dominated by service execution and network delay.

Taken together, the empirical record distinguishes two operating regimes. Cross-Channel emphasizes high-frequency and large-scale cross-chain services with amortized on-chain cost across many off-chain operations, while A402 emphasizes real-time micropayments for Web 3.0/Web 2.0 service composition with private settlement aggregation. A plausible implication is that the ASC label now covers at least two protocol lineages: one centered on cross-chain fair exchange with hierarchical settlement, and one centered on service-integrated payment channels with TEE-assisted execution and vault-based balance privacy [2212.07265, 2603.01179].

Source: https://www.emergentmind.com/topics/atomic-service-channels-ascs