Lune

CAV2020顶会

Synthesis of Super-Optimized Smart Contracts Using Max-SMT

Elvira Albert, Pablo Gordillo, Albert Rubio, Maria Anna Schett

摘要

With the advent of smart contracts that execute on the blockchain ecosystem, a new mode of reasoning is required for developers that must pay meticulous attention to the gas spent by their smart contracts, as well as for optimization tools that must be capable of effectively reducing the gas required by the smart contracts. Super-optimization is a technique which attempts to find the best translation of a block of code by trying all possible sequences of instructions that produce the same result. This paper presents a novel approach for super-optimization of smart contracts based on Max-SMT which is split into two main phases: (i) the extraction of a stack functional specification from the basic blocks of the smart contract, which is simplified using rules that capture the semantics of the arithmetic, bit-wise, relational operations, etc. (ii) the synthesis of optimized blocks which, by means of an efficient Max-SMT encoding, finds the bytecode blocks with minimal gas cost whose stack functional specification is equal (modulo commutativity) to the extracted one. Our experimental results are very promising: we are able to optimize 55.41 % of the blocks, and prove that 34.28 % were already optimal, for more than 61 000 blocks from the most called 2500 Ethereum contracts.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 4 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • SuperStack: Superoptimization of Stack-Bytecode via Greedy, Constraint-Based, and SAT Techniques 引用了 Synthesis-powered optimization of smart contracts via data type refactoring
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper4

  1. Symbolic value-flow static analysis: deep, precise, complete modeling of Ethereum smart contractsYannis Smaragdakis, Neville Grech, Sifis Lagouvardos, Konstantinos Triantafyllou 等OOPSLA 2021 · 18 次引用
  2. Synthesis-powered optimization of smart contracts via data type refactoringYanju Chen, Yuepeng Wang, Maruth Goyal, James Dong 等OOPSLA 2022 · 14 次引用
  3. SuperStack: Superoptimization of Stack-Bytecode via Greedy, Constraint-Based, and SAT TechniquesElvira Albert, Maria Garcia de la Banda, Alejandro Hernández-Cerezo, Alexey Ignatiev 等PLDI 2024 · 9 次引用
  4. A Local Search Algorithm for MaxSMT(LIA)Xiang He, Bohan Li, Mengyu Zhao, Shaowei CaiFM 2024

它引用的 Paper1

  1. Broken Metre: Attacking Resource Metering in EVMDaniel Perez, Benjamin LivshitsNDSS 2020

相关 Paper

  1. FunRedisp: Reordering Function Dispatch in Smart Contract to Reduce Invocation Gas FeesYunqi Liu, Wei SongISSTA 2024 · 3 次引用
  2. Synthesis of Sound and Precise Storage Cost Bounds via Unsound Resource Analysis and Max-SMTElvira Albert, Jesús Correas, Pablo Gordillo, Guillermo Román-Díez 等ISSTA 2024 · 1 次引用
  3. Asparagus: Automated Synthesis of Parametric Gas Upper-Bounds for Smart ContractsZhuo Cai, Soroush Farokhnia, Amir Kafshdar Goharshady, S. HitarthOOPSLA 2023 · 16 次引用
  4. Rich specifications for Ethereum smart contract verificationChristian Bräm, Marco Eilers, Peter Müller, Robin Sierra 等OOPSLA 2021 · 23 次引用
  5. LENT-SSE: Leveraging Executed and Near Transactions for Speculative Symbolic Execution of Smart ContractsPeilin Zheng, Bowei Su, Xiapu Luo, Ting Chen 等ISSTA 2024 · 1 次引用
黄昏的海面,两侧是细线勾勒的悬崖