Detecting Cross-Function Reentrancy from EVM Traces

Read full text
Authors: Guesmi, Semia, Piazza, Carla, Gasparetto, Andrea, Rizzo, Matteo, Rossi, Sabina
Cited by: 155

Abstract

Reentrancy remains one of the most critical vulnerabilities affecting Ethereum smart contracts. While many existing analysis tools focus on detecting classical single-function reentrancy, more complex forms such as cross-function reentrancy are harder to identify because they depend on execution semantics and interactions between multiple functions. In this work, we study reentrancy at the level of Ethereum Virtual Machine (EVM) execution traces. We extend the TxSpector framework with new Datalog-based detection rules designed to capture cross-function reentrancy patterns. To support this analysis, we also modernize the trace extraction component by adapting it to recent versions of the Ethereum client and updated EVM instructions. The proposed approach is evaluated on real Ethereum on-chain transaction traces. The results show that our method is able to detect cross-function reentrancy behaviors that are not captured by the original TxSpector rules, demonstrating the effectiveness of pattern-based logic detection at the EVM execution level.

Fields of Study & Subjects

Blockchain Technology Applications and Security Security and Verification in Computing Advanced Malware Detection Techniques

Publication details

Journal / source
DROPS (Schloss Dagstuhl – Leibniz Center for Informatics)
Publication date
1 January 2026
Language
EN