Skip to main content
QUICK REVIEW

[Paper Review] sCompile: Critical Path Identification and Analysis for Smart Contracts

Jialiang Chang, Bo Gao|arXiv (Cornell University)|Aug 2, 2018
Security and Verification in ComputingComputer Science14 references16 citations
TL;DR

sCompile is a static analysis tool that identifies and ranks critical execution paths in Ethereum smart contracts—particularly those involving monetary transactions—using control flow graph construction and symbolic execution. It reduces manual inspection by prioritizing high-risk paths, achieving 5-second average analysis time and detecting 224 unknown vulnerabilities with a 15.4% false positive rate before user review.

ABSTRACT

Ethereum smart contracts are an innovation built on top of the blockchain technology, which provides a platform for automatically executing contracts in an anonymous, distributed, and trusted way. The problem is magnified by the fact that smart contracts, unlike ordinary programs, cannot be patched easily once deployed. It is important for smart contracts to be checked against potential vulnerabilities. In this work, we propose an alternative approach to automatically identify critical program paths (with multiple function calls including inter-contract function calls) in a smart contract, rank the paths according to their criticalness, discard them if they are infeasible or otherwise present them with user friendly warnings for user inspection. We identify paths which involve monetary transaction as critical paths, and prioritize those which potentially violate important properties. For scalability, symbolic execution techniques are only applied to top ranked critical paths. Our approach has been implemented in a tool called sCompile, which has been applied to 36,099 smart contracts. The experiment results show that sCompile is efficient, i.e., 5 seconds on average for one smart contract. Furthermore, we show that many known vulnerabilities can be captured if user inspects as few as 10 program paths generated by sCompile. Lastly, sCompile discovered 224 unknown vulnerabilities with a false positive rate of 15.4% before user inspection.

Motivation & Objective

  • To reduce the manual effort required to inspect smart contract vulnerabilities by identifying and prioritizing critical execution paths.
  • To improve scalability in smart contract analysis by focusing symbolic execution only on top-ranked paths.
  • To detect previously unknown vulnerabilities by analyzing paths involving monetary transactions and known security properties.
  • To provide actionable, user-friendly warnings for critical paths, enhancing developer understanding of high-risk behaviors.
  • To balance precision and efficiency by combining static analysis with targeted symbolic execution.

Proposed method

  • Construct a control flow graph (CFG) that includes inter-contract function calls to model all possible execution paths.
  • Identify critical paths based on inclusion of monetary transactions, prioritizing those that may violate predefined security properties.
  • Assign a criticalness score to each path using a configurable formula that considers property violation severity and path length.
  • Apply symbolic execution only to the top-ranked paths to check feasibility and detect actual vulnerabilities.
  • Present feasible, high-criticalness paths to users with clear warnings for manual inspection.
  • Use static analysis to prune infeasible or low-priority paths early, improving scalability.

Experimental results

Research questions

  • RQ1Can a hybrid static and symbolic execution approach effectively prioritize smart contract paths to reduce manual inspection effort?
  • RQ2How effective is critical path ranking based on monetary transaction involvement and property violation potential in detecting real vulnerabilities?
  • RQ3To what extent can symbolic execution be limited to top-ranked paths without missing critical vulnerabilities?
  • RQ4What is the trade-off between analysis efficiency and false positive rate in detecting unknown vulnerabilities?
  • RQ5How well do developers perform in identifying vulnerabilities when guided by sCompile’s path analysis compared to without it?

Key findings

  • sCompile analyzed 36,099 smart contracts with an average analysis time of 5 seconds per contract, demonstrating high efficiency.
  • The tool detected 224 previously unknown vulnerabilities, indicating strong discovery capability.
  • The false positive rate before user inspection was 15.4%, which is considered acceptable for practical use.
  • Inspecting just 10 critical paths on average was sufficient to uncover known vulnerabilities, highlighting effective prioritization.
  • User studies showed that sCompile significantly improved both speed and accuracy in vulnerability detection, especially when path hints were provided.
  • The tool was rated highly useful by users (average score of 5/7), confirming its practical value in smart contract security analysis.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.