Paper 2019/896

On the optionality and fairness of Atomic Swaps

Runchao Han, Haoyu Lin, and Jiangshan Yu


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.

Available format(s)
Cryptographic protocols
Publication info
Published elsewhere. Minor revision. The first ACM conference on Advances in Financial Technologies (AFT’19)
BlockchainAtomic SwapCross-Chain TransactionsAmerican Call Option
Contact author(s)
runchao han @ monash edu
chris haoyul @ gmail com
jiangshan yu @ monash edu
2019-08-23: last of 4 revisions
2019-08-05: received
See all versions
Short URL
Creative Commons Attribution


      author = {Runchao Han and Haoyu Lin and Jiangshan Yu},
      title = {On the optionality and fairness of Atomic Swaps},
      howpublished = {Cryptology ePrint Archive, Paper 2019/896},
      year = {2019},
      doi = {10.1145/3318041.3355460},
      note = {\url{}},
      url = {}
Note: In order to protect the privacy of readers, does not use cookies or embedded third party content.