This post summarizes key ideas in the conference paper “Atomic Cross-Chain Swaps”. (Detailed Presentation)
Objective
An atomic swap protocol guarantees
- If all parties conform to the protocol, then all swaps take place
- If some parties deviate from the protocol, then no conforming party ends up worse off
- No coalition has an incentive to deviate from the protocol
Problem Statement
- When such swaps possible?
- How to implement?
- What do they cost?
Paper Approach
- Model the swap by a directed graph (or digraph)
- Classify protocol outcomes
- Analyze the protocol using pebble games
- Propose the protocol
- Conclude with existence condition, time and space complexity
Conclusion
-
For any pair (𝒟,𝐿), where 𝒟=(𝑉,𝐴) is a strongly-connected digraph and 𝐿⊂𝑉 a feedback vertex set, the paper gives an atomic cross-chain swap protocol using hashed timelock contracts, where vertexes in 𝐿 generate the hashlocked secrets.
-
No such protocol is possible if 𝒟 is not strongly connected, or if 𝒟 is strongly connected but 𝐿 is not a feedback vertex set.
-
The protocol has time complexity 𝒪(𝑑𝑖𝑎𝑚(𝒟)) and space complexity (bits stored on all blockchains) 𝒪(abs(𝐴)^2).