arXiv:2609.07865cs.CRSep 2026

Manuscript Offprint

arXiv:2609.07865

EventSpec: Defining and Detecting Event-Semantic Issues in Blockchain Ecosystems

Yixuan Liu, Yuxin Dong, Ye Liu, Yin Wu, Chengxuan Zhang, Xiapu Luo, Yi Li

YIXUAN LIU, Nanyang Technological University, Singapore

YUXIN DONG, Peking University, China

YE LIU, Beijing Institute of Technology, China

YIN WU, Xi'an Jiaotong University, China

CHENGXUAN ZHANG, Nanyang Technological University, Singapore

XIAPU LUO, Hong Kong Polytechnic University, China

YI LI, Nanyang Technological University, Singapore

In recent years, smart contracts have become the backbone of decentralized applications (DApps), and off-chain systems such as bridges, wallets, and indexers rely heavily on event logs to track contract execution and state changes. However, the Ethereum Virtual Machine (EVM) does not validate or enforce event semantics, so logs can diverge from on-chain state, misleading off-chain systems into accepting incorrect state transitions. Existing smart contract vulnerability detection tools focus on logic bugs, with limited support for detecting event-semantic defects. To address this gap, we collect audit reports and incident cases and apply open card sorting to define five classes of event-semantic defects: event collision, state-event mismatch, unauthorized event emission, event emission mismatch, and event parameter mismatch. We propose EVENTSPEC, which infers event specifications from a contract corpus via behavior inference and semantic-constraint extraction and applies differential checking to identify event-semantic defects in target contracts. We run EVENTSPEC on 6,617 real-world contracts and evaluate detection effectiveness based on manually labeled results; EVENTSPEC achieves an overall comprehensive precision of 90.17%. We further provide an off-chain evaluation harness that reproduces two off-chain attack vectors on any EVM-compatible chain: event origin confusion caused by unintended emitters and event-state desynchronization where events lack matching state updates. Using this harness, we demonstrate the feasibility of these attacks on bridge relayers, blockchain explorers, and NFT marketplaces, and report six wallet issues, four of which were confirmed (including a $600 bounty), with two remaining pending.

CCS Concepts: • Security and privacy → Software security engineering.

Additional Key Words and Phrases: Blockchain security, smart contract event, transaction logs

ACM Reference Format:

Yixuan Liu, Yuxin Dong, Ye Liu, Yin Wu, Chengxuan Zhang, Xiapu Luo, and Yi Li. 2026. EventSpec: Defining and Detecting Event-Semantic Issues in Blockchain Ecosystems. Proc. ACM Softw. Eng. 3, ISSTA, Article ISSTA182 (October 2026), 24 pages. https://doi.org/10.1145/3832273

Authors' Contact Information: Yixuan Liu, Nanyang Technological University, Singapore, Singapore, liuy0255@e.ntu.edu.sg; Yuxin Dong, Peking University, Beijing, China, dongyuxin@stu.pku.edu.cn; Ye Liu, Beijing Institute of Technology, Beijing, China, ye.liu@bit.edu.cn; Yin Wu, Xi'an Jiaotong University, Xi'an, China, wuyin@stu.xjtu.edu.cn; Chengxuan Zhang, Nanyang Technological University, Singapore, Singapore, chengxua001@e.ntu.edu.sg; Xiapu Luo, Hong Kong Polytechnic University, Hong Kong, China, csxluo@comp.polyu.hk; Yi Li, Nanyang Technological University, Singapore, Singapore, yi_li@ntu.edu.sg.

Figure

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.

© 2026 Copyright held by the owner/author(s).

ACM 2994-970X/2026/10-ARTISSTA182

https://doi.org/10.1145/3832273

ISSTA182:2

Yixuan Liu, Yuxin Dong, Ye Liu, Yin Wu, Chengxuan Zhang, Xiapu Luo, and Yi Li

1 Introduction

