Log In Sign Up

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

by   Elvira Albert, et al.

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.


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

Motivated by the immutable nature of Ethereum smart contracts and of the...

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

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

Abstracting Abstract Control (Extended)

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

Pushdown flow analysis with abstract garbage collection

In the static analysis of functional programs, pushdown flow analysis an...

Stack graphs: Name resolution at scale

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

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...

So You Want to Analyze Scheme Programs With Datalog?

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