Kirchner, DanielDanielKirchnerGenaim, SamirSamirGenaimAlbert, ElviraElviraAlbert0000-0001-9229-1148Martin-Martin, EnriqueEnriqueMartin-Martin2023-07-312023-07-312023978-3-031-37709-9https://fis.uni-bamberg.de/handle/uniba/89789The efficiency and the security of smart contracts are their two fundamental properties, but might come at odds: the use of optimizers to enhance efficiency may introduce bugs and compromise security. Our focus is on EVM (Ethereum Virtual Machine) block-optimizations, which enhance the efficiency of jump-free blocks of opcodes by eliminating, reordering and even changing the original opcodes. We reconcile efficiency and security by providing the verification technology to formally prove the correctness of EVM block-optimizations on smart contracts using the Coq proof assistant. This amounts to the challenging problem of proving semantic equivalence of two blocks of EVM instructions, which is realized by means of three novel Coq components: a symbolic execution engine which can execute an EVM block and produce a symbolic state; a number of simplification lemmas which transform a symbolic state into an equivalent one; and a checker of symbolic states to compare the symbolic states produced for the two EVM blocks under comparison.engCoqEthereum Virtual MachineSmart ContractsOptimizationTheorem Proving004Formally Verified EVM Block-Optimizationsconferenceobject10.1007/978-3-031-37709-9_9