Blockchain is a decentralized digital ledger technology that securely records and verifies transactions across multiple computers, ensuring data integrity and transparency [54]. Building on blockchain technology, Decentralized Applications (DApps) have emerged as a key innovation [11]. These applications run on smart contracts deployed across various blockchain networks, such as Ethereum, Polygon, and Binance Smart Chain (BSC). These contracts encode on-chain logic for managing state and digital assets, while a wide range of off-chain systems, such as bridges, wallets, explorers, and indexing services, interact with them to present user-facing state and functionality.

Smart contracts can emit events, which the EVM records on-chain as transaction logs. These logs provide a structured interface for off-chain consumption, and off-chain systems rely on them to track on-chain execution and maintain user-facing state. As of 2026-01-17, 97.9% of contract-involved successful Ethereum transactions emit at least one log [24], indicating that logs constitute a primary execution signal on Ethereum.

However, the EVM does not enforce the semantic correctness of logs. Smart contracts can emit events that omit, misstate, or imitate underlying state transitions. When off-chain systems treat logs as authoritative without validating emitters or checking contract state, misleading logs can trigger asset theft, fraud, and interoperability failures across applications.

Event-semantic issues arise when emitted events do not accurately summarize the underlying execution or when their origin and parameters are insufficiently validated. These issues include missing or extra emissions, parameter inconsistencies, events emitted under insufficient guards and so on. They are amplified by off-chain listeners assuming that logs from expected or known contracts imply valid state transitions, and that event parameters are safe to consume without validating the underlying state. Prior work only examined event misuse in specific domains, including cross-chain bridges [44, 75, 81], NFT ownership [37], code-documentation inconsistencies [83], and token behaviors [17]. However, a cross-application view of event semantics and their off-chain attack vectors remains underexplored. A unified taxonomy with detection methodology are still missing.

To close this gap, we conduct an empirical study of real-world incident reports and audit findings to derive a taxonomy of event-semantic defects and their associated off-chain attack vectors. Through open card sorting, we identify five types of event-semantic defects and abstract two recurring off-chain attack vectors that characterize how misleading logs propagate into off-chain systems. Based on this taxonomy, we develop EVENTSPEC, a bytecode-oriented detector that constructs a corpus-derived event-emission specification and performs differential checking on target contracts. The specification captures both event layout properties (e.g., signatures and indexed positions) and semantic constraints (e.g., parameter origins and guard or binding signals), enabling EVENTSPEC to flag deviations with explainable evidence, augmented by symbolic equality checks for identifying event-collision anomalies. In addition, EVENTSPEC includes an off-chain evaluation harness for examining flaws in off-chain log consumption and validation.

We run EVENTSPEC on 6,617 real-world contracts and evaluate detection effectiveness based on manually labeled results. EVENTSPEC achieves an overall comprehensive precision of 90.17%. We further use the off-chain harness to reproduce the two attack vectors in a controlled environment and identify issues in bridge relayers, explorers, wallets, and NFT marketplaces. Finally, we discuss mitigation strategies for both smart contracts and off-chain systems to reduce such risks.

In short, we make the following contributions in this paper:

  • Event-Semantic Taxonomy. We systematically analyze incidents and audit reports and define five types of event-semantic issues together with two off-chain attack vectors.

ISSTA182:3

  • Corpus-Driven Detection. We propose EVENTSPEC, a bytecode-oriented framework that learns event and function semantic profiles from a corpus and performs differential checking on target contracts with explainable findings.
  • Empirical Evaluation. We run EVENTSPEC on 6,617 real-world contracts and evaluate detection effectiveness based on manually labeled results; EVENTSPEC achieves an overall comprehensive precision of 90.17%.
  • Real-World Feasibility. We implement an off-chain harness to assess the two attack vectors in real systems and report confirmed issues across bridge relayers, explorers, wallets, and NFT marketplaces (including a $600 bounty), alongside on-chain UEM findings.

References (33)