Abstract
Smart contracts are a means of facilitating, verifying and enforcing digital agreements. Blockchain technology, which includes an inherent consensus mechanism and programming languages, enables the concept of smart contracts. However, smart contracts written in an existing language, such as Solidity, Vyper, and others, are difficult for domain stakeholders and programmers to understand in order to develop code efficiently and without error, owing to a conceptual gap between the contractual provisions and the respective code. Our study addresses the problem by creating smart legal contract markup language (SLCML), an XML-based smart-contract language with pattern and transformation rules that automatically convert XML code to the Solidity language. In particular, we develop an XML schema (SLCML schema) that is used to instantiate any type of business contract understandable to IT and non-IT practitioners and is processed by computers. To reduce the effort and risk associated with smart contract development, we advocate a pattern for converting SLCML contracts to Solidity smart contracts, a smart contractual oriented computer language. We exemplify and assess our SLCML and transformation approach by defining a dairy supply chain contract based on real-world data.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
shorturl.at/uBHR6.
- 2.
- 3.
shorturl.at/gxFKT.
References
Nakamoto, S., Bitcoin, A.: A peer-to-peer electronic cash system. Bitcoin 4 (2008). https://bitcoin.org/bitcoin.pdf
Genestier, P., Zouarhi, S., Limeux, P., Excoffier, D., Prola, A., Sandon, S., Temerson, J.M.: Blockchain for consent management in the ehealth environment: a nugget for privacy and security challenges. J. Inter. Soc. Telemed. eHealth 5, (GKR);e24:(1–4) (Apr 2017), https://journals.ukzn.ac.za/index.php/JISfTeH/article/view/269
Szabo, N.: Smart contracts. Unpublished manuscript (1994)
Efanov, D., Roschin, P.: The all-pervasiveness of the blockchain technology. Proced. Comput. Sci. 123, 116–121 (2018)
Miraz, M.H., Ali, M.: Applications of blockchain technology beyond cryptocurrency. Ann. Emerg. Technol. Comput. 2(1), 1–6 (2018)
Porru, S., Pinna, A., Marchesi, M., Tonelli, R.: Blockchain-oriented software engineering: challenges and new directions. In: 2017 IEEE/ACM 39th International Conference on Software Engineering Companion (ICSE-C), pp. 169–171 (2017). https://doi.org/10.1109/ICSE-C.2017.142
Dannen, C.: Introducing Ethereum and Solidity, vol. 318. Springer (2017)
Boudjema, E.H., Verlan, S., Mokdad, L., Faure, C.: Vyper: vulnerability detection in binary code. Secur. Priv. 3(2), e100 (2020)
Dwivedi, V., Deval, V., Dixit, A., Norta, A.: Formal-verification of smart-contract languages: a survey. In: Singh, M., Gupta, P., Tyagi, V., Flusser, J., Ören, T., Kashyap, R. (eds.) Advances in Computing and Data Sciences, pp. 738–747. Springer Singapore, Singapore (2019)
Regnath, E., Steinhorst, S.: Smaconat: smart contracts in natural language. In: 2018 Forum on Specification Design Languages (FDL), pp. 5–16 (2018). https://doi.org/10.1109/FDL.2018.8524068
Frantz, C.K., Nowostawski, M.: From institutions to code: towards automated generation of smart contracts. In: 2016 IEEE 1st International Workshops on Foundations and Applications of Self* Systems (FAS*W), pp. 210–215. IEEE (2016)
He, X., Qin, B., Zhu, Y., Chen, X., Liu, Y.: Spesc: a specification language for smart contracts. In: 2018 IEEE 42nd Annual Computer Software and Applications Conference (COMPSAC). vol. 1, pp. 132–137. IEEE (2018)
Dwivedi, V., Pattanaik, V., Deval, V., Dixit, A., Norta, A., Draheim, D.: Legally enforceable smart-contract languages: a systematic literature review. ACM Comput. Surv. 54(5) (2021). https://doi.org/10.1145/3453475
Chen, T., Ding, K., Hao, S., Li, G., Qu, J.: Batch-based traceability for pork: a mobile solution with 2d barcode technology. Food Control 107, 106770 (2020)
Howson, P.: Building trust and equity in marine conservation and fisheries supply chain management with blockchain. Marine Policy 115, 103873 (2020)
Caro, M.P., Ali, M.S., Vecchio, M., Giaffreda, R.: Blockchain-based traceability in agri-food supply chain management: a practical implementation. In: 2018 IoT Vertical and Topical Summit on Agriculture—Tuscany (IOT Tuscany). pp. 1–4 (2018). https://doi.org/10.1109/IOT-TUSCANY.2018.8373021
Aung, M.M., Chang, Y.S.: Traceability in a food supply chain: Safety and quality perspectives. Food Control 39, 172–184 (2014)
Moe, T.: Perspectives on traceability in food manufacture. Trends Food Sci. Technol. 9(5), 211–214 (1998)
Behnke, K., Janssen, M.: Boundary conditions for traceability in food supply chains using blockchain technology. Int. J. Inf. Manage. 52, 101969 (2020)
Casino, F., Kanakaris, V., Dasaklis, T.K., Moschuris, S., Rachaniotis, N.P.: Modeling food supply chain traceability based on blockchain technology. IFAC-PapersOnLine 52(13), 2728–2733 (2019). https://doi.org/10.1016/j.ifacol.2019.11.620, https://www.sciencedirect.com/science/article/pii/S2405896319316088. 9th IFAC Conference on Manufacturing Modelling, Management and Control MIM 2019
Solidity—Solidity 0.7.1 documentation, https://docs.soliditylang.org/en/v0.7.1/
Dwivedi, V., Norta, A., Wulf, A., Leiding, B., Saxena, S., Udokwu, C.: A formal specification smart-contract language for legally binding decentralized autonomous organizations. IEEE Access 9, 76069–76082 (2021). https://doi.org/10.1109/ACCESS.2021.3081926
Eshuis, R., Norta, A., Kopp, O., Pitkänen, E.: Service outsourcing with process views. IEEE Trans. Serv. Comput. 8(1), 136–154 (2015). https://doi.org/10.1109/TSC.2013.51
Norta, A., Ma, L., Duan, Y., Rull, A., Kõlvart, M., Taveter, K.: eContractual choreography-language properties towards cross-organizational business collaboration. J. Internet Serv. Appl. 6(1) (2015). https://doi.org/10.1186/s13174-015-0023-7
Frantz, C.K., Nowostawski, M.: From institutions to code: towards automated generation of smart contracts. In: 2016 IEEE 1st International Workshops on Foundations and Applications of Self* Systems (FAS*W), pp. 210–215 (2016). https://doi.org/10.1109/FAS-W.2016.53
Brahem, A., Messai, N., Sam, Y., Bhiri, S., Devogele, T., Gaaloul, W.: Blockchain’s fame reaches the execution of personalized touristic itineraries. In: 2019 IEEE 28th International Conference on Enabling Technologies: Infrastructure for Collaborative Enterprises (WETICE), pp. 186–191 (2019). https://doi.org/10.1109/WETICE.2019.00047
von Rosing, M., White, S., Cummins, F., de Man, H.: Business process model and notation-bpmn (2015)
He, X., Qin, B., Zhu, Y., Chen, X., Liu, Y.: Spesc: a specification language for smart contracts. In: 2018 IEEE 42nd Annual Computer Software and Applications Conference (COMPSAC). vol. 01, pp. 132–137 (2018). https://doi.org/10.1109/COMPSAC.2018.00025
Wöhrer, M., Zdun, U.: Domain specific language for smart contract development. In: IEEE International Conference on Blockchain and Cryptocurrency (2020). http://eprints.cs.univie.ac.at/6341/
López-Pintado, O., Dumas, M., García-Bañuelos, L., Weber, I.: Dynamic role binding in blockchain-based collaborative business processes. In: Giorgini, P., Weber, B. (eds.) Advanced Information Systems Engineering, pp. 399–414. Springer International Publishing, Cham (2019)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2022 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.
About this paper
Cite this paper
Dwivedi, V., Norta, A. (2022). Auto-generation of Smart Contracts from a Domain-Specific XML-Based Language. In: Satapathy, S.C., Peer, P., Tang, J., Bhateja, V., Ghosh, A. (eds) Intelligent Data Engineering and Analytics. Smart Innovation, Systems and Technologies, vol 266. Springer, Singapore. https://doi.org/10.1007/978-981-16-6624-7_54
Download citation
DOI: https://doi.org/10.1007/978-981-16-6624-7_54
Published:
Publisher Name: Springer, Singapore
Print ISBN: 978-981-16-6623-0
Online ISBN: 978-981-16-6624-7
eBook Packages: Intelligent Technologies and RoboticsIntelligent Technologies and Robotics (R0)