Abstract
The rapid growth of blockchain technology is giving rise to siloed blockchains. Blockchains can efficiently store values and assets, but their inability to interoperate is reducing their usability. Lack of cross-chain exchange of assets and data is hindering the novel developments using blockchain technology. Interoperability solutions designed for blockchains mostly use a trusted third party: centralized or decentralized. Atomic swap solutions provide cross-chain asset exchange without involving any trusted third party. However, most of the atomic swap solutions proposed in the literature are for private blockchain and are not practically implemented. This paper proposes a solution for implementing an atomic swap between public blockchains using Hash Time Locked Contract (HTLC). We have also formulated the time-lock equations using the confirmation time of probabilistic blockchains to be used in HTLC. The accuracy of proposed time-lock equations and the performance of the atomic swap solution is evaluated by implementing HTLC between Ethereum and Tron blockchains. Redeem and refund functions of HTLC are implemented as conflicting events, and only one of the two can execute for an atomic swap. The implemented atomic swap solution maintains atomicity and adheres to time-lock values calculated using the proposed time-lock equations.
Similar content being viewed by others
Data availability
The data underlying this article is available in the GitHub repository. (https://github.com/creatloper/AssetExchange).
References
Abou Jaoude, J., George Saade, R.: Blockchain applications—Usage in different domains. IEEE Access 7, 45360–45381 (2019). https://doi.org/10.1109/ACCESS.2019.2902501
Prewett, K.W., Prescott, G.L., Phillips, K.: Blockchain adoption is inevitable—Barriers and risks remain. J. Corp. Account. Financ. 31(2), 21–28 (2020). https://doi.org/10.1002/jcaf.22415
Koens, T., Poll, E.: Assessing interoperability solutions for distributed ledgers. Pervasive Mob. Comput. 59, 101079 (2019). https://doi.org/10.1016/j.pmcj.2019.101079
Singh, A., Click, K., Parizi, R.M., Zhang, Q., Dehghantanha, A., Choo, K.K.R.: Sidechain technologies in blockchain networks: An examination and state-of-the-art review. J. Netw. Comput. Appl. 149, 102471 (2020). https://doi.org/10.1016/j.jnca.2019.102471
Siris, V.A., Nikander, P., Voulgaris, S., Fotiou, N., Lagutin, D., Polyzos, G.C.: Interledger approaches. IEEE Access 7, 89948–89966 (2019). https://doi.org/10.1109/ACCESS.2019.2926880
Belchior, R., Vasconcelos, A., Guerreiro, S., Correia, M.: A survey on blockchain interoperability: past, present, and future trend. ACM Comput. Surv. 54(8), 41 (2021). https://doi.org/10.1145/3471140
D. Zhao and T. Li, "Distributed Cross-Blockchain Transactions," 2020, [Online]. Available: http://arxiv.org/abs/2002.11771.
A. Zamyatin et al., "SoK: Communication Across Distributed Ledgers," 2019. [Online]. Available: http://www0.cs.ucl.ac.uk/staff/M.AlBassam/publications/crosschain.pdf.
Kannengießer, N., Pfister, M., Greulich, M., Lins, S., Sunyaev, A.: Bridges between islands: Cross-chain technology for distributed ledger technology. Proc. Annu. Hawaii Int. Conf. Syst. Sci. 5298–5307, 2020 (2020). https://doi.org/10.24251/hicss.2020.652
BTC relay. http://btcrelay.org/ (accessed Oct. 28, 2021)
Lys, L., Micoulet, A., Potop-Butucaru, M.: Atomic cross chain swaps via relays and adapters, CRYBLOCK 2020 - Proc. 3rd Work Cryptocurrencies Blockchains Distrib. Syst. Part MobiCom 2020, 59–64 (2020). https://doi.org/10.1145/3410699.3413799
S. D. Lerner, P2PTradeX: P2P Trading between cryptocurrencies, 2012. https://bitcointalk.org/index.php?topic=91843.0 (accessed Oct. 28, 2021).
T. Nolan, Alt chains and atomic transfers, 2013. https://bitcointalk.org/index.php?topic=193281.0 (accessed Oct. 28, 2021).
Miraz, M.H., Donald, D.C.: Atomic cross-chain swaps: Development, trajectory and potential of non-monetary digital token swap facilities. Ann. Emerg. Technol. Comput. 3(1), 42–50 (2019). https://doi.org/10.33166/AETiC.2019.01.005
Borkowski, M., Sigwart, M., Frauenthaler, P., Hukkinen, T., Schulte, S.: Dextt: deterministic cross-blockchain token transfers. IEEE Access 7, 111030–111042 (2019). https://doi.org/10.1109/access.2019.2934707
Zamyatin, A., Harz, D., Lind, J., Panayiotou, P., Gervais, A., Knottenbelt, W.: XCLAIM: Trustless, interoperable, cryptocurrency-backed assets. IEEE Symposium on Security and Privacy 2019, 193–210 (2019). https://doi.org/10.1109/SP.2019.00085
Li, W., Sforzin, A., Fedorov, S., Karame, G.O.: Towards scalable and private industrial blockchains, in BCC 2017. Proceedings of the ACM Workshop on Blockchain, Cryptocurrencies and Contracts, co-located with ASIA CCS 2017(2017), 9–14 (2017). https://doi.org/10.1145/3055518.3055531
M. Herlihy (2018) Atomic Cross-Chain Swaps. In Proceedings of the 2018 ACM Symposium on Principles of Distributed Computing (PODC '18). Association for Computing Machinery, New York, NY, USA, 245–254. DOI: https://doi.org/10.1145/3212734.3212736.
V. Zakhary, D. Agrawal, and A. El Abbadi (2019) Atomic Commitment Across Blockchains [Online]. Available: http://arxiv.org/abs/1905.02847.
J. A. Liu (2018) Atomic Swaptions: Cryptocurrency Derivatives pp. 1–16, [Online]. Available: http://arxiv.org/abs/1807.08644.
O. Shlomovits and O. Leiba (2020) JugglingSwap: Scriptless Atomic Cross-Chain Swaps, [Online]. Available: http://arxiv.org/abs/2007.14423.
Han, R., Lin, H., Yu, J.: On the optionality and fairness of Atomic Swaps. Adv. Financ. Technol, AFT ACM Conf (2019). https://doi.org/10.1145/3318041.3355460
Belotti, M., Moretti, S., Potop-butucaru, M., Secci, S.: Game theoretical analysis of Cross-Chain Swaps. IEEE 40th International Conference on Distributed Computing Systems 2020, 485–495 (2020). https://doi.org/10.1109/ICDCS47774.2020.00060
Monika, A., Goyal, S., Raina, K.B., Bhatia, R.: Atomic Cross-Chain Asset Exchange for Ethereum Public Chains. Conf. Comput. Commun. Informatics, Int (2021). https://doi.org/10.1109/ICCCI50826.2021.9402343
L. Lys, A. Micoulet, and M. Potop-Butucaru (2021) R-SWAP: Relay based atomic cross-chain swap protocol," IACR Cryptol. ePrint Arch., 2021–621, Available: https://eprint.iacr.org/2021/621.pdf
Funding
The authors declare that no funds, grants, or other support were received during the preparation of this manuscript.
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Conflict of interest
The authors have no relevant financial or non-financial interests to disclose.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
About this article
Cite this article
Monika, Bhatia, R., Jain, A. et al. Hash time locked contract based asset exchange solution for probabilistic public blockchains. Cluster Comput 25, 4189–4201 (2022). https://doi.org/10.1007/s10586-022-03643-x
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10586-022-03643-x