An Event-B Based Approach for Formal Modelling and Verification of Smart Contracts

While smart contracts are becoming widely recognized as the most successful application of the blockchain technology that could be applied into various industries and for different purposes such as e-commerce, energy tradings, assets management, and healthcare services, their implementation has posed several challenges insofar that they could handle large amount of money and digital assets in addition to their ability to manipulate critical data and transactions related information which makes them attractive targets of security threats and attacks that could lead to significant problems like money losses, privacy leakage and data breach. To better deal with such issues, reasoning about the correctness, the safety and the functional accuracy of smart contracts before their deployment on the blockchain network is critical and no important than ever. In this context model checking tools are well adopted for the formal verification of smart contracts in order to assure their execution as parties’ willingness as well as their reliable and secure interaction with users. In this direction, this paper uses Event-B formal verification method to formally model solidity written smart contracts in order to verify and validate their safety, correctness and functional accuracy in addition to their compliance with their specification for given behaviors. The verification is conducted using a model checking tool along which expected safety properties are formalized, validated and judged to be satisfied or unsatisfied. To illustrate the proposed approach, its application to a realistic industrial use case is described.

[1]  Michael J. Butler,et al.  ProB: an automated analysis toolset for the B method , 2008, International Journal on Software Tools for Technology Transfer.

[2]  Edmund M. Clarke,et al.  Model Checking , 1999, Handbook of Automated Reasoning.

[3]  Rahma Ben Ayed,et al.  Formalizing Railway Signaling System ERTMS/ETCS Using UML/Event-B , 2018, MEDI.

[4]  Jean-Raymond Abrial,et al.  Modeling in event-b - system and software engineering by Jean-Raymond Abrial , 2010, SOEN.

[5]  Sidney Amani,et al.  Towards verifying ethereum smart contract bytecode in Isabelle/HOL , 2018, CPP.

[6]  Abderrahim Ait Wakrime,et al.  Formalising the Requirements of an E-Voting Software Product Line Using Event-B , 2018, 2018 IEEE 27th International Conference on Enabling Technologies: Infrastructure for Collaborative Enterprises (WETICE).

[7]  Sukrit Kalra,et al.  ZEUS: Analyzing Safety of Smart Contracts , 2018, NDSS.

[8]  Massimo Bartoletti,et al.  A Survey of Attacks on Ethereum Smart Contracts (SoK) , 2017, POST.

[9]  Zibin Zheng,et al.  An Overview of Blockchain Technology: Architecture, Consensus, and Future Trends , 2017, 2017 IEEE International Congress on Big Data (BigData Congress).

[10]  R. Monfared,et al.  Blockchain ready manufacturing supply chain using distributed ledger , 2016 .

[11]  Emilio Tuosto,et al.  Validation of Decentralised Smart Contracts Through Game Theory and Formal Methods , 2015, Programming Languages with Applications to Biology and Security.

[12]  Nikhil Swamy,et al.  Formal Verification of Smart Contracts: Short Paper , 2016, PLAS@CCS.

[13]  Michael J. Butler,et al.  ProB: A Model Checker for B , 2003, FME.

[14]  Pierre-Yves Piriou,et al.  Model-Checking of Smart Contracts , 2018, 2018 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).

[15]  Anis Laouiti,et al.  DRMF: A Distributed Resource Management Framework for Industry 4.0 Environments , 2019, 2019 IEEE 18th International Symposium on Network Computing and Applications (NCA).

[16]  Jing Liu,et al.  A Survey on Security Verification of Blockchain Smart Contracts , 2019, IEEE Access.

[17]  Kei-Léo Brousmiche,et al.  Formal Verification of Smart Contracts Based on Users and Blockchain Behaviors Models , 2018, 2018 9th IFIP International Conference on New Technologies, Mobility and Security (NTMS).

[18]  Prateek Saxena,et al.  Making Smart Contracts Smarter , 2016, IACR Cryptol. ePrint Arch..