English

Atomic Cross-Chain Swaps

Distributed, Parallel, and Cluster Computing 2018-05-21 v4

Abstract

An atomic cross-chain swap is a distributed coordination task where multiple parties exchange assets across multiple blockchains, for example, trading bitcoin for ether. An atomic swap protocol guarantees (1) if all parties conform to the protocol, then all swaps take place, (2) if some coalition deviates from the protocol, then no conforming party ends up worse off, and (3) no coalition has an incentive to deviate from the protocol. A cross-chain swap is modeled as a directed graph D{\cal D}, whose vertexes are parties and whose arcs are proposed asset transfers. For any pair (D,L)({\cal D},L), where D=(V,A){\cal D} = (V,A) is a strongly-connected directed graph and LVL \subset V a feedback vertex set for D{\cal D}, we give an atomic cross-chain swap protocol for D{\cal D}, using a form of hashed timelock contracts, where the vertexes in LL generate the hashlocked secrets. We show that no such protocol is possible if D{\cal D} is not strongly connected, or if D{\cal D} is strongly connected but LL is not a feedback vertex set. The protocol has time complexity O(diam(D))O(diam({\cal D})) and space complexity (bits stored on all blockchains) O(A2)O(|A|^2).

Keywords

Cite

@article{arxiv.1801.09515,
  title  = {Atomic Cross-Chain Swaps},
  author = {Maurice Herlihy},
  journal= {arXiv preprint arXiv:1801.09515},
  year   = {2018}
}

Comments

To appear, PODC 2018

R2 v1 2026-06-23T00:01:11.137Z