Lifecycle-aware security evaluation of programmable DeFi hooks: A framework for Uniswap V4
• A lifecycle-aware security analysis framework, HookScope, is proposed for Uniswap V4. • Five runtime threat types (T1-T5) are defined and dynamically detected through simulation. • HookScope applies CVSS-inspired scoring to quantify security risks in programmable hooks. • Analysis of 17 on-chain hooks reveals structural vulnerabilities in real deployments. • HookScope outperforms traditional tool in detecting context-sensitive threats in DeFi hooks. The programmable hook architecture introduced in Uniswap V4 enables external logic to be executed at predefined lifecycle events within automated market maker (AMM) protocols, enhancing the customizability. However, this design introduces a novel attack surface that conventional static analysis tools are ill-equipped to handle, particularly due to hooks’ context-dependent behavior and lack of publicly available source code. This paper proposes HookScope, a lifecycle-aware dynamic analysis framework for evaluating the structural security of programmable hooks. HookScope defines five runtime threat types (T1-T5) specific to the Uniswap V4 hook model and employs simulation-based testing to detect their manifestation during live contract execution. Risk scores are computed using a CVSS-inspired model that incorporates threat severity, execution context, and system-level impact. Comparative evaluation demonstrates that HookScope identifies threats overlooked by widely-used baseline tools such as Mythril, highlighting the necessity of lifecycle-aware dynamic analysis for programmable DeFi infrastructure. The proposed framework contributes a reproducible, quantifiable approach to threat detection in decentralized protocols and provides a foundation for future research on secure extensibility in AMM-based systems.
Authors
- Seyoung Lee (ORCID: https://orcid.org/0000-0002-8277-8486)
- Hoon Sang Oh (ORCID: https://orcid.org/0009-0004-2666-7169)
Institutions
- Kangwon National University (KR)
Publication Details
- Journal
- Computer Networks
- Published
- 2025-11-28
- DOI
- https://doi.org/10.1016/j.comnet.2025.111900
- Primary Topic
- Security and Verification in Computing
- Type
- article
- Field-Weighted Citation Impact
- 0.00