Bytecode Skeletons for Sample Selection in the Analysis of Blockchain Programs

Monika di Angelo, Gernot Salzer · 2024

To evaluate analysis tools for blockchain programs or to analyze an entire ecosystem of blockchain programs, representative samples are needed. Typically, samples are randomly selected from programs deployed during a particular period or published on web sites. Depending on the selection strategy, the quality of the analysis results may differ greatly. In this paper, we propose a selection method for smart contracts on Ethereum based on bytecode normalization. For each program, we compute a skeleton by removing parts with no or little effect on its functionality. Programs with the same skeleton are considered equivalent, and only one representative needs to be considered. We empirically evaluate its effect on the results of common bytecode analyzers. The proposed approach not only makes full coverage feasible, but also reduces sample size, redundancy, and bias. It sufficiently preserves the functionality and can even improve analysis results.

Read the paper · More papers on PaperTik