Journal of Applied Sciences ›› 2021, Vol. 39 ›› Issue (1): 1-16.doi: 10.3969/j.issn.0255-8297.2021.01.001

• Blockchain • Previous Articles    

Verification of Smart Contracts with Time Constraints

ZHAO Yingqi1,2, ZHU Xueyang1,2, LI Guangyuan1,2, GAO Ya1,2, BAO Yulong1,2   

  1. 1. State Key Laboratory of Computer Science, Institute of Software, Chinese Academy of Sciences, Beijing 100190, China;
    2. University of the Chinese Academy of Sciences, Beijing 100049, China
  • Received:2020-11-12 Published:2021-02-04

Abstract: In real life, a type of smart contract is closely related to time constraint, and whether the contract meets its time property will directly affect the correctness of its applications. In order to avoid serious problems after its deployment, this paper focuses on smart contracts of Ethereum, gives a timed automata semantics for smart contracts, after the smart contract is converted into a time automata model, and uses model checking tool UPPAAL to check whether the smart contract meets timed properties expressed by temporal logic formulas. Finally, we study two cases, an auction contract and a flight insurance contract. Experimental results indicate whether the real-time property is satisfied. If not, counter examples can be used to locate the problem points in the smart contract, showing the effectiveness of the work.

Key words: blockchain, smart contract, Solidity, time constraint, model checking

CLC Number: