Lune

OOPSLA2022Top-tier venue

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 Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

6 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Relational Synthesis of Recursive Programs via Constraint Annotated Tree Automata cites Semantic Code Refactoring for Abstract Data Types
  • Securing smart contract with runtime validation cites ZEUS: Analyzing Safety of Smart Contracts
  • Securing smart contract with runtime validation cites VerX: Safety Verification of Smart Contracts
  • Securing smart contract with runtime validation cites Making Smart Contracts Smarter
  • SuperStack: Superoptimization of Stack-Bytecode via Greedy, Constraint-Based, and SAT Techniques cites Synthesis of Super-Optimized Smart Contracts Using Max-SMT
  • ZEUS: Analyzing Safety of Smart Contracts cites Making Smart Contracts Smarter
  • Graphiti: Bridging Graph and Relational Database Queries cites Semantic Code Refactoring for Abstract Data Types
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers6

  1. Semantic Code Refactoring for Abstract Data TypesShankara Pailoor, Yuepeng Wang, Isil DilligPOPL 2024 · 13 citations
  2. 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
  3. Graphiti: Bridging Graph and Relational Database QueriesYang He, Ruijie Fang, Isil Dillig, Yuepeng WangPLDI 2025 · 3 citations
  4. Relational Synthesis of Recursive Programs via Constraint Annotated Tree AutomataAnders Miltner, Ziteng Wang, Swarat Chaudhuri, Isil DilligCAV 2024 · 2 citations
  5. Agentic Verification of Software SystemsHaoxin Tu, Huan Zhao, Yahui Song, Mehtab Zafar et al.FSE 2026 · 1 citation

Builds on9

  1. Making Smart Contracts SmarterLoi Luu, Duc-Hiep Chu, Hrishi Olickel, Prateek Saxena et al.CCS 2016 · 2,306 citations
  2. ZEUS: Analyzing Safety of Smart ContractsSukrit Kalra, Seep Goel, Mohan Dhawan, Subodh SharmaNDSS 2018 · 595 citations
  3. VerX: Safety Verification of Smart ContractsAnton Permenev, Dimitar Dimitrov, Petar Tsankov, Dana Drachsler-Cohen et al.S&P 2020 · 251 citations
  4. Securing smart contract with runtime validationAo Li, Jemin Andrew Choi, Fan LongPLDI 2020 · 60 citations
  5. Synthesis of Super-Optimized Smart Contracts Using Max-SMTElvira Albert, Pablo Gordillo, Albert Rubio, Maria Anna SchettCAV 2020 · 30 citations

Related papers

  1. FunRedisp: Reordering Function Dispatch in Smart Contract to Reduce Invocation Gas FeesYunqi Liu, Wei SongISSTA 2024 · 3 citations
  2. Demystifying Loops in Smart ContractsBenjamin Mariano, Yanju Chen, Yu Feng, Shuvendu K. Lahiri et al.ASE 2020 · 20 citations
  3. SmartIFSyn: Automated Information Flow Security Policy Synthesis for Smart ContractsYinghao Wu, Miaomiao Zhang, Fu Song, John W. Baugh Jr.FSE 2026
  4. Declarative smart contractsHaoxian Chen, Gerald Whitters, Mohammad Javad Amiri, Yuepeng Wang et al.FSE 2022 · 14 citations
  5. 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
Dusk over the sea between two cliffs drawn in fine vertical lines