Auto-generation of Smart Contracts from a Domain-Specific XML-Based Language

  • Conference paper
  • First Online:
Intelligent Data Engineering and Analytics

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
EUR 32.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or Ebook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (Canada)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 189.00
Price excludes VAT (Canada)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 249.99
Price excludes VAT (Canada)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free ship** worldwide - see info
Hardcover Book
USD 249.99
Price excludes VAT (Canada)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free ship** worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

Notes

  1. 1.

    shorturl.at/uBHR6.

  2. 2.

    Liquid Studio—Home.

  3. 3.

    shorturl.at/gxFKT.

References

  1. Nakamoto, S., Bitcoin, A.: A peer-to-peer electronic cash system. Bitcoin 4 (2008). https://bitcoin.org/bitcoin.pdf

  2. 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

  3. Szabo, N.: Smart contracts. Unpublished manuscript (1994)

    Google Scholar 

  4. Efanov, D., Roschin, P.: The all-pervasiveness of the blockchain technology. Proced. Comput. Sci. 123, 116–121 (2018)

    Article  Google Scholar 

  5. Miraz, M.H., Ali, M.: Applications of blockchain technology beyond cryptocurrency. Ann. Emerg. Technol. Comput. 2(1), 1–6 (2018)

    Article  Google Scholar 

  6. 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

  7. Dannen, C.: Introducing Ethereum and Solidity, vol. 318. Springer (2017)

    Google Scholar 

  8. Boudjema, E.H., Verlan, S., Mokdad, L., Faure, C.: Vyper: vulnerability detection in binary code. Secur. Priv. 3(2), e100 (2020)

    Google Scholar 

  9. 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)

    Chapter  Google Scholar 

  10. 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

  11. 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)

    Google Scholar 

  12. 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)

    Google Scholar 

  13. 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

  14. 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)

    Article  Google Scholar 

  15. Howson, P.: Building trust and equity in marine conservation and fisheries supply chain management with blockchain. Marine Policy 115, 103873 (2020)

    Article  Google Scholar 

  16. 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

  17. Aung, M.M., Chang, Y.S.: Traceability in a food supply chain: Safety and quality perspectives. Food Control 39, 172–184 (2014)

    Article  Google Scholar 

  18. Moe, T.: Perspectives on traceability in food manufacture. Trends Food Sci. Technol. 9(5), 211–214 (1998)

    Article  Google Scholar 

  19. Behnke, K., Janssen, M.: Boundary conditions for traceability in food supply chains using blockchain technology. Int. J. Inf. Manage. 52, 101969 (2020)

    Article  Google Scholar 

  20. 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

  21. Solidity—Solidity 0.7.1 documentation, https://docs.soliditylang.org/en/v0.7.1/

  22. 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

    Article  Google Scholar 

  23. 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

    Article  Google Scholar 

  24. 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

  25. 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

  26. 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

  27. von Rosing, M., White, S., Cummins, F., de Man, H.: Business process model and notation-bpmn (2015)

    Google Scholar 

  28. 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

  29. 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/

  30. 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)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Vimal Dwivedi .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.

About this paper

Check for updates. Verify currency and authenticity via CrossMark

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

Publish with us

Policies and ethics

Navigation