TrapHunter: Exposing Covert Pathways in Trap Token Contracts
Yin Wu, Yixuan Liu, Yi Li, Chenyang Peng, Hao Wu, Ming Fan, Ting Liu, Haijun Wang
Xi'an Jiaotong University · Nanyang Technological University
Key points
From the paper's conclusion- We then propose TrapHunter, a framework designed to identify these traps and expose covert pathways within these deceptive contracts via intent deviation analysis.
Abstract
Standardized token contracts (e.g., ERC-20) form the foundation of digital assets. However, attackers increasingly abuse this standardization to disguise malicious trap tokens. Unlike obvious violations, these contracts employ a strategy of "deceptive adherence": they strictly adhere to standard protocols to evade detection while embedding covert logic to defraud users. To address this, we first systematize the trap landscape by proposing a novel taxonomy derived from the intrinsic functional lifecycle of tokens (Generation, Circulation, Persistence, and Observation). We then propose TrapHunter, a framework designed to identify these traps and expose covert pathways within these deceptive contracts via intent deviation analysis. Specifically, TrapHunter introduces a unified semantic representation combining Abstract Behavior Trees (ABTs) and Augmented Path Graphs (APGs) to normalize intra-procedural syntax and reveal hidden execution paths driven by inter-procedural state dependencies. Crucially, it bridges the semantic gap by leveraging LLMs to reason about the behavioral intent of deviations from reference implementations, followed by fork-based dynamic validation to confirm exploitability. Experimental evaluation on 269 real-world contracts with three LLMs (DeepSeek, GPT, and Gemini) demonstrates that TrapHunter effectively detects all six categories of traps, achieving an average precision of 81.8% and recall of 85.4%, significantly outperforming state-of-the-art tools.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- The Deception Delta: Adversarial Evaluation of LLM-Based Smart Contract Bytecode ForensicsarXiv · 2026
- DG-VDT: Dynamic Graph-Guided Reinforcement Learning for Low-Latency Vulnerability Detection and Attack Traceability in Ethereum Smart ContractsApplied Sciences · 2026
- SCOUT: Smart Contract Open-Set Unknown Vulnerability Detection via Multi-Perspective Feature Fusion and Anomaly-Aware RecognitionSymmetry · 2026
- TiDPO-SCVD: Token-Importance-Guided Preference Reinforcement LLM for Explainable Smart Contract Vulnerability DetectionFuture Internet · 2026
- SecureFlow: An LLM-Based Multi-Agent System for Automated Smart Contract Vulnerability Detection and PatchingJournal of Cybersecurity and Privacy · 2026
- Where Do the Tokens Go? Understanding and Reducing Costs in LLM Agents for Vulnerability DiscoveryarXiv · 2026