{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,10,23]],"date-time":"2026-10-23T21:06:25Z","timestamp":1792789585599,"version":"4.5.0"},"reference-count":59,"publisher":"MDPI AG","issue":"2","license":[{"start":{"date-parts":[[2025,4,13]],"date-time":"2025-04-13T00:00:00Z","timestamp":1744502400000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"name":"National Social Science Fund of China","award":["24BGL111"],"award-info":[{"award-number":["24BGL111"]}]}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["JTAER"],"abstract":"<jats:p>As a novel decentralized computing paradigm, blockchain is expected to disrupt the existing e-commerce architecture and process. Secure smart contracts are the crucial foundation for e-commerce based on blockchain. However, vulnerabilities in smart contracts occur from time to time and cause significant financial losses in e-commerce. Some static verification methods have been developed to guarantee security for e-commerce smart contracts at design time, but they cannot support complex scenarios at runtime. As a lightweight verification method, runtime verification is a potential method for secure e-commerce smart contracts. The existing runtime verification methods are based on the manual instrument, which leads to additional overheads and gas consumption. To deal with this, we propose a passive learning-based runtime verification framework for e-commerce smart contracts. Firstly, by exploring the Genetic algorithm to evolve state merging and automaton reorganizing in order to simultaneously split time and gas behaviors, we propose a passive learning method to model runtime information for e-commerce smart contracts (PL4ESC). It directly learns P2TA (priced probabilistic timed automaton) from runtime traces without any prior knowledge. Then, we integrate PL4ESC with the open-source PAT (Process Analysis Toolkit) to automatically verify the security of runtime e-commerce smart contracts. The experiments show that PL4ESC is better at accuracy and precision than state-of-the-art passive learning methods. It improves accuracy by 1 to 4 percent compared to TAG and RTI+. As far as we know, it is not only the first learning method that can learn a P2TA from traces, but it is also the first automated runtime verification framework for e-commerce smart contracts. This will provide security guarantees for blockchain-based e-commerce.<\/jats:p>","DOI":"10.3390\/jtaer20020073","type":"journal-article","created":{"date-parts":[[2025,4,14]],"date-time":"2025-04-14T09:06:51Z","timestamp":1744621611000},"page":"73","update-policy":"https:\/\/doi.org\/10.3390\/mdpi_crossmark_policy","source":"Crossref","is-referenced-by-count":5,"title":["Automated Runtime Verification of Security for E-Commerce Smart Contracts"],"prefix":"10.3390","volume":"20","author":[{"given":"Yang","family":"Liu","sequence":"first","affiliation":[{"name":"Institute of Logistics Science and Engineering, Shanghai Maritime University, Shanghai 201306, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Shengjie","family":"Zhang","sequence":"additional","affiliation":[{"name":"Institute of Logistics Science and Engineering, Shanghai Maritime University, Shanghai 201306, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Yan","family":"Ma","sequence":"additional","affiliation":[{"name":"School of Accounting, Nanjing University of Finance and Economics, Nanjing 210023, China"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"1968","published-online":{"date-parts":[[2025,4,13]]},"reference":[{"key":"ref_1","doi-asserted-by":"crossref","first-page":"101331","DOI":"10.1016\/j.elerap.2023.101331","article-title":"Selling mode choice and blockchain adoption in an e-commerce platform with information disclosure","volume":"62","author":"Huang","year":"2023","journal-title":"Electron. Commer. Res. Appl."},{"key":"ref_2","doi-asserted-by":"crossref","first-page":"3245","DOI":"10.1287\/mnsc.2023.4851","article-title":"Supply chain transparency and blockchain design","volume":"70","author":"Cui","year":"2024","journal-title":"Manag. Sci."},{"key":"ref_3","doi-asserted-by":"crossref","unstructured":"Sun, L., Hua, G., Teunter, R.H., Cheng, T., and Shen, Z.M. (Prod. Oper. Manag., 2023). The effects of tokenization on ride-hailing blockchain platforms, Prod. Oper. Manag., early view.","DOI":"10.1111\/poms.14007"},{"key":"ref_4","doi-asserted-by":"crossref","unstructured":"Merlec, M.M., and In, H.P. (2024). DataMesh+: A Blockchain-Powered Peer-to-Peer Data Exchange Model for Self-Sovereign Data Marketplaces. Sensors, 24.","DOI":"10.3390\/s24061896"},{"key":"ref_5","doi-asserted-by":"crossref","unstructured":"Merlec, M.M., and In, H.P. (2024). Blockchain-Based Decentralized Storage Systems for Sustainable Data Self-Sovereignty: A Comparative Study. Sustainability, 16.","DOI":"10.3390\/su16177671"},{"key":"ref_6","doi-asserted-by":"crossref","first-page":"8060","DOI":"10.1109\/TEM.2024.3386575","article-title":"Blockchain Technology Application in an E-commerce Supply Chain: Privacy Protection and Sales Mode Selection","volume":"71","author":"Li","year":"2024","journal-title":"IEEE Trans. Eng. Manag."},{"key":"ref_7","doi-asserted-by":"crossref","unstructured":"Delmolino, K., Arnett, M., Kosba, A., Miller, A., and Shi, E. (2016, January 26). Step by step towards creating a safe smart contract: Lessons and insights from a cryptocurrency lab. Proceedings of the International Conference on Financial Cryptography and Data Security, Christ Church, Barbados.","DOI":"10.1007\/978-3-662-53357-4_6"},{"key":"ref_8","doi-asserted-by":"crossref","first-page":"24","DOI":"10.1007\/s10515-024-00418-z","article-title":"DL4SC: A novel deep learning-based vulnerability detection framework for smart contracts","volume":"31","author":"Liu","year":"2024","journal-title":"Autom. Softw. Eng."},{"key":"ref_9","doi-asserted-by":"crossref","unstructured":"Amani, S., B\u00e9gel, M., Bortin, M., and Staples, M. (2018, January 8\u20139). Towards verifying ethereum smart contract bytecode in Isabelle\/HOL. Proceedings of the 7th ACM SIGPLAN International Conference on Certified Programs and Proofs, Los Angeles, CA, USA.","DOI":"10.1145\/3167084"},{"key":"ref_10","doi-asserted-by":"crossref","unstructured":"He, J., Balunovi\u0107, M., Ambroladze, N., Tsankov, P., and Vechev, M. (2019, January 11\u201315). Learning to fuzz from symbolic execution with application to smart contracts. Proceedings of the ACM SIGSAC Conference on Computer and Communications Security, London, UK.","DOI":"10.1145\/3319535.3363230"},{"key":"ref_11","doi-asserted-by":"crossref","first-page":"101129","DOI":"10.1016\/j.pmcj.2020.101129","article-title":"Model checking smart contracts for Ethereum","volume":"63","author":"Osterland","year":"2020","journal-title":"Pervasive Mob. Comput."},{"key":"ref_12","doi-asserted-by":"crossref","first-page":"255","DOI":"10.1007\/s10009-021-00609-z","article-title":"A taxonomy for classifying runtime verification tools","volume":"23","author":"Falcone","year":"2021","journal-title":"Int. J. Softw. Tools Technol. Transf."},{"key":"ref_13","doi-asserted-by":"crossref","unstructured":"Abdellatif, T., and Brousmiche, K.L. (2018, January 26\u201328). Formal verification of smart contracts based on users and blockchain behaviors models. Proceedings of the 9th IFIP International Conference on New Technologies, Mobility and Security (NTMS), Paris, France.","DOI":"10.1109\/NTMS.2018.8328737"},{"key":"ref_14","doi-asserted-by":"crossref","unstructured":"Tolmach, P., Li, Y., Lin, S.W., and Liu, Y. (2021, January 5). Formal analysis of composable DeFi protocols. Proceedings of the International Workshop on Financial Cryptography and Data Security, Virtual Event.","DOI":"10.1007\/978-3-662-63958-0_13"},{"key":"ref_15","doi-asserted-by":"crossref","unstructured":"Mao, H., Chen, Y., Jaeger, M., Nielsen, T.D., Larsen, K.G., and Nielsen, B. (2011, January 5\u20138). Learning probabilistic automata for model checking. Proceedings of the 8th International Conference on Quantitative Evaluation of Systems, Aachen, Germany.","DOI":"10.1109\/QEST.2011.21"},{"key":"ref_16","doi-asserted-by":"crossref","first-page":"1","DOI":"10.1145\/3434296","article-title":"Learning the boundary of inductive invariants","volume":"5","author":"Feldman","year":"2021","journal-title":"Proc. ACM Program. Lang."},{"key":"ref_17","doi-asserted-by":"crossref","first-page":"86","DOI":"10.1145\/2967606","article-title":"Model learning","volume":"60","author":"Vaandrager","year":"2017","journal-title":"Commun. ACM"},{"key":"ref_18","doi-asserted-by":"crossref","unstructured":"Fiter\u0103u-Bro\u015ftean, P., Janssen, R., and Vaandrager, F. (2016, January 17\u201323). Combining model learning and model checking to analyze TCP implementations. Proceedings of the 28th International Conference on Computer Aided Verification, Toronto, ON, Canada.","DOI":"10.1007\/978-3-319-41540-6_25"},{"key":"ref_19","unstructured":"Tijssen, M., Poll, E., and de Ruiter, J. (2014). Automatic Modeling of SSH Implementations with State Machine Learning Algorithms. [Bachelor\u2019s Thesis, Radboud University]."},{"key":"ref_20","doi-asserted-by":"crossref","first-page":"790","DOI":"10.1109\/TITS.2018.2823418","article-title":"MOHA: A multi-mode hybrid automaton model for learning car-following behaviors","volume":"20","author":"Lin","year":"2018","journal-title":"IEEE Trans. Intell. Transp. Syst."},{"key":"ref_21","doi-asserted-by":"crossref","unstructured":"Lorenzoli, D., Mariani, L., and Pezz\u00e8, M. (2008, January 10\u201318). Automatic generation of software behavioral models. Proceedings of the 30th International Conference on Software Engineering, Leipzig, Germany.","DOI":"10.1145\/1368088.1368157"},{"key":"ref_22","doi-asserted-by":"crossref","unstructured":"Dong, G., Wang, J., Sun, J., Zhang, Y., Wang, X., Dai, T., Dong, J.S., and Wang, X. (2020, January 21\u201325). Towards interpreting recurrent neural networks through probabilistic abstraction. Proceedings of the 35th IEEE\/ACM International Conference on Automated Software Engineering (ASE), Melbourne, Australia.","DOI":"10.1145\/3324884.3416592"},{"key":"ref_23","doi-asserted-by":"crossref","first-page":"1063","DOI":"10.1109\/TPAMI.2005.143","article-title":"Learning deterministic finite automata with a smart state labeling evolutionary algorithm","volume":"27","author":"Lucas","year":"2005","journal-title":"IEEE Trans. Pattern Anal. Mach. Intell."},{"key":"ref_24","doi-asserted-by":"crossref","first-page":"104678","DOI":"10.1016\/j.ic.2020.104678","article-title":"A novel learning algorithm for B\u00fcchi automata based on family of DFAs and classification trees","volume":"281","author":"Li","year":"2021","journal-title":"Inf. Comput."},{"key":"ref_25","doi-asserted-by":"crossref","first-page":"26","DOI":"10.1016\/j.jlap.2011.06.001","article-title":"Generating counterexamples for quantitative safety specifications in probabilistic B","volume":"81","author":"Ndukwu","year":"2012","journal-title":"J. Log. Algebr. Program."},{"key":"ref_26","doi-asserted-by":"crossref","unstructured":"Cornanguer, L., Largou\u00ebt, C., Roz\u00e9, L., and Termier, A. (March, January 22). TAG: Learning Timed Automata from Logs. Proceedings of the 36th AAAI Conference on Artificial Intelligence (AAAI\u201922), Virtually.","DOI":"10.1609\/aaai.v36i4.20311"},{"key":"ref_27","doi-asserted-by":"crossref","unstructured":"Verwer, S., Weerdt, M., and Witteveen, C. (2010). A likelihood-ratio test for identifying probabilistic deterministic real-time automata from positive data. International Colloquium on Grammatical Inference, Springer.","DOI":"10.1007\/978-3-642-15488-1_17"},{"key":"ref_28","unstructured":"Liu, Y., Sun, J., and Dong, J.S. (December, January 29). PAT 3: An extensible architecture for building multi-domain model checkers. Proceedings of the 22nd Annual International Symposium on Software Reliability Engineering, Hiroshima, Japan."},{"key":"ref_29","doi-asserted-by":"crossref","first-page":"1","DOI":"10.1145\/3464421","article-title":"A survey of smart contract formal specification and verification","volume":"54","author":"Tolmach","year":"2021","journal-title":"ACM Comput. Surv."},{"key":"ref_30","doi-asserted-by":"crossref","unstructured":"Tsankov, P., Dan, A., Drachsler-Cohen, D., Gervais, A., Buenzli, F., and Vechev, M. (2018, January 15\u201319). Securify: Practical security analysis of smart contracts. Proceedings of the ACM SIGSAC Conference on Computer and Communications Security, Toronto, ON, Canada.","DOI":"10.1145\/3243734.3243780"},{"key":"ref_31","doi-asserted-by":"crossref","unstructured":"Kalra, S., Goel, S., Dhawan, M., and Sharma, S. (2018, January 18\u201321). Zeus: Analyzing safety of smart contracts. Proceedings of the Network and Distributed System Security Symposium, San Diego, CA, USA.","DOI":"10.14722\/ndss.2018.23082"},{"key":"ref_32","doi-asserted-by":"crossref","unstructured":"Antonino, P., and Roscoe, A.W. (2021, January 22\u201326). Solidifier: Bounded model checking solidity using lazy contract deployment and precise memory modelling. Proceedings of the 36th Annual ACM Symposium on Applied Computing (SAC\u201921), Virtual.","DOI":"10.1145\/3412841.3442051"},{"key":"ref_33","doi-asserted-by":"crossref","unstructured":"Hajdu, \u00c1., and Jovanovi\u0107, D. (2019, January 13\u201314). solc-verify: A modular verifier for solidity smart contracts. Proceedings of the 11th Working Conference on Verified Software: Theories, Tools, and Experiments, New York, NY, USA.","DOI":"10.1007\/978-3-030-41600-3_11"},{"key":"ref_34","doi-asserted-by":"crossref","unstructured":"Mossberg, M., Manzano, F., Hennenfent, E., Groce, A., Grieco, G., Feist, J., Brunson, T., and Dinaburg, A. (2019, January 11\u201315). Manticore: A user-friendly symbolic execution framework for binaries and smart contracts. Proceedings of the 34th IEEE\/ACM International Conference on Automated Software Engineering (ASE), San Diego, CA, USA.","DOI":"10.1109\/ASE.2019.00133"},{"key":"ref_35","unstructured":"Nehai, Z., Piriou, P.Y., and Daumas, F. (August, January 30). Model-checking of smart contracts. Proceedings of the IEEE International Conference on Internet of Things (iThings) and IEEE Green Computing and Communications (GreenCom) and IEEE Cyber, Physical and Social Computing (CPSCom) and IEEE Smart Data (SmartData), Halifax, NS, Canada."},{"key":"ref_36","doi-asserted-by":"crossref","unstructured":"Zupan, N., Kasinathan, P., Cuellar, J., and Sauer, M. (2020). Secure smart contract generation based on petri nets. Blockchain Technology for Industry 4.0, Springer.","DOI":"10.1007\/978-981-15-1137-0_4"},{"key":"ref_37","doi-asserted-by":"crossref","unstructured":"Azzopardi, S., Ellul, J., and Pace, G.J. (2018, January 10\u201313). Monitoring smart contracts: Contractlarva and open challenges beyond. Proceedings of the 18th International Conference on Runtime Verification, Limassol, Cyprus.","DOI":"10.1007\/978-3-030-03769-7_8"},{"key":"ref_38","doi-asserted-by":"crossref","unstructured":"Abraham, M., and Jevitha, K.P. (2019, January 12\u201313). Runtime verification and vulnerability testing of smart contracts. Proceedings of the International Conference on Advances in Computing and Data Sciences, Singapore.","DOI":"10.1007\/978-981-13-9942-8_32"},{"key":"ref_39","doi-asserted-by":"crossref","unstructured":"Azzopardi, S., Colombo, C., and Pace, G. (2021, January 25\u201327). Model-based static and runtime verification for ethereum smart contracts. Proceedings of the 9th International Conference on Model-Driven Engineering and Software Development, Vienna, Austria.","DOI":"10.1007\/978-3-030-67445-8_14"},{"key":"ref_40","doi-asserted-by":"crossref","first-page":"1","DOI":"10.1007\/s11704-019-9212-z","article-title":"Model learning: A survey of foundations, tools and applications","volume":"15","author":"Ali","year":"2021","journal-title":"Front. Comput. Sci."},{"key":"ref_41","doi-asserted-by":"crossref","first-page":"87","DOI":"10.1016\/0890-5401(87)90052-6","article-title":"Learning regular sets from queries and counterexamples","volume":"75","author":"Angluin","year":"1987","journal-title":"Inf. Comput."},{"key":"ref_42","doi-asserted-by":"crossref","unstructured":"Shahbaz, M., and Groz, R. (2009). Inferring mealy machines. International Symposium on Formal Methods, Springer.","DOI":"10.1007\/978-3-642-05089-3_14"},{"key":"ref_43","doi-asserted-by":"crossref","unstructured":"Jonsson, B. (2011, January 13\u201318). Learning of automata models extended with data. Proceedings of the International School on Formal Methods for the Design of Computer, Communication and Software Systems, Bertinoro, Italy.","DOI":"10.1007\/978-3-642-21455-4_10"},{"key":"ref_44","doi-asserted-by":"crossref","unstructured":"Cassel, S., Howar, F., Jonsson, B., and Steffen, B. (2014, January 1\u20135). Learning extended finite state machines. Proceedings of the 12th International Conference on Software Engineering and Formal Methods (SFFM 2014), Grenoble, France.","DOI":"10.1007\/978-3-319-10431-7_18"},{"key":"ref_45","first-page":"444","article-title":"Learning One-Clock Timed Automata","volume":"Volume 12078","author":"Biere","year":"2020","journal-title":"Tools and Algorithms for the Construction and Analysis of Systems. TACAS 2020"},{"key":"ref_46","doi-asserted-by":"crossref","unstructured":"Dupont, P. (1994). Regular grammatical inference from positive and negative samples by genetic search: The GIG method. International Colloquium on Grammatical Inference, Springer.","DOI":"10.1007\/3-540-58473-0_152"},{"key":"ref_47","doi-asserted-by":"crossref","unstructured":"Lang, K.J., Pearlmutter, B.A., and Price, R.A. (1998). Results of the abbadingo one DFA learning competition and a new evidence-driven state merging algorithm. Grammatical Inference, Springer.","DOI":"10.1007\/BFb0054059"},{"key":"ref_48","unstructured":"Lang, K. (1998). Evidence Driven State Merging with Search, NECI. Rapport technique TR98\u2013139."},{"key":"ref_49","doi-asserted-by":"crossref","first-page":"1","DOI":"10.1007\/s10009-019-00544-0","article-title":"Learning Moore machines from input\u2013output traces","volume":"23","author":"Giantamidis","year":"2021","journal-title":"Int. J. Softw. Tools Technol. Transf."},{"key":"ref_50","doi-asserted-by":"crossref","first-page":"811","DOI":"10.1007\/s10664-015-9367-7","article-title":"Inferring extended finite state machine models from software executions","volume":"21","author":"Walkinshaw","year":"2016","journal-title":"Empir. Softw. Eng."},{"key":"ref_51","unstructured":"Matos Pedro, A., Crocker, P.A., and Sousa, S.M. (2012, January 15\u201318). Learning stochastic timed automata from sample executions. Proceedings of the 5th International Conference on Leveraging Applications of Formal Methods, Verification and Validation: Technologies for Mastering Change-Volume Part I (ISoLA\u201912), Heraclion, Greece."},{"key":"ref_52","doi-asserted-by":"crossref","first-page":"255","DOI":"10.1007\/s10994-016-5565-9","article-title":"Learning deterministic probabilistic automata from a model checking perspective","volume":"105","author":"Mao","year":"2016","journal-title":"Mach. Learn."},{"key":"ref_53","doi-asserted-by":"crossref","unstructured":"Pastore, F., Micucci, D., and Mariani, L. (2017, January 13\u201317). Timed k-tail: Automatic inference of timed automata. Proceedings of the IEEE International Conference on Software Testing, Verification and Validation (ICST), Tokyo, Japan.","DOI":"10.1109\/ICST.2017.43"},{"key":"ref_54","doi-asserted-by":"crossref","first-page":"592","DOI":"10.1109\/TC.1972.5009015","article-title":"On the synthesis of finite-state machines from samples of their behavior","volume":"100","author":"Biermann","year":"1972","journal-title":"IEEE Trans. Comput."},{"key":"ref_55","doi-asserted-by":"crossref","unstructured":"Jurdzi\u0144ski, M., Kwiatkowska, M., Norman, G., and Trivedi, A. (2009). Concavely-priced probabilistic timed automata. CONCUR 2009-Concurrency Theory: 20th International Conference, CONCUR 2009, Bologna, Italy, 1\u20134 September 2009. Proceedings, Springer. Lecture Notes in Computer Science.","DOI":"10.1007\/978-3-642-04081-8_28"},{"key":"ref_56","unstructured":"Coste, F., and Nicolas, J. (1997, January 12). Regular inference as a graph coloring problem. Proceedings of the Workshop on Grammatical Inference, Automata Induction, and Language Acquisition (ICML\u201997), Nashville, TN, USA."},{"key":"ref_57","unstructured":"Guillaumier, K., and Abela, J. (2021, January 23\u201327). Learning DFAs by Evolving Short Sequences of Merges. Proceedings of the 15th International Conference on Grammatical Inference (ICGI\u201920), Online."},{"key":"ref_58","doi-asserted-by":"crossref","first-page":"59","DOI":"10.1049\/iet-sen.2019.0152","article-title":"Probabilistic analysis of QoS-aware service composition with explicit environment models","volume":"14","author":"Zhou","year":"2020","journal-title":"IET Softw."},{"key":"ref_59","doi-asserted-by":"crossref","first-page":"1162","DOI":"10.1002\/spe.2702","article-title":"Caterpillar: A business process execution engine on the Ethereum blockchain","volume":"49","author":"Dumas","year":"2019","journal-title":"Softw. Pract. Exp."}],"container-title":["Journal of Theoretical and Applied Electronic Commerce Research"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.mdpi.com\/0718-1876\/20\/2\/73\/pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,10,9]],"date-time":"2025-10-09T17:13:50Z","timestamp":1760030030000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.mdpi.com\/0718-1876\/20\/2\/73"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2025,4,13]]},"references-count":59,"journal-issue":{"issue":"2","published-online":{"date-parts":[[2025,6]]}},"alternative-id":["jtaer20020073"],"URL":"https:\/\/doi.org\/10.3390\/jtaer20020073","relation":{},"ISSN":["0718-1876"],"issn-type":[{"value":"0718-1876","type":"electronic"}],"subject":[],"published":{"date-parts":[[2025,4,13]]}}}