A Semantic Framework for the Security Analysis of Ethereum Smart Contracts

被引:174
|
作者
Grishchenko, Ilya [1 ]
Maffei, Matteo [1 ]
Schneidewind, Clara [1 ]
机构
[1] TU Wien, Vienna, Austria
来源
基金
欧洲研究理事会;
关键词
D O I
10.1007/978-3-319-89722-6_10
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
Smart contracts are programs running on cryptocurrency (e.g., Ethereum) blockchains, whose popularity stem from the possibility to perform financial transactions, such as payments and auctions, in a distributed environment without need for any trusted third party. Given their financial nature, bugs or vulnerabilities in these programs may lead to catastrophic consequences, as witnessed by recent attacks. Unfortunately, programming smart contracts is a delicate task that requires strong expertise: Ethereum smart contracts are written in Solidity, a dedicated language resembling JavaScript, and shipped over the blockchain in the EVM bytecode format. In order to rigorously verify the security of smart contracts, it is of paramount importance to formalize their semantics as well as the security properties of interest, in particular at the level of the bytecode being executed. In this paper, we present the first complete small-step semantics of EVM bytecode, which we formalize in the F* proof assistant, obtaining executable code that we successfully validate against the official Ethereum test suite. Furthermore, we formally define for the first time a number of central security properties for smart contracts, such as call integrity, atomicity, and independence from miner controlled parameters. This formalization relies on a combination of hyper- and safety properties. Along this work, we identified various mistakes and imprecisions in existing semantics and verification tools for Ethereum smart contracts, thereby demonstrating once more the importance of rigorous semantic foundations for the design of security verification techniques.
引用
收藏
页码:243 / 269
页数:27
相关论文
共 50 条
  • [1] A security framework for Ethereum smart contracts
    Lopez Vivar, Antonio
    Sandoval Orozco, Ana Lucila
    Garcia Villalba, Luis Javier
    COMPUTER COMMUNICATIONS, 2021, 172 : 119 - 129
  • [2] An Extensive Security Analysis on Ethereum Smart Contracts
    Ashouri, Mohammadreza
    SECURITY AND PRIVACY IN COMMUNICATION NETWORKS, SECURECOMM 2021, PT I, 2021, 398 : 144 - 163
  • [3] Security Vulnerabilities in Ethereum Smart Contracts
    Dika, Ardit
    Nowostawski, Mariusz
    IEEE 2018 INTERNATIONAL CONGRESS ON CYBERMATICS / 2018 IEEE CONFERENCES ON INTERNET OF THINGS, GREEN COMPUTING AND COMMUNICATIONS, CYBER, PHYSICAL AND SOCIAL COMPUTING, SMART DATA, BLOCKCHAIN, COMPUTER AND INFORMATION TECHNOLOGY, 2018, : 955 - 962
  • [4] Security Vulnerabilities in Ethereum Smart Contracts
    Mense, Alexander
    Flatscher, Markus
    IIWAS2018: THE 20TH INTERNATIONAL CONFERENCE ON INFORMATION INTEGRATION AND WEB-BASED APPLICATIONS & SERVICES, 2014, : 375 - 380
  • [5] Security Issues of Smart Contracts in Ethereum Platforms
    Krupa, Tomas
    Ries, Michal
    Kotuliak, Ivan
    Kostal, Kristi'an
    Bencel, Rastislav
    PROCEEDINGS OF THE 28TH CONFERENCE OF OPEN INNOVATIONS ASSOCIATION FRUCT, 2021, : 208 - 214
  • [6] A Framework and DataSet for Bugs in Ethereum Smart Contracts
    Zhang, Pengcheng
    Xiao, Feng
    Luo, Xiapu
    2020 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE AND EVOLUTION (ICSME 2020), 2020, : 139 - 150
  • [7] A Modeling and Verification Framework for Ethereum Smart Contracts
    Valentini, Simone
    Braghin, Chiara
    Riccobene, Elvinia
    RIGOROUS STATE-BASED METHODS, ABZ 2024, 2024, 14759 : 201 - 207
  • [8] S-GRAM: Towards Semantic-Aware Security Auditing for Ethereum Smart Contracts
    Liu, Han
    Liu, Chao
    Zhao, Wenqi
    Jiang, Yu
    Sun, Jiaguang
    PROCEEDINGS OF THE 2018 33RD IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMTED SOFTWARE ENGINEERING (ASE' 18), 2018, : 814 - 819
  • [9] Automated Inference on Financial Security of Ethereum Smart Contracts
    Wang, Wansen
    Huang, Wenchao
    Meng, Zhaoyi
    Xiong, Yan
    Miao, Fuyou
    Fang, Xianjin
    Tu, Caichang
    Ji, Renjie
    PROCEEDINGS OF THE 32ND USENIX SECURITY SYMPOSIUM, 2023, : 3367 - 3383
  • [10] Smart Contracts: Security Patterns in the Ethereum Ecosystem and Solidity
    Woehrer, Maximilian
    Zdun, Uwe
    2018 IEEE 1ST INTERNATIONAL WORKSHOP ON BLOCKCHAIN ORIENTED SOFTWARE ENGINEERING (IWBOSE), 2018, : 2 - 8