Formal Modeling and Verification of Smart Contracts with Spin

被引:6
作者
Yang, Zhe [1 ]
Dai, Meiyi [1 ]
Guo, Jian [2 ]
机构
[1] East China Normal Univ, MoE Engn Res Ctr Software Hardware Codesign Techn, Shanghai 200062, Peoples R China
[2] East China Normal Univ, Natl Trusted Embedded Software Engn Technol Res C, Shanghai 200062, Peoples R China
关键词
formal verification; LTL; model checking; smart contract; blockchain; Spin;
D O I
10.3390/electronics11193091
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
Smart contracts are the key software components to realize blockchain applications, from single encrypted digital currency to various fields. Due to the immutable nature of blockchain, any bugs or errors will become permanent once published and could lead to huge economic losses. Recently, a great number of security problems have been exposed in smart contracts. It is important to verify the correctness of smart contracts before they are deployed on the blockchain. This paper aims to verify the correctness of smart contracts in Ethereum transactions, and the model checker Spin is adopted for the formal verification of smart contracts in order to ensure their execution with respect to parties' willingness, as well as their reliable interaction with clients. In this direction, we propose a formal method to construct the models for smart contracts. Then, the method is applied to a study case in the Ethereum commodity market. Finally, a case model is implemented in Spin, which can simulate the process's execution and verify the properties that are abstracted from the requirements. Compared with existing techniques, formal analysis can verify whether smart contracts comply with the specifications for given behaviors and strengthen the credibility of smart contracts in the transaction.
引用
收藏
页数:18
相关论文
共 36 条
[1]   Verification of smart contracts: A survey [J].
Almakhour, Mouhamad ;
Sliman, Layth ;
Samhat, Abed Ellatif ;
Mellouk, Abdelhamid .
PERVASIVE AND MOBILE COMPUTING, 2020, 67
[2]  
Amani S, 2018, PROCEEDINGS OF THE 7TH ACM SIGPLAN INTERNATIONAL CONFERENCE ON CERTIFIED PROGRAMS AND PROOFS, CPP 2018, P66, DOI 10.1145/3167084
[3]   A Survey of Attacks on Ethereum Smart Contracts (SoK) [J].
Atzei, Nicola ;
Bartoletti, Massimo ;
Cimoli, Tiziana .
PRINCIPLES OF SECURITY AND TRUST (POST 2017), 2017, 10204 :164-186
[4]  
Baier C, 2008, PRINCIPLES OF MODEL CHECKING, P1
[5]   A Survey on Blockchain Interoperability: Past, Present, and Future Trends [J].
Belchior, Rafael ;
Vasconcelos, Andre ;
Guerreiro, Sergio ;
Correia, Miguel .
ACM COMPUTING SURVEYS, 2021, 54 (08)
[6]   Formal Verification of Smart Contracts Short Paper [J].
Bhargavan, Karthikeyan ;
Delignat-Lavaud, Antoine ;
Fournet, Cedric ;
Gollamudi, Anitha ;
Gonthier, Georges ;
Kobeissi, Nadim ;
Kulatova, Natalia ;
Rastogi, Aseem ;
Sibut-Pinote, Thomas ;
Swamy, Nikhil ;
Zanella-Beguelin, Santiago .
PROCEEDINGS OF THE 2016 ACM WORKSHOP ON PROGRAMMING LANGUAGES AND ANALYSIS FOR SECURITY (PLAS'16), 2016, :91-96
[7]   CHARACTERIZING FINITE KRIPKE STRUCTURES IN PROPOSITIONAL TEMPORAL LOGIC [J].
BROWNE, MC ;
CLARKE, EM ;
GRUMBERG, O .
THEORETICAL COMPUTER SCIENCE, 1988, 59 (1-2) :115-131
[8]  
Chen T, 2017, 2017 IEEE 24TH INTERNATIONAL CONFERENCE ON SOFTWARE ANALYSIS, EVOLUTION, AND REENGINEERING (SANER), P442, DOI 10.1109/SANER.2017.7884650
[9]  
Cimatti A., 2002, Computer Aided Verification, volume 2404 of Lecture Notes in Computer Science, P359, DOI DOI 10.1007/3-540-45657-0_29
[10]   Blockchain platform for industrial healthcare: Vision and future opportunities [J].
Farouk, Ahmed ;
Alahmadi, Amal ;
Ghose, Shohini ;
Mashatan, Atefeh .
COMPUTER COMMUNICATIONS, 2020, 154 :223-235