Formal Verification of Blockchain Smart Contract Based on Colored Petri Net Models









Abstract

A smart contract is a computer protocol intended to digitally facilitate and enforce the negotiation of a contract in undependable environment. However, the number of attacks using the vulnerabilities of the smart contracts is also growing in recent years. Many solutions have been proposed in order to deal with them, such as documenting vulnerabilities or setting the security strategies. Among them, the most influential progress is made by the formal verification method. In this paper, we propose a formal verification method based on Colored Petri Nets (CPN) to verify smart contracts in blockchain system. First, we develop the smart contract models with possible attacker models based on hierarchical CPN modeling, then the smart contract models are executed by step-by-step simulation to validate their functional correctness, and finally we utilize the branch timing logic ASK-CTL based model checking technology in the CPN tools to detect latent vulnerabilities in smart contracts. We demonstrate that our CPN modeling based verification method can not only detect the logical vulnerabilities of the smart contract, but also consider the impacts of users behavior to find out potential non-logical vulnerabilities in the contracts, such as the vulnerabilities caused by the limitations of the Solidity language.


Modules


Algorithms

Cryptography


Software And Hardware

• Hardware: Processor: i3 ,i5 or more RAM: 4GB or more Hard disk: 16 GB or more • Software: Operating System : Windows2000/XP/7/8/10 Apache Tomcat server Frontend :-Java(Jsp/Servlet) Backend:- MYSQL Eclipse,geth