Synthesis-powered optimization of smart contracts via data type refactoring
Yanju Chen, Yuepeng Wang, Maruth Goyal, James Dong, Yu Feng, Isil Dillig
Abstract
Since executing a smart contract on the Ethereum blockchain costs money (measured in gas ), smart contract developers spend significant effort in reducing gas usage. In this paper, we propose a new technique for reducing the gas usage of smart contracts by changing the underlying data layout. Given a smart contract P and a type-level transformation, our method automatically synthesizes a new contract P ′ that is functionally equivalent to P . Our approach provides a convenient DSL for expressing data type refactorings and employs program synthesis to generate the new version of the contract. We have implemented our approach in a tool called Solidare and demonstrate its capabilities on real-world smart contracts from Etherscan and GasStation. In particular, we show that our approach is effective at automating the desired data layout transformation and that it is useful for reducing gas usage of smart contracts that use rich data structures.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 289d9303-54bb-4d29-bdfe-af741cb8ed14Cited by top-tier papers6
- Semantic Code Refactoring for Abstract Data TypesShankara Pailoor, Yuepeng Wang, Isil DilligPOPL 2024 · 13 citations
- SuperStack: Superoptimization of Stack-Bytecode via Greedy, Constraint-Based, and SAT TechniquesElvira Albert, Maria Garcia de la Banda, Alejandro Hernández-Cerezo, Alexey Ignatiev et al.PLDI 2024 · 9 citations
- Graphiti: Bridging Graph and Relational Database QueriesYang He, Ruijie Fang, Isil Dillig, Yuepeng WangPLDI 2025 · 3 citations
- Relational Synthesis of Recursive Programs via Constraint Annotated Tree AutomataAnders Miltner, Ziteng Wang, Swarat Chaudhuri, Isil DilligCAV 2024 · 2 citations
- Agentic Verification of Software SystemsHaoxin Tu, Huan Zhao, Yahui Song, Mehtab Zafar et al.FSE 2026 · 1 citation
Builds on9
- Making Smart Contracts SmarterLoi Luu, Duc-Hiep Chu, Hrishi Olickel, Prateek Saxena et al.CCS 2016 · 2,306 citations
- ZEUS: Analyzing Safety of Smart ContractsSukrit Kalra, Seep Goel, Mohan Dhawan, Subodh SharmaNDSS 2018 · 595 citations
- VerX: Safety Verification of Smart ContractsAnton Permenev, Dimitar Dimitrov, Petar Tsankov, Dana Drachsler-Cohen et al.S&P 2020 · 251 citations
- Securing smart contract with runtime validationAo Li, Jemin Andrew Choi, Fan LongPLDI 2020 · 60 citations
- Synthesis of Super-Optimized Smart Contracts Using Max-SMTElvira Albert, Pablo Gordillo, Albert Rubio, Maria Anna SchettCAV 2020 · 30 citations
Related papers
- FunRedisp: Reordering Function Dispatch in Smart Contract to Reduce Invocation Gas FeesYunqi Liu, Wei SongISSTA 2024 · 3 citations
- Demystifying Loops in Smart ContractsBenjamin Mariano, Yanju Chen, Yu Feng, Shuvendu K. Lahiri et al.ASE 2020 · 20 citations
- SmartIFSyn: Automated Information Flow Security Policy Synthesis for Smart ContractsYinghao Wu, Miaomiao Zhang, Fu Song, John W. Baugh Jr.FSE 2026
- Declarative smart contractsHaoxian Chen, Gerald Whitters, Mohammad Javad Amiri, Yuepeng Wang et al.FSE 2022 · 14 citations
- Automated Test Generation For Smart Contracts via On-Chain Test Case Augmentation and MigrationJiashuo Zhang, Jiachi Chen, John Grundy, Jianbo Gao et al.ICSE 2025 · 1 citation
