Hooks cause hidden fees in decentralized exchanges costing millions

An Empirical Study of Undisclosed Charges in Hook-Based Decentralized Exchanges

Cryptography and Security

Summary

Decentralized exchanges let users trade cryptocurrencies automatically through pools. The study finds that special programs called Hooks can secretly take extra fees not shown in the usual fee reports. The researchers checked thousands of these Hooks and millions of trades on popular platforms to measure how often and how much these hidden fees add up to. They discovered that many Hooks do charge undisclosed fees, costing traders millions of dollars in total. This shows that traders don't see the full cost upfront, highlighting the need for clearer fee disclosures.

What this means in practice

Authors

Kai Ma, Tianle Sun, Shun Zhou, Boyao Yang, Ningyu He, Haoyu Wang

Abstract

Many decentralized exchanges use automated market makers (AMMs) to trade assets against liquidity pools. Modern AMMs allow third-party contracts, called Hooks, to customize this process. However, Hooks can impose additional deductions that fee breakdowns based on standard pool parameters do not itemize. We present, to the best of our knowledge, the first large-scale empirical study of the production Hook ecosystem, focusing on these undisclosed settlement charges. Our study covers 7,873 Hook deployments, 50,011 pools, and 296M pool events on Uniswap v4 and PancakeSwap Infinity across Ethereum and BNB Smart Chain (BSC) through August 1, 2026. We develop a bytecode analysis that reconstructs how Hooks change traders' payments and receipts, separating charges from exchanged assets and standard fees. We then reconstruct historical settlements to measure charging frequency and economic burden. We find that direct settlement adjustment is the dominant Hook capability, supported by 71.37% of registered Hooks. Charging capability is widespread and often exercised: 24.30% of Hooks can impose undisclosed deductions, and these deductions occur in 59.23% of accounted swaps involving such Hooks. These charges generate millions of dollars in revenue, with $3.97M recorded across Hooks with available token prices. These findings reveal a gap between standard fee displays and actual trading costs, motivating explicit disclosure of Hook deductions alongside standard fees.