On the optionality and fairness of Atomic Swaps

Runchao Han, Haoyu Lin, Jiangshan Yu

Research output: Chapter in Book/Report/Conference proceedingConference PaperResearch

29 Citations (Scopus)


Atomic Swap enables two parties to atomically exchange their own cryptocurrencies without trusted third parties. This paper provides the first quantitative analysis on the fairness of the Atomic Swap protocol, and proposes the first fair Atomic Swap protocol with implementations. In particular, we model the Atomic Swap as the American Call Option, and prove that an Atomic Swap is equivalent to an American Call Option without the premium. Thus, the Atomic Swap is unfair to the swap participant. Then, we quantify the fairness of the Atomic Swap and compare it with that of conventional financial assets (stocks and fiat currencies). The quantification results show that the the Atomic Swap is much more unfair on cryptocurrencies than on stocks and fiat currencies in the same setting. Moreover, we use the conventional Cox-Ross-Rubinstein option pricing model in Finance to estimate the premium, and show that the estimated premium for cryptocurrencies is 2% ∼ 3% of the asset value, while the premium for stocks and fiat currencies is approximately 0.3%. Furthermore, we propose two fair Atomic Swap protocols, one is for currency exchange and the other is for American Call Options. Our protocols are based on the original Atomic Swap protocol, but implement the premium mechanism. Blockchains supporting smart contracts such as Ethereum support our protocols directly. Blockchains only supporting scripts such as Bitcoin can support our protocols by adding a simple opcode. Finally, we provide the reference implementation of our protocols in Solidity, and give detailed instructions on implementing our protocols with Bitcoin script.

Original languageEnglish
Title of host publicationProceedings of the 1st ACM Conference on Advances in Financial Technologies
EditorsIttai Abraham, Ittay Eyal, Emin Gün Sirer
Place of PublicationNew York NY USA
PublisherAssociation for Computing Machinery (ACM)
Number of pages14
ISBN (Electronic)9781450367325
Publication statusPublished - 2019
EventACM Conference on Advances in Financial Technologies 2019 - Zurich, Switzerland
Duration: 21 Oct 201923 Oct 2019
Conference number: 1st


ConferenceACM Conference on Advances in Financial Technologies 2019
Abbreviated titleAFT 2019
Internet address


  • American Call Option
  • Atomic Swap
  • Blockchain
  • Cross-Chain Transactions

Cite this