Abstract
There is a protocol called “atomic cross-chain swap” that spans across multiple blockchains, but is it really atomic? We analyze the protocol using a modal logic for asynchronous communication. The modal logic allows us to identify some assumptions required for the “atomic” property as logical formulas. We first demonstrate that the atomicity fails without some temporal-epistemic assumptions. We further construct a proof that the atomicity holds with strong enough temporal-epistemic assumptions. In both analyses, we use Kripke models of the modal logic. This is the first analysis of multiple blockchains’ interaction using a modal logic.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsNotes
- 1.
A block is orphaned when it belongs to a blockchain that is not considered canonical anymore. This sometimes happens after branching blockchains are formed.
- 2.
BHK stands for Brouwer-Heyting-Kolmogorov.
- 3.
An axiom type is a logical formula with free variables like \(\varphi \) and \(\psi \) that can be substituted by any formulas.
References
Atzei, N., Bartoletti, M., Cimoli, T., Lande, S., Zunino, R.: SoK: unraveling bitcoin smart contracts. In: Bauer, L., Küsters, R. (eds.) POST 2018. LNCS, vol. 10804, pp. 217–242. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-89722-6_9
Bitcoin Wiki: Script (2010–2018). https://en.bitcoin.it/wiki/Script. Accessed 13 Mar 2018
Chandra, T.D., Toueg, S.: Unreliable failure detectors for reliable distributed systems. J. ACM 43(2), 225–267 (1996)
Chandy, K.M., Misra, J.: How processes learn. Distrib. Comput. 1(1), 40–52 (1986)
van Dalen, D.: Logic and Structure. Springer, Heidelberg (1994). https://doi.org/10.1007/978-3-662-02962-6
van Ditmarsch, H., van der Hoek, W., Kooi, B.: Dynamic Epistemic Logic, 1st edn. Springer, Heidelberg (2007). https://doi.org/10.1007/978-1-4020-5839-4
Emerson, E., Clarke, E.M.: Using branching time temporal logic to synthesize synchronization skeletons. Sci. Comput. Program. 2(3), 241–266 (1982)
Fagin, R., Halpern, J.Y., Vardi, M.Y., Moses, Y.: Reasoning About Knowledge. MIT Press, Cambridge (1995)
Fischer, M.J., Lynch, N.A., Paterson, M.S.: Impossibility of distributed consensus with one faulty process. J. ACM 32(2), 374–382 (1985)
Gencer, A.E., van Renesse, R., Sirer, E.G.: Short paper: service-oriented sharding for blockchains. In: Kiayias, A. (ed.) FC 2017. LNCS, vol. 10322, pp. 393–401. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-70972-7_22
von Gleissenthall, K., Rybalchenko, A.: An epistemic perspective on consistency of concurrent computations. In: D’Argenio, P.R., Melgratti, H. (eds.) CONCUR 2013. LNCS, vol. 8052, pp. 212–226. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-40184-8_16
Halpern, J.Y., Pass, R.: A knowledge-based analysis of the blockchain protocol. In: TARK 2017. EPTCS, vol. 251, pp. 324–335 (2017)
Hirai, Y.: An intuitionistic epistemic logic for asynchronous communication. Master’s thesis, the University of Tokyo (2010)
Hirai, Y.: An intuitionistic epistemic logic for sequential consistency on shared memory. In: Clarke, E.M., Voronkov, A. (eds.) LPAR 2010. LNCS (LNAI), vol. 6355, pp. 272–289. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-17511-4_16
Lamport, L.: The part-time parliament. ACM Trans. Comput. Syst. 16(2), 133–169 (1998)
Lundeberg, M.B.: Advisory: secret size attack on cross-chain hash lock smart contracts (2018). https://gist.github.com/markblundeberg/7a932c98179de2190049f5823907c016. Accessed 07 Mar 2018
Luu, L., Chu, D.H., Olickel, H., Saxena, P., Hobor, A.: Making smart contracts smarter. In: CCS 2016, pp. 254–269. ACM (2016)
Luu, L., Narayanan, V., Zheng, C., Baweja, K., Gilbert, S., Saxena, P.: A secure sharding protocol for open blockchains. In: Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security, pp. 17–30. CCS 2016. ACM (2016)
Nakamoto, S.: Bitcoin: a peer-to-peer electronic cash system (2008). https://bitcoin.org/bitcoin.pdf. Accessed 20 Mar 2018
Nikolic, I., Kolluri, A., Sergey, I., Saxena, P., Hobor, A.: Finding the greedy, prodigal, and suicidal contracts at scale. ArXiv e-prints (2018)
Nolan, T.: Re: Alt chains and atomic transfers (2013). https://bitcointalk.org/index.php?topic=193281.msg2224949#msg2224949. Accessed 12 Mar 2018
Poon, J., Buterin, V.: Plasma: scalable autonomous smart contracts (2017). https://plasma.io/plasma.pdf. Accessed 07 Mar 2018
Sergey, I., Hobor, A.: A concurrent perspective on smart contracts. In: Brenner, M., et al. (eds.) FC 2017. LNCS, vol. 10323, pp. 478–493. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-70278-0_30
Troelstra, A.S., Van Dalen, D.: Constructivism in Mathematics: An Introduction, vol. 1. Elsevier, Amsterdam (1988)
Wood, G.: Polkadot: vision for a heterogeneous multi-chain framework (2016). https://github.com/w3f/polkadot-white-paper/blob/master/PolkaDotPaper.pdf. Accessed 07 Mar 2018
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2018 Springer Nature Switzerland AG
About this paper
Cite this paper
Hirai, Y. (2018). Blockchains as Kripke Models: An Analysis of Atomic Cross-Chain Swap. In: Margaria, T., Steffen, B. (eds) Leveraging Applications of Formal Methods, Verification and Validation. Industrial Practice. ISoLA 2018. Lecture Notes in Computer Science(), vol 11247. Springer, Cham. https://doi.org/10.1007/978-3-030-03427-6_29
Download citation
DOI: https://doi.org/10.1007/978-3-030-03427-6_29
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-03426-9
Online ISBN: 978-3-030-03427-6
eBook Packages: Computer ScienceComputer Science (R0)