Taming callbacks for smart contract modularity
Elvira Albert, Shelly Grossman, Noam Rinetzky, Clara Rodríguez-Núñez, Albert Rubio, Mooly Sagiv
摘要
Callbacks are an effective programming discipline for implementing event-driven programming, especially in environments like Ethereum which forbid shared global state and concurrency. Callbacks allow a callee to delegate the execution back to the caller. Though effective, they can lead to subtle mistakes principally in open environments where callbacks can be added in a new code. Indeed, several high profile bugs in smart contracts exploit callbacks. We present the first static technique ensuring modularity in the presence of callbacks and apply it to verify prominent smart contracts. Modularity ensures that external calls to other contracts cannot affect the behavior of the contract. Importantly, modularity is guaranteed without restricting programming.
In general, checking modularity is undecidableÐeven for programs without loops. This paper describes an effective technique for soundly ensuring modularity harnessing SMT solvers. The main idea is to define a constructive version of modularity using commutativity and projection operations on program segments. We believe that this approach is also accessible to programmers, since counterexamples to modularity can be generated automatically by the SMT solvers, allowing programmers to understand and fix the error.
We implemented our approach in order to demonstrate the precision of the modularity analysis and applied it to real smart contracts, including a subset of the 150 most active contracts in Ethereum. Our implementation decompiles bytecode programs into an intermediate representation and then implements the modularity checking using SMT queries. Overall, we argue that our experimental results indicate that the method can be applied to many realistic contracts, and that it is able to prove modularity where other methods fail.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了最后一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
引用它的顶会 Paper9
- Compositional Security for Reentrant ApplicationsEthan Cecchetti, Siqiu Yao, Haobin Ni, Andrew C. MyersS&P 2021 · 被引用 42 次
- Rich specifications for Ethereum smart contract verificationChristian Bräm, Marco Eilers, Peter Müller, Robin Sierra 等OOPSLA 2021 · 被引用 23 次
- Symbolic value-flow static analysis: deep, precise, complete modeling of Ethereum smart contractsYannis Smaragdakis, Neville Grech, Sifis Lagouvardos, Konstantinos Triantafyllou 等OOPSLA 2021 · 被引用 18 次
- Consolidating Smart Contracts with Behavioral ContractsGuannan Wei, Danning Xie, Wuqi Zhang, Yongwei Yuan 等PLDI 2024 · 被引用 6 次
- FORAY: Towards Effective Attack Synthesis against Deep Logical Vulnerabilities in DeFi ProtocolsHongbo Wen, Hanzhi Liu, Jiaxin Song, Yanju Chen 等CCS 2024 · 被引用 6 次
它引用的顶会 Paper7
- Making Smart Contracts SmarterLoi Luu, Duc-Hiep Chu, Hrishi Olickel, Prateek Saxena 等CCS 2016 · 被引用 2,306 次
- Securify: Practical Security Analysis of Smart ContractsPetar Tsankov, Andrei Marian Dan, Dana Drachsler-Cohen, Arthur Gervais 等CCS 2018 · 被引用 1,108 次
- Sereum: Protecting Existing Smart Contracts Against Re-Entrancy AttacksMichael Rodler, Wenting Li, Ghassan O. Karame, Lucas DaviNDSS 2019 · 被引用 298 次
- Ethainter: a smart contract security analyzer for composite vulnerabilitiesLexi Brent, Neville Grech, Sifis Lagouvardos, Bernhard Scholz 等PLDI 2020 · 被引用 163 次
- Securing smart contract with runtime validationAo Li, Jemin Andrew Choi, Fan LongPLDI 2020 · 被引用 60 次
相关 Paper
- eThor: Practical and Provably Sound Static Analysis of Ethereum Smart ContractsClara Schneidewind, Ilya Grishchenko, Markus Scherer, Matteo MaffeiCCS 2020 · 被引用 9 次
- FairChecker: Detecting Fund-Stealing Bugs in DeFi Protocols via Fairness ValidationYi Sun, Zhuo Zhang, Xiangyu ZhangICSE 2025
- Practical Verification of Smart Contracts using Memory SplittingShelly Grossman, John Toman, Alexander Bakst, Sameer Arora 等OOPSLA 2024 · 被引用 7 次
- Targeted greybox fuzzing with static lookahead analysisValentin Wüstholz, Maria ChristakisICSE 2020 · 被引用 14 次
- VERISMART: A Highly Precise Safety Verifier for Ethereum Smart ContractsSunbeom So, Myungho Lee, Jisu Park, Heejo Lee 等S&P 2020 · 被引用 133 次
