Abstract
Blockchain technology provides a platform for the decentralized execution of smart contracts. A smart contract is an agreement that is automatically executed when certain conditions are met. Current smart contracts use business rules to express conditions in which transactions occur but lack the capability to reason over time. We present a model-driven approach for creating blockchain applications that can run temporal logic. We present the new concepts required at the model level and explain how these concepts can be translated to a blockchain solution applying Hyperledger Fabric, Hyperledger Composer, and PROTON complex event processing. We illustrate the approach using a pharma cold chain scenario. Cold chain scenarios are typical examples of blockchain cases in which temporal reasoning is required. Here, the blockchain provides transparency, a non-repudiation process, full traceability and trackability of the transactions (provenance), shorter lead times, and authentication and verification of the parties in the supply chain network at each asset transfer. The temporal reasoning is required since decisions about pharmaceutical quality is based on time windows in which the goods have been exposed to certain conditions. Our solution includes the model, the blockchain backend, and a mobile user interface that allows each certified and authorized party in the network to initiate actions, finish their transactions, and track progress. It also includes temperature monitoring to ensure compliance with the proper conditions for transportation and asset transfer.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Szabo, N.: Smart Contracts: Building Blocks for Digital Markets (1997)
Stark, J.: Making sense of blockchain smart contracts. In: Coindesk.Com (2016). http://www.coindesk.com/making-sense-smart-contracts/. Accessed 5 Jan 2019
Hyperledger Fabric. https://www.hyperledger.org/projects/fabric. Accessed 5 Jan 2019
Hyperledger Composer. https://www.hyperledger.org/projects/composer. Accessed 5 Jan 2019
Hyperledger: blockchain collaboration changing the business world. https://www.ibm.com/blockchain/hyperledger.html. Accessed 5 Jan 2019
Swanson, T.: Consensus-as-a-service: A brief report on the emergence of permissioned, distributed edger systems. http://www.ofnumbers.com/wp-content/uploads/2015/04/Permissioned-distributed-ledgers.pdf. Accessed 5 Jan 2019
Gupta, S.: HFS top 10 blockchain platforms, HFS Research report, November 2018
Welcome to Hyperledger Composer. https://hyperledger.github.io/composer/latest/introduction/introduction.html. Accessed 5 Jan 2019
Gaur, N., Desrosiers, L., Ramakrishna, V., Novotny, P., Baset, S.A., O’Dowd, A.: Hands-On Blockchain with Hyperledger. Packt Publishing Ltd, Birmingham (2018)
Etzion, O., Niblett, P.: Event Processing in Action. Manning Publications Company, Shelter Island (2010)
WHO: One in 10 medical products in low and middle-income countries are fake. https://www.nation.co.ke/news/Fake-medicine-circulating-in-low-and-middle-income-countries/1056-4207960-14swirrz/index.html. Accessed 3 Jan 2019
Etzion, O., Fournier, F., Skarbovsky, I., von Halle, B.A.: model driven approach for event processing applications. In: Proceedings of the 10th ACM International Conference on Distributed and Event-based Systems (DEBS16), pp. 81–92 (2016). https://dl.acm.org/citation.cfm?id=2933268
Bodenstein, C., Lohse, F., Zimmermann, A.: Executable specifications for model-based development of automotive software. In: SMC 2010, pp. 727–732 (2010)
Brambilla, M., Cabot, J., Wimmer, M.: Model Driven Software Engineering in Practice. Morgan & Claypool, San Rafael (2012)
Cugola, G., Margara, A.: Processing flows of information: from data stream to complex event processing. ACM Comput. Surv. (CSUR) 44(3), 15 (2012)
Dindar, N., Tatbul, N., Miller, R.J., Haas, L.M., Botan, I.: Modeling the execution semantics of stream processing engines with SECRET. VLDB J. (VLDB) 22(4), 421–446 (2013)
Bragaglia, S., Chesani, F., Mello, P., Sottara, D.: A rule-based calculus and processing of complex events. In: Bikakis, A., Giurca, A. (eds.) RuleML 2012. LNCS, vol. 7438, pp. 151–166. Springer, Heidelberg (2012). https://doi.org/10.1007/978-3-642-32689-9_12
Marquardt, N., Gross, T., Sheelagh, M., Carpendale, T., Greenberg, S.: Revealing the invisible: visualizing the location and event flow of distributed physical devices. In: Tangible and Embedded Interaction, pp. 41–48 (2010)
Kowalski, R.A.: Logic programing in artificial intelligence. In: IJCAI, pp. 596–604 (1991)
Ethereum. https://www.ethereum.org/. Accessed 5 Jan 2019
Boogaard, K.: A model-driven approach to smart contract development, master thesis (2018)
Frantz, C.K., Nowostawski, M.: From institutions to code: towards automated generation of smart contracts. In: IEEE 1st International Workshops on Foundations and Applications of Self* Systems, pp. 210–215 (2016)
Acknowledgments
Authors of this paper have received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement No 780732 (BOOST 4.0).
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2019 Springer Nature Switzerland AG
About this paper
Cite this paper
Fournier, F., Skarbovsky, I. (2019). Enriching Smart Contracts with Temporal Aspects. In: Joshi, J., Nepal, S., Zhang, Q., Zhang, LJ. (eds) Blockchain – ICBC 2019. ICBC 2019. Lecture Notes in Computer Science(), vol 11521. Springer, Cham. https://doi.org/10.1007/978-3-030-23404-1_9
Download citation
DOI: https://doi.org/10.1007/978-3-030-23404-1_9
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-23403-4
Online ISBN: 978-3-030-23404-1
eBook Packages: Computer ScienceComputer Science (R0)