Abstract
Smart contract is an automated contract system based on blockchain technology, which is self-executing, tamper-evident and decentralized. The writing and analysis of smart contracts still face several challenges, including complex programming languages and potential security vulnerabilities. Natural Language Processing (NLP) as a discipline that studies the interaction between natural language and computers, can provide strong support for the development and analysis of smart contracts. This paper explores the cross-application of blockchain, smart contracts and NLP. First, this paper introduces the basic principles of blockchain technology and the concept of smart contracts. Then it points out the problems in the development process of smart contracts, and focuses on the analysis and summary of the relevant research results of NLP technology in the generation of smart contract code and annotation generation, and summarizes and analyzes the important role of NLP technology on the efficiency of smart contract development, the correctness, reliability, readability, and maintainability of the code. Secondly, for the security of smart contracts, the research related to smart contract vulnerability detection using NLP technology is summarized. Finally, the advantages, challenges and future development directions of combining natural language processing with blockchain smart contracts are pointed out to provide reference and inspiration for research and application in related fields.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Feng, Z., Boxuan, S., Wenbao, J.: A review of blockchain key technologies and application research. J. Netw. Inf. Secur. 4(4), 22–29 (2018)
Yuan, Y., Wang, F.Y.: Blockchain: the state of the art and future trends. Acta Autom. Sin. 42(4), 481–494 (2016)
Ouyang, L.W., Wang, S.H., Yuan, Y., et al.: Smart contracts: architecture and progress. J. Autom. 45(3), 445–457 (2019)
Zou, W., Lo, D., Kochhar, P.S., et al.: Smart contract development: challenges and opportunities. IEEE Trans. Software Eng. 47(10), 2084–2106 (2019)
Sayeed, S., Marco-Gisbert, H., Caira, T.: Smart contract: attacks and protections. IEEE Access 8, 24416–24427 (2020)
Wang, Z., Jin, H., Dai, W., et al.: Ethereum smart contract security research: survey and future research opportunities. Front. Comput. Sci. 15, 1–18 (2021)
Fu Liyu, L., Yiming, G.W., et al.: A review of blockchain technology research and its development. Comput. Sci. 49(6A), 447–461 (2022)
Zou, W., Lo, D., Kochhar, P.S., et al.: Smart contract development: challenges and opportunities. IEEE Trans. Softw. Eng. 47(10), 2084–2106 (2019)
Zheng, Z., Xie, S., Dai, H.N., et al.: An overview on smart contracts: challenges, advances and platforms. Futur. Gener. Comput. Syst. 105, 475–491 (2020)
Choudhury, O., Dhuliawala, M., Fay, N., et al.: Auto-translation of regulatory documents into smart contracts. IEEE Blockchain Initiative, (September), 1–5 (2018)
Yichen, G., Bin, Z., Zao, Z.: Research and implementation of automatic generation method of smart contracts for Ethernet. J. East China Normal Univ. (Nat. Sci.) (2020)
Tong, Y., Tan, W., Guo, J., et al.: Smart contract generation assisted by AI-based word segmentation. Appl. Sci. 12(9), 4773 (2022)
Hao, Z., Zhang, B., Mao, D., et al.: A novel method using LSTM-RNN to generate smart contracts code templates for improved usability. In: Multimedia Tools and Applications, pp. 1–31 (2023)
Liu, A., Hu, X., Wen, L., et al.: A comprehensive evaluation of ChatGPT's zero-shot Text-to-SQL capability. arXiv preprint arXiv:2303.13547 (2023)
Shi, C., Xiang, Y., Yu, J., et al.: Machine translation-based fine-grained comments generation for solidity smart contracts. Inf. Softw. Technol. 153, 107065 (2023)
Yang, Z., Keung, J., Yu, X., et al.: A multi-modal transformer-based code summarization approach for smart contracts. In: 2021 IEEE/ACM 29th International Conference on Program Comprehension (ICPC), pp. 1–12. IEEE (2021)
Atzei, N., Bartoletti, M., Cimoli, T.: A survey of attacks on ethereum smart contracts (sok). In: Principles of Security and Trust: 6th International Conference, POST 2017, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2017, Uppsala, Sweden, April 22–29, 2017, Proceedings, vol. 6, pp. 164–186. Springer, Berlin (2017)
Wood, G.: Ethereum: a secure decentralised generalised transaction ledger. Ethereum Project Yellow Paper 2014(151), 1–32 (2014)
BlockCAT. On the Parity multi-sig wallet attack (2017). https://medium.com/blockcat/on-the-parity-multi-sig-wallet-attack-83fb5e7f4b8c
Pretrov, S.: Another Parity wallet hack explained (2017). https://medium.com/@Pr0Ger/another-parity-wallet-hack-explained-847ca46a2e1c
Wikipedia. Poly network exploit (2023). https://en.wikipedia.org/wiki/Poly_Network_exploit
Yang, Z., Keung, J., Zhang, M., et al.: Smart contracts vulnerability auditing with multi-semantics. In: 2020 IEEE 44th Annual Computers, Software, and Applications Conference (COMPSAC), pp. 892–901. IEEE (2020)
Wu, H., Zhang, Z., Wang, S., et al.: Peculiar: smart contract vulnerability detection based on crucial data flow graph and pre-training techniques. In: 2021 IEEE 32nd International Symposium on Software Reliability Engineering (ISSRE), pp. 378–389. IEEE (2021)
Qian, C., Hu, T., Li, B.: A BiLSTM-attention model for detecting smart contract defects more accurately. In: 2022 IEEE 22nd International Conference on Software Quality, Reliability and Security (QRS), pp. 53–62. IEEE (2022)
Huang, J., Zhou, K., Xiong, A., Li, D.: Smart contract vulnerability detection model based on multi-task learning. Sensors 2022, 22 (1829). https://doi.org/10.3390/s22051829
Zhu, D., Yue, F., Pang, J., Zhou, X., Han, W., Liu, F.: Bytecode similarity detection of smart contract across optimization options and compiler versions based on triplet network. Electronics 11, 597 (2022). https://doi.org/10.3390/electronics11040597
Zhang, H., Zhang, W., Feng, Y., et al.: SVScanner: detecting smart contract vulnerabilities via deep semantic extraction. J. Inf. Secur. Appl. 75, 103484 (2023)
Jie, W., Chen, Q., Wang, J., et al.: A novel extended multimodal AI framework towards vulnerability detection in smart contracts. Inf. Sci. 636, 118907 (2023)
Kurtev, I., Bézivin, J., Jouault, F., et al.: Model-based DSL frameworks. In: Companion to the 21st ACM SIGPLAN Symposium on Object-Oriented Programming Systems, Languages, and Applications, pp. 602–616 (2006)
Fundamentals of DSL Technology. CRC Press (2005)
Mavridou, A., Laszka, A.: Designing secure ethereum smart contracts: A finite state machine based approach. In: International Conference on Financial Cryptography and Data Security, pp. 523–540. Springer (2018)
Hamdaqa, M., Metz, L.A.P., Qasse, I.: IContractML: a domain-specific language for modeling and deploying smart contracts onto multiple blockchain platforms. In: Proceedings of the 12th System Analysis and Modelling Conference, pp. 34–43 (2020)
Rahman, R., Liu, K., Kagal, L.: From legal agreements to blockchain smart contracts. In: 2020 IEEE International Conference on Blockchain and Cryptocurrency (ICBC), pp. 1–5. IEEE (2020)
Wöhrer, M., Zdun, U.: Domain specific language for smart contract development. In: 2020 IEEE International Conference on Blockchain and Cryptocurrency (ICBC), pp. 1–9. IEEE (2020)
Dwivedi, V., Norta, A., Wulf, A., et al.: A formal specification smart-contract language for legally binding decentralized autonomous organizations. IEEE Access 9, 76069–76082 (2021)
Tikhomirov, S., Voskresenskaya, E., Ivanitskiy, I., et al.: Smartcheck: static analysis of ethereum smart contracts. In: Proceedings of the 1st International Workshop on Emerging Trends in Software Engineering for Blockchain, pp. 9–16 (2018)
Kalra, S., Goel, S., Dhawan, M., et al.: Zeus: analyzing safety of smart contracts. In: Ndss, pp. 1–12 (2018)
Jiang, B., Liu, Y., Chan, W.K.: Contractfuzzer: Fuzzing smart contracts for vulnerability detection. In: 2018 33rd IEEE/ACM International Conference on Automated Software Engineering (ASE), pp. 259–269. IEEE (2018)
Acknowledgments
This work was supported in part by the National Key R&D Program of China (No. 2021YFB2700600); in part by the Finance Science and Technology Project of Hainan Province (No. ZDKJ2020009); in part by the National Natural Science Foundation of China (No. 62163011); in part by the Research Startup Fund of Hainan University under Grant KYQD(ZR)-21071.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2024 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.
About this paper
Cite this paper
Song, Z., Shen, P., Liu, C., Liu, C., Gao, H., Lei, H. (2024). A Survey on the Integration of Blockchain Smart Contracts and Natural Language Processing. In: Zhang, Y., Qi, L., Liu, Q., Yin, G., Liu, X. (eds) Proceedings of the 13th International Conference on Computer Engineering and Networks. CENet 2023. Lecture Notes in Electrical Engineering, vol 1127. Springer, Singapore. https://doi.org/10.1007/978-981-99-9247-8_46
Download citation
DOI: https://doi.org/10.1007/978-981-99-9247-8_46
Published:
Publisher Name: Springer, Singapore
Print ISBN: 978-981-99-9246-1
Online ISBN: 978-981-99-9247-8
eBook Packages: EngineeringEngineering (R0)