DeepAI
Log In Sign Up

Analyzing Smart Contracts: From EVM to a sound Control-Flow Graph

04/29/2020
by   Elvira Albert, et al.
0

The EVM language is a simple stack-based language with words of 256 bits, with one significant difference between the EVM and other virtual machine languages (like Java Bytecode or CLI for .Net programs): the use of the stack for saving the jump addresses instead of having it explicit in the code of the jumping instructions. Static analyzers need the complete control flow graph (CFG) of the EVM program in order to be able to represent all its execution paths. This report addresses the problem of obtaining a precise and complete stack-sensitive CFG by means of a static analysis, cloning the blocks that might be executed using different states of the execution stack. The soundness of the analysis presented is proved.

READ FULL TEXT
03/16/2021

EtherSolve: Computing an Accurate Control-Flow Graph from Ethereum Bytecode

Motivated by the immutable nature of Ethereum smart contracts and of the...
09/19/2019

Supporting On-Stack Replacement in Unstructured Languages by Loop Reconstruction and Extraction

On-stack replacement (OSR) is a common technique employed by dynamic com...
05/14/2013

Abstracting Abstract Control (Extended)

The strength of a dynamic language is also its weakness: run-time flexib...
06/19/2014

Pushdown flow analysis with abstract garbage collection

In the static analysis of functional programs, pushdown flow analysis an...
11/02/2022

Stack graphs: Name resolution at scale

We present stack graphs, an extension of Visser et al.'s scope graphs fr...
11/30/2017

A tool for visualizing the execution of programs and stack traces especially suited for novice programmers

Software engineering education and training have obstacles caused by a l...
07/27/2021

So You Want to Analyze Scheme Programs With Datalog?

Static analysis approximates the results of a program by examining only ...