Demystifying Loops in Smart Contracts
Benjamin Mariano, Yanju Chen, Yu Feng, Shuvendu K. Lahiri, Isil Dillig
摘要
This paper aims to shed light on how loops are used in smart contracts. Towards this goal, we study various syntactic and semantic characteristics of loops used in over 20,000 Solidity contracts deployed on the Ethereum blockchain, with the goal of informing future research on program analysis for smart contracts. Based on our findings, we propose a small domain-specific language (DSL) that can be used to summarize common looping patterns in Solidity. To evaluate what percentage of smart contract loops can be expressed in our proposed DSL, we also design and implement a program synthesis toolchain called Solis that can synthesize loop summaries in our DSL. Our evaluation shows that at least 56% of the analyzed loops can be summarized in our DSL, and 81% of these summaries are exactly equivalent to the original loop.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 12 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Improving Smart Contract Security with Contrastive Learning-based Vulnerability Detection 引用了 ZEUS: Analyzing Safety of Smart Contracts
- Improving Smart Contract Security with Contrastive Learning-based Vulnerability Detection 引用了 Making Smart Contracts Smarter
- Improving Smart Contract Security with Contrastive Learning-based Vulnerability Detection 引用了 Securify: Practical Security Analysis of Smart Contracts
- SolType: refinement types for arithmetic overflow in solidity 引用了 ZEUS: Analyzing Safety of Smart Contracts
- SolType: refinement types for arithmetic overflow in solidity 引用了 VerX: Safety Verification of Smart Contracts
- SolType: refinement types for arithmetic overflow in solidity 引用了 Making Smart Contracts Smarter
- SolType: refinement types for arithmetic overflow in solidity 引用了 Securify: Practical Security Analysis of Smart Contracts
- ZEUS: Analyzing Safety of Smart Contracts 引用了 Making Smart Contracts Smarter
- A study of inline assembly in solidity smart contracts 引用了 Securify: Practical Security Analysis of Smart Contracts
- WASAI: uncovering vulnerabilities in Wasm smart contracts 引用了 Making Smart Contracts Smarter
- Securify: Practical Security Analysis of Smart Contracts 引用了 ZEUS: Analyzing Safety of Smart Contracts
- Securify: Practical Security Analysis of Smart Contracts 引用了 Making Smart Contracts Smarter
引用它的顶会 Paper12
- Improving Smart Contract Security with Contrastive Learning-based Vulnerability DetectionYizhou Chen, Zeyu Sun, Zhihao Gong, Dan HaoICSE 2024 · 44 次引用
- WASAI: uncovering vulnerabilities in Wasm smart contractsWeimin Chen, Zihan Sun, Haoyu Wang, Xiapu Luo 等ISSTA 2022 · 43 次引用
- SolType: refinement types for arithmetic overflow in solidityBryan Tan, Benjamin Mariano, Shuvendu K. Lahiri, Isil Dillig 等POPL 2022 · 29 次引用
- Automated transpilation of imperative to functional code using neural-guided program synthesisBenjamin Mariano, Yanju Chen, Yu Feng, Greg Durrett 等OOPSLA 2022 · 27 次引用
- A study of inline assembly in solidity smart contractsStefanos Chaliasos, Arthur Gervais, Benjamin LivshitsOOPSLA 2022 · 22 次引用
它引用的 Paper4
- 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 次引用
- ZEUS: Analyzing Safety of Smart ContractsSukrit Kalra, Seep Goel, Mohan Dhawan, Subodh SharmaNDSS 2018 · 595 次引用
- VerX: Safety Verification of Smart ContractsAnton Permenev, Dimitar Dimitrov, Petar Tsankov, Dana Drachsler-Cohen 等S&P 2020 · 251 次引用
相关 Paper
- SmartIFSyn: Automated Information Flow Security Policy Synthesis for Smart ContractsYinghao Wu, Miaomiao Zhang, Fu Song, John W. Baugh Jr.FSE 2026
- Synthesis-powered optimization of smart contracts via data type refactoringYanju Chen, Yuepeng Wang, Maruth Goyal, James Dong 等OOPSLA 2022 · 14 次引用
- Securing smart contract with runtime validationAo Li, Jemin Andrew Choi, Fan LongPLDI 2020 · 60 次引用
- SolContractEval: A Benchmark for Evaluating Contract-Level Solidity Code GenerationZhifan Ye, Jiachi Chen, Zhenzhe Shao, Lingfeng Bao 等ASE 2025
- Declarative smart contractsHaoxian Chen, Gerald Whitters, Mohammad Javad Amiri, Yuepeng Wang 等FSE 2022 · 14 次引用
