Manuscript Offprint
arXiv:2610.36682An Empirical Study of Undisclosed Charges in Hook-Based Decentralized Exchanges
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Kai Ma
Huazhong University of Science and Technology
Wuhan, China
Boyao Yang
Harbin Institute of Technology,
Shenzhen
Shenzhen, China
Tianle Sun
Huazhong University of Science and Technology
Wuhan, China
Ningyu He
Hong Kong Polytechnic University
Hong Kong SAR, China
Shun Zhou
Huazhong University of Science and Technology
Wuhan, China
Haoyu Wang
Huazhong University of Science and Technology
Wuhan, China
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.
Keywords
Decentralized exchanges, AMMs, hooks, undisclosed charges
What the Trader Sees

Dex Interface
Input: 1.17 USDT
Quoted Output: 1,227K HXIC
Displayed Fee: 0.12 USDT
(10% LP & 0.4% Protocol)
What Actually Happens

PoolManager
② Callback: read 1,496K
HXIC AMM output
③ Mint 269K HXIC claim
④ Adjust settlement delta
(-269K HXIC)
Undisclosed Settlement Charges
Hook
Figure 1: Traders receive the quoted output despite an unitemized charge. The negative value denotes reduced output.
for Hook-based AMM protocols [11], with Uniswap v4 and PancakeSwap Infinity accounting for over 98% of this TVL [11–13]. Hooks extend conventional AMM trading [4] with custom code executed before or after pool operations. This code can change pricing and settlement, including the amounts users pay or receive [27, 41].
However, Hooks can use this control to impose additional charges beyond standard pool fees. These deductions bypass the pool’s standard fee parameters, so displays based on those parameters do not separately itemize them. We refer to these unitemized deductions as undisclosed settlement charges. Figure 1 illustrates an undisclosed settlement charge through a real-world swap on the PancakeSwap interface [6, 30]. The interface quotes 1,227K HXIC for 1.17 USDT and displays only standard pool fees of 0.12 USDT (10% liquidity-provider and 0.4% protocol). During settlement , the pool-management contract (PoolManager) deducts these fees and computes an output of 1,496K HXIC. The Hook then retains 269K HXIC (18%) of this output. The trader therefore receives the quoted 1,227K HXIC, even though the fee breakdown does not itemize the Hook’s additional charge.
Despite this visibility gap, existing studies on Hook-based AMMs focus on architectural overviews or general security evaluations , leaving open how widespread these charges are, how often
Throughout this paper, the capitalized term “Hook” refers to the pool-customization contracts of Uniswap v4 and PancakeSwap Infinity.
BSC transaction 0xda0a75...0ea6d8.
they occur, and what they cost traders. Deployment counts alone do not reveal how widely Hooks are used, so interpreting charging prevalence also requires measuring their associated pools and transaction activity. Identifying these charges then requires understanding deployed Hook behavior, often without verified source code. It also requires reconstructing what users pay and receive to distinguish additional deductions from normal asset exchanges and standard pool fees. We therefore combine bytecode analysis to identify charging mechanisms, pool configuration checks to assess whether they are permitted, and historical settlement reconstruction to measure their actual use and economic impact.
This Work. We present, to the best of our knowledge, the first large-scale empirical study of the production Hook ecosystem in decentralized exchanges, with a focus on undisclosed settlement charges. Our study covers 7,873 registered Hook deployments and 50,011 Hook-enabled pools on Uniswap v4 and PancakeSwap Infinity across Ethereum and BNB Smart Chain (BSC), through August 1, 2026. We first characterize how Hooks are deployed and used, then examine charging mechanisms and their activation in practice, and finally quantify the resulting economic burden. We organize our study around the following three research questions.
RQ1. What characterizes the production Hook ecosystem in Hook-based AMMs? We systematically examine how deployment scale relates to economic activity, whether Hook rules are inspectable and stable, and which trading behaviors Hooks customize.
RQ2. How are undisclosed Hook charges distributed, enabled, and triggered? We empirically analyze charging mechanisms, compare their deployment footprint with recorded liquidity, and measure their occurrence across Hooks and historical swaps.
RQ3. What is the real-world economic burden of undisclosed Hook charges? Beyond cumulative revenue, we examine how charges are collected and provide fine-grained measurements of per-swap dollar and relative costs, comparing charging frequency and cost across platforms.
Our Contributions.
-
Charge identification. We develop a bytecode analysis that reconstructs how Hooks change traders' payments and receipts, separating charges from exchanged assets and standard fees.
-
Ecosystem characterization (RQ1). We characterize Hook deployment and usage, revealing that pool counts poorly reflect observed transaction activity (Spearman ).
-
Charging prevalence (RQ2). We measure charging capability and its deployment footprint, revealing that 24.30% of registered Hooks can impose additional charges. Their pools constitute 34.55% of Hook-enabled pools but hold 2.69% of recorded TVL.
-
Economic burden (RQ3). We reconstruct historical trades and record 0.41 vs. $8.17).
Paper Organization. Section 2 introduces AMM settlement, Hook callbacks, and undisclosed Hook charges. Section 3 presents our methodology. Section 4 describes dataset construction. Sections 5, 6, and 7 present findings for RQ1–RQ3. Section 8 discusses implications and limitations, and Section 9 reviews related work.
Table 1: Hook callbacks by operation. Bold callbacks can adjust settlement. Liquidity callbacks differ between PancakeSwap Infinity concentrated-liquidity (CL) and Bin pools.
| Action (*: Bin) | Hook callbacks |
|---|---|
| Initialize | beforeInitialize, afterInitialize |
| Add liquidity | beforeAddLiquidity, afterAddLiquidity |
| Remove liquidity | beforeRemoveLiquidity, afterRemoveLiquidity |
| Swap | beforeSwap, afterSwap |
| Donate | beforeDonate, afterDonate |
| Bin mint* | beforeMint, afterMint |
| Bin burn* | beforeBurn, afterBurn |
2 Background
Hook-Based AMM Architecture. Hook-based AMMs separate pool execution from customization. Uniswap v4 [41] and PancakeSwap Infinity [27] use PoolManager contracts to maintain pool state and execute pool operations. Each pool can attach one Hook, and each Hook can serve multiple pools. To customize these operations, the PoolManager can invoke Hook callback functions, such as beforeSwap and afterSwap, on the attached Hook before or after an operation (Table 1). Pool permissions determine which callbacks run, while return-delta permissions control whether returned adjustments change settlement. A Hook may execute through a proxy that delegates to a separate implementation contract. Upgrades can change this implementation while retaining the Hook address.
Swap Fees and Hook Charges. Standard swap fees are collected within the pool's core exchange calculation. The pool charges fees on the input and exchanges the remainder. These fees compensate liquidity providers (LPs) and, when enabled, the protocol. In Listing 1, _swap at L4 records this exchange in swapDelta, a pair of signed token amounts: negative for the user's payment and positive for the receipt [39]. For pools with dynamic LP fees, beforeSwap can set the LP fee rate for that swap through lpFeeOverride (L2). The core _swap calculation uses this rate at L4, so the resulting fee remains included in swapDelta [37, 38].
Hooks can further adjust these exchange amounts through callback returns. Before the core exchange, beforeSwap also returns deltaBefore (L2), which can change the amount passed to the core swap (L3). Afterward, afterSwap inspects the core result and returns deltaAfter (L5). L6 combines these adjustments for each token into hookDelta, with positive amounts owed to the Hook and negative amounts supplied by it. L7 then subtracts this net Hook adjustment from swapDelta to obtain the user's final payment and receipt. A positive output-side hookDelta therefore reduces what the user receives and allows the Hook to retain the difference.
function swap(...) { // PoolManager (deltaBefore, lpFeeOverride) = hooks.beforeSwap(...); amountToSwap = adjustAmount(..., deltaBefore); swapDelta = _swap(..., amountToSwap, lpFeeOverride); deltaAfter = hooks.afterSwap(..., swapDelta, ...); hookDelta = combineDeltas(deltaBefore, deltaAfter); return swapDelta - hookDelta; }
Listing 1: Simplified swap flow with Hook adjustments.
Undisclosed Settlement Charges. A Hook can also use settlement adjustments to receive input tokens and supply output tokens to execute a swap. Our study focuses on additional deductions imposed by Hooks beyond these exchanged token amounts and standard pool fees. Because these deductions bypass the standard pool-fee parameters, fee breakdowns based on those parameters omit them. We call such unitemized deductions undisclosed settlement charges.
Listing 2 shows how the HXIC Hook retains output above the quoted amount in the trade from Figure 1 [6, 30]. At L2 and L3, it reads the quoted exchange rate from the caller-supplied hookData and uses the input amount to compute the quoted output, maxOut, which is 1,227K HXIC in this trade. At L4, the core output amountOut of 1,496K HXIC exceeds this quote, yielding excess of 269K HXIC. At L5, vault.mint records 269K HXIC as a balance that the Hook can later withdraw from PancakeSwap Infinity's settlement contract. To charge the same amount to the user, L6 returns it as deltaAfter. The PoolManager includes this adjustment in hookDelta and subtracts it from the core output (Listing 1, L7). The user therefore receives the quoted 1,227K HXIC, while the standard fee breakdown omits the 269K HXIC charge.
function afterSwap(...) external onlyPoolManager { (maxRate, denom) = HookDataDecoder.decodeExchangeRate(hookData); int256 maxOut = amountIn * maxRate / denom; int256 excess = amountOut > maxOut ? amountOut - maxOut : int256(0); if (excess > 0) vault.mint(address(this), currencyOut, uint256(excess)); return (this.afterSwap.selector, int128(excess)); }
Listing 2: The HXIC Hook retains output above the quote.
3 Methodology & Implementation
Section 3.1 explains how we identify charging-capable Hooks, and Section 3.2 describes the implementation.
3.1 Methodology
Method Overview. Our pipeline takes a registered Hook, its chain and protocol, and a reference block (Figure 2). First, the Proxy and Runtime Resolver recovers the Hook's implementation bytecode. Second, the Callback-Return Reconstructor combines callback effects under shared inputs and state into a net hookDelta. Third, the Undisclosed-Charge Identifier separates charges from exchanged amounts, tests path feasibility, and, when needed, validates core swap amounts and charge collection. For each charging operation type (swap or liquidity), it returns a charge expression and a witness assigning inputs and state that satisfy the path constraints. This establishes charging capability under those constraints. We separately check deployed pool permissions and historical use (§6). Proxy and Runtime Resolver. For direct deployments, the resolver retrieves Hook runtime bytecode at the reference block. For proxies, it follows implementation addresses from bytecode, storage slots, or beacon contracts to recover the callback implementation (§3.2). It passes this code to the Callback-Return Reconstructor.
Callback-Return Reconstructor. The reconstructor analyzes callbacks, Hook functions such as beforeSwap and afterSwap invoked by the PoolManager (§2). Callbacks in one swap can share state and offset one another's adjustments, so their effects must be analyzed together. We first summarize individual callback paths, then link them through shared inputs, storage, and core swap amounts, and finally sum their adjustments per asset into net hookDelta.

Figure 2: Charge identification (E: candidate charge).
Step I: Recover callback effects. The reconstructor locates the protocol-defined callbacks in Table 1 by their function selectors (call identifiers) and symbolically executes the resolved bytecode. For a proxy Hook, it executes the implementation contract's code while modeling reads and writes to the proxy's storage [43]. Starting from symbolic storage values, it records branch conditions, persistent and transaction-local (transient) storage writes, and external calls. At RETURN, it reconstructs the return buffer, checks it against the return format prescribed by the callback's application binary interface (ABI), and extracts the signed settlement adjustment. Each path summary retains the conditions, state updates, external calls, and returned adjustment. For example, the HXIC summary in Listing 2 links the condition amountOut > maxOut (L4) to the vault.mint call for excess (L5) and the returned adjustment int128(amountOut - maxOut) (L6).
Step II: Link callbacks within a swap. For swaps, the reconstructor uses summaries of beforeSwap, afterSwap, or both, according to the protocol's invocation rules. Uninvoked callbacks contribute no path conditions or state writes. A single callback's summary is used directly, including for post-operation liquidity callbacks. When both swap callbacks run, the reconstructor pairs their summaries and assigns shared inputs, including swap parameters and hookData, the same symbolic variables despite their different ABI offsets. It substitutes values written by beforeSwap into afterSwap's reads of the same persistent or transient storage slots, in both returned expressions and path conditions. Unwritten slots retain their initial symbolic values. For example, a fee f stored by beforeSwap must be used wherever afterSwap reads that slot. The core swap introduces another dependency: beforeSwap can change the user-specified swap amount. The user fixes either the input amount (exact-input) or the output amount (exact-output), making that side the specified asset. The reconstructor adds the beforeSwap adjustment for this asset to the original signed swap amount (Listing 1, L3). For the updated amount, direction, and swap mode, it assigns shared symbolic variables to the core input and output used in afterSwap expressions and conditions. Finally, it conjoins the linked conditions and discards incompatible pairs.
Step III: Compute the net settlement adjustment. The reconstructor sums only returned adjustments enabled by the protocol's return-delta permissions. An executed callback with this permission disabled contributes zero adjustment, but its path conditions and state writes remain in the linked summary. The standard-fee field lpFeeOverride is also excluded from the sum (Listing 1, §2). Using swap direction and mode, the reconstructor maps the specified asset and the other asset to the pool's two assets, currency0 and currency1. It then sums adjustments per asset into the net hookDelta subtracted from the core swapDelta [38, 39]. It retains individual callback contributions alongside this net adjustment. For example, adjustments of and to the same asset cancel, even though the second callback returns a positive amount.
Undisclosed-Charge Identifier. The identifier searches swap and liquidity paths separately. Steps I and II separate exchanged amounts from candidate charges and test whether a candidate can be positive under the Hook's execution constraints. Step III applies only when the charge or its triggering conditions depend on core swap amounts. It verifies that the pool can produce those amounts and the Hook collects the charge in the same execution. Each search stops at its first accepted path, which establishes charging capability for that operation type. It records required callbacks and return-delta permissions for comparison with pool configurations (§6).
Step I: Separate exchanged amounts. The identifier separates token amounts exchanged through the Hook (§2) from extra deductions, producing a candidate charge expression for asset j on each reconstructed path . For partial replacement, where the Hook executes only part of the exchange, it treats opposite-signed beforeSwap adjustments as exchanged amounts when the specified-asset adjustment depends on the user's swap amount. For example, in an exact-input swap of 1,000 units, adjustments of +100 input units and -50 output units mean that the Hook exchanges 100 input units for 50 output units, leaving 900 input units for the core. The positive 100 is therefore excluded as an exchanged amount. The identifier does not generally split fees embedded in such partial exchanges. Full replacement occurs when the beforeSwap adjustment cancels the user-specified amount passed to the core swap. For these paths, a positive adjustment to the other asset must match a supported fee form: an amount scaled by a nonnegative constant, or a residual f after canceling a shared base amount b, as in , with established by path conditions. Positive afterSwap components are also retained separately: if beforeSwap supplies output q via -q and afterSwap deducts f, the candidate is even when the net adjustment is negative. Other unmatched positive adjustments become candidates directly. These rules nominate candidates for the feasibility checks below.
Step II: Find a feasible positive charge. The identifier tests whether the candidate charge can be positive under the reconstructed Hook execution conditions. A positive denotes an extra deduction from the user's settlement. It therefore queries Z3 for
where combines linked callback conditions and state updates, non-revert conditions, return-value checks, and protocol-validity constraints. Pool fields, call input data (calldata), and initial storage remain symbolic within these constraints. The operator signed interprets the candidate amount as a signed 128-bit integer. For paths independent of core swap amounts, a satisfying assignment establishes charging capability. Otherwise, Step III augments the same query before a verdict is accepted.
Step III: Validate core swap amounts and charge collection. Step III checks that a positive candidate charge is consistent with the core exchange and its collection. Hook constraints alone may allow core amounts that the pool cannot produce. For Uniswap v4 exact-input paths with only afterSwap, the identifier computes core input and output amounts using a synthetic pool and the protocol's exact rounding rules [40]. It substitutes these amounts into Equation (1) while keeping Hook storage symbolic. For paths whose cryptographic or cross-contract dependencies prevent a standalone positive witness, a historical swap involving the Hook provides code, pre-state, and signed calldata for joint execution of the PoolManager, vault, and Hook. Quote and signature data remain fixed while selected swap parameters vary symbolically. For HXIC, this binds amountOut in the charging condition and deduction to the PoolManager's computed output (Listing 2, L4). Both execution models also require successful charge collection: take calls transfer tokens, or mint calls create redeemable claims for the Hook, with asset j and amounts summing to . Seeded execution additionally checks the corresponding increase in the Hook's retained vault balance. All constraints enter the same query, binding the charge, core amounts, and collection to one assignment.
3.2 Implementation
We implement the pipeline in Python with Z3 [10], analyzing byte-code without requiring verified source code.
The Proxy and Runtime Resolver extracts implementation addresses from bytecode for ERC-1167 minimal proxies [20] and clones with immutable arguments [22]. For EIP-1967 Transparent, UUPS, and Beacon proxies [22, 23], it reads standard implementation slots or queries beacon contracts.
The Callback-Return Reconstructor uses a custom 256-bit symbolic Ethereum Virtual Machine (EVM) executor. Execution starts at a recovered callback entry. If no entry is recovered, it starts at the beginning of the bytecode with the callback selector fixed in calldata. Constants and ABI offsets remain concrete, while unknown calldata, initial persistent (SLOAD) and transient (TLOAD) [3] storage values, environment variables, and external call returns are symbolic [43]. After state-changing calls, it discards cached storage reads to avoid reusing potentially outdated values. At RETURN, it checks the returned selector and extracts signed 128-bit settlement adjustments from the return buffer.
The Undisclosed-Charge Identifier searches swap and liquidity paths with separate time limits. For paths accepted after Steps I and II, take and mint calls provide additional collection evidence. Step III uses seeded joint execution for core-dependent PancakeSwap Infinity CL paths on BSC when standalone analysis finds no positive witness. It accepts a solver assignment only if concrete re-execution reproduces the charge. Unmodeled, unvalidated, and timed-out paths remain unresolved.
Identification Rules and Configuration. During expression normalization, an int128 cast is removed only when path conditions prove that it preserves the value. Otherwise, the truncated expression remains unresolved. To recognize full replacement of the core exchange, let be the signed swap amount and the beforeSwap adjustment for the specified asset. The core receives , so cancels that exchange. Separately identified fees on the other asset and positive afterSwap deductions remain candidates.
Symbolic pool parameters. Step II restricts symbolic pool fields to protocol-valid values. Uniswap v4 requires currency ordering (currency0 < currency1), tick spacing in [1, 32,767], and a static LP-fee field at most or the dynamic fee flag 0x800000. PancakeSwap Infinity CL applies the same spacing and fee bounds, limits packed parameters to 40 bits, and constrains price limits by swap direction. A recovered pure permission getter's result constrains the callback registration bitmap. We also constrain Hook and caller addresses and callback and return-delta permissions.
Synthetic pool configuration. For Uniswap v4 exact-input paths with only afterSwap, Step III uses a pool at price one with input raw units, liquidity , and zero protocol fee. It tests both swap directions with default LP fee zero and tick spacing 60, alongside bounded alternatives extracted from Hook guards. It computes core amounts under protocol rounding rules and substitutes them into the charge query, leaving Hook storage symbolic. Successful PoolManager take or mint calls must match the charged asset and a permitted recipient, with amounts summing to the charge.
Seeded joint execution. For BSC Infinity CL paths requiring core amount validation, Step III can jointly execute the PoolManager, vault, and Hook when standalone analysis finds no positive witness. An available historical seed supplies bytecode, pre-state, block context, and signed calldata. Quote and signature bytes remain fixed to preserve authorization, input-cap, and expiry guards. Selected swap amount words and the protocol fee field remain symbolic. The query ties the core and user settlement deltas to the charge, enforces the signed quote's guards, and requires a matching vault mint and an equal increase in the Hook's retained vault balance. Concrete re-execution must confirm the witness. For HXIC, valid witnesses retain the seeded swap amount with protocol-fee field values of 4,000 and 3,990. One extra raw unit fails authorization.
4 Data Collection
Our dataset covers Uniswap v4 on Ethereum and BSC alongside PancakeSwap Infinity Concentrated Liquidity (CL) and Bin pools on BSC [11–13]. We refer to these four configurations as platforms. Observation runs from each PoolManager deployment on January 23, 2025 for Ethereum v4, January 21, 2025 for BSC v4, and March 6, 2025 for Infinity through August 1, 2026. Pool initialization events identify 50,011 Hook pools. Their associated Hook addresses, deduplicated within each chain, yield 7,873 registered Hooks.
Table 2: Dataset statistics to Aug. 1, 2026.
| Measure | Ethereum | BSC | Total unique | ||
|---|---|---|---|---|---|
| v4 | v4 | CL | Bin | ||
| Hook pools | 27,231 | 15,310 | 7,388 | 82 | 50,011 |
| Registered Hooks | 5,928 | 1,173 | 710 | 63 | 7,873 |
| with verified source code | 2,467 | 186 | 309 | 40 | 3,001 |
| Pool activity events | 5,463,709 | 1,860,250 | 288,707,011 | 83,227 | 296,114,197 |
| Swap | 5,322,425 | 1,684,820 | 285,787,636 | 79,118 | 292,873,999 |
| ModifyLiquidity | 128,974 | 161,090 | 2,858,062 | - | 3,148,126 |
| Donate | 12,310 | 14,340 | 61,313 | 0 | 87,963 |
| Mint | - | - | - | 2,905 | 2,905 |
| Burn | - | - | - | 1,204 | 1,204 |
| Transactions with receipts | 4,213,904 | 27,138 | 2,659,236 | 8,154 | 6,907,077 |
| unique senders | 288,983 | 1,401 | 17,857 | 1,691 | 309,186 |
| TVL in USD millions | 42.848 | 4.474 | 66.928 | 0.011 | 114.260 |
Note. Totals count each address or transaction once per chain. BSC columns can share Hooks, transactions, or senders. The Mint and Burn rows count Bin liquidity operations.
We collect activity events for these pools during the observation window and exclude initialization events from activity counts. Table 2 summarizes these events and the 6,907,077 successful transactions with receipts used to characterize the ecosystem (6 and 6 and $7.
At the cutoff, we retrieve runtime bytecode, pool configurations, and verified source code from block explorers. Pool TVL comes from Uniswap v4 subgraphs [34] and the PancakeSwap Explorer API [28]. We sum valid reported values for 49,378 of the 50,011 pools and treat missing or invalid values as unknown. Reported zeros may reflect unpriced tokens. The 906.62M protocol total on DeFiLlama includes pools without Hooks across all chains.
5 RQ1: Hook Ecosystem Characterization
Across the four studied platforms [27, 41], our dataset covers 7,873 registered Hooks governing 50,011 pools with $114.26M in TVL (Table 2) [11–13]. We examine where economic activity concentrates, whether Hook rules can be inspected and remain stable, and which trading behaviors Hooks customize.

Figure 3: Hook and TVL shares by the number of deployments sharing bytecode, normalized per platform. U-E and U-B denote Uniswap v4 on Ethereum and BSC.

(a) Activity concentration
(b) Pool reuse vs. activity
Figure 4: Transactions across 3,052 observed Hooks, counted once per Hook: (a) cumulative shares with Hooks ranked by activity per platform and (b) counts versus attached pools.
Code Reuse, Liquidity, and Activity. The relationship between code reuse and liquidity differs across platforms (Figure 3). We recover implementation bytecode for 7,852 Hooks, identifying 6,463 distinct bytecodes, with 21.23% of these Hooks sharing code with another deployment. In Uniswap v4, pools whose Hook bytecode appears in only one deployment hold 99.3% of recorded TVL on Ethereum and 99.4% on BSC. In contrast, pools whose Hook code appears in two to five deployments hold 62.0% of TVL in PancakeSwap CL and 99.7% in Bin.
Recorded transaction activity is concentrated in a few Hooks and only weakly related to pool counts. In the receipt-based traces (§4), excluding targeted charge backfill, 2,143,934 transactions have complete call trees with classified Hook calls, including failed internal calls, across 3,052 Hooks. Counting each transaction once per chain and invoked Hook yields 2,176,743 Hook transaction pairs, of which the top ten Hooks account for 63.81%. Figure 4a shows that activity is also concentrated within each platform. Transaction counts correlate weakly with attached pool counts (Spearman , Figure 4b). For example, Angstrom on Ethereum serves just two pools yet appears in 856,392 recorded transactions, whereas ClankerHookStaticFeeV2 on BSC serves 8,441 pools but appears in only 3,569 transactions.
Insight 1: Pool counts are a poor guide to recorded transaction activity, with a correlation of only across the 3,052 Hooks in our call records.
Source Transparency and Upgradeability. Only 38.12% of registered Hook addresses have verified source code on block explorers. Verification also differs across chains for widely reused code: among bytecodes deployed over 100 times, all 355 Ethereum Hook deployments are verified, but none of the 250 BSC deployments are.
Even when code is inspectable, a stable Hook address does not guarantee stable trading rules. Hooks can change these rules through upgrades, unlike conventional AMMs with immutable pool logic [4]. Of 533 proxy Hooks (6.77%), 104 support replacing the implementation [22, 23]. On-chain histories record 49 implementation upgrades after pool creation across 14 Hooks serving 20 pools. Of these upgrades, 10 have source and runtime evidence of rule changes, including two with historical configuration evidence, 11 show controlled runtime differences, and 28 establish implementation replacement only. For example, the MEVSwap Hook serves five active Ethereum pools. Its upgrades introduced a tx.origin blacklist that blocked 14 addresses and a check on ETH payments to the Hook after deducting base-fee gas costs. Raising the minimum from zero to 0.008 ETH then caused a payment of 0.001 ETH after this deduction to fail, although the prior version accepted it.
Functional Landscape. Two authors with expertise in EVM bytecode analysis and DeFi developed our functional taxonomy through open card sorting [32, 45]. Starting from 7,873 registered Hooks, they excluded deployments without substantive callback logic, derived functional categories from implementation evidence, and applied the resulting codebook to the remaining deployments.
Artifact Card Structure. We automatically generate an artifact card for each of the 6,463 unique bytecodes recovered from 7,852 deployments. Each card summarizes callbacks, settlement and state effects, external calls, and guards, alongside source and trace evidence. Shared bytecode can behave differently across deployments, so the card also records their pool permissions, immutable arguments, and storage states. Verified source is available at 3,001 registered Hook addresses and for the resolved implementations of 2,958 deployments. Figure 5 illustrates how the evidence supports a functional label for HXIC.
Stage 1 (Baseline Filtering). We first exclude deployments without substantive callback logic at the August 1, 2026 cutoff. Of the 7,873 registered Hooks, 21 resolve to empty or uninitialized targets. Among the 7,852 code-resolved deployments, another 749 lack callable callback logic under their pool configurations, and 21 are no-op Hooks with selector-only returns. Excluding these 770 empty or uninitialized Hooks and 21 no-op Hooks leaves 7,082 deployments for functional classification.
Stage 2 (Codebook Development). The authors derive categories from the behaviors represented on the remaining cards. They inspect available source code and bytecode settlement or call summaries, assigning descriptive labels to callback behaviors without preset categories [45]. Using AMM design concepts [1, 2, 26, 41] and
https://etherscan.io/address/0x0000000aa232009084bd71a5797d089aa4edfad4#code.
https://bscscan.com/address/0xc5d309026bcab6630888d51ce21154ad2f4828cc#code. https://etherscan.io/address/0x99d32f38aa4d1ec911420cba3b52d11cb9f0b0c0#code.
Table 3: Functional taxonomy of registered Hooks (), including non-exclusive deployment shares and labeling criteria.
| Domain / Sub-category | Hooks | Share | Inclusion criteria | Exclusions |
|---|---|---|---|---|
| I. Settlement, Pricing & Fee Customization | ||||
| Custom accounting | 5,619 | 71.37% | Changes settlement through nonzero callback deltas or a protocol-linked claims ledger. | Ordinary token transfers, zero deltas, or asset withdrawals without a supported settlement path. |
| LP fee management | 484 | 6.15% | Updates or overrides core LP fees through an applicable pool mechanism. | Fee calculations with no effective update, or overrides ignored by fixed-fee pools. |
| Rewards & revenue distribution | 151 | 1.92% | Accrues rewards or distributes rewards, rebates, or revenue to designated recipients. | Generic transfers, asset rescue, or game scores without reward logic. |
| Custom pricing | 104 | 1.32% | Uses a custom quote or curve to determine amounts on a supported swap path. | Unused quotes, core-price reads, or LP fee changes alone. |
| II. Access, Launch & Order Control | ||||
| Participation & access control | 2,463 | 31.28% | Restricts pool operations by participant identity, eligibility, timing, or launch state. | PoolManager authentication alone, generic argument checks, or fee exemptions. |
| Pool launch coordination | 234 | 2.97% | Requests pool initialization or records a validated initialization lifecycle event. | Neutral initialization callbacks, or assumed liquidity provision by an external bootstrapper. |
| Order execution | 6 | 0.08% | Maintains order state and processes fills or settlement on a supported execution path. | Order-related names or events without order-processing logic. |
| III. Liquidity & External Capital Management | ||||
| External asset strategies | 428 | 5.44% | Deposits, withdraws, lends, borrows, or stakes assets through an external strategy or vault. | An external address or call without a confirmed asset operation. |
| Liquidity management | 232 | 2.95% | Creates, adjusts, or removes liquidity positions, including corresponding share accounting. | Pool initialization alone or a generic asset transfer. |
| IV. Telemetry & External State Integration | ||||
| Application state integration | 126 | 1.60% | Updates application state, content seeds, or an application engine from a swap path. | AMM accounting alone, administrative setters, or presumed payouts from game state. |
| Oracles & market observation | 23 | 0.29% | Maintains observations for a price or market-data service. | A price getter alone, or local swap statistics not serving an oracle or data feed. |
| Other identified functions | 59 | 0.75% | Implements a verified function outside the named categories, such as local swap logging or statistics. | Unclear behavior, missing code, or an unverified external dependency. |
| Empty or uninitialized / No-op | 770 / 21 | 9.78% / 0.27% | Empty bytecode, no callable callback logic under pool configuration, or selector-only neutral returns. | |
HXIC artifact card
-
Deployment: BSC PancakeSwap CL. Direct implementation (HXIC Hook [6]).
-
Callbacks and permissions: beforeSwap and afterSwap enabled. afterSwapReturnsDelta = true.
-
Conditions: Input amount and signed quote rate in hookData set quoted output maxOut. Charging requires core output amountOut to exceed maxOut.
-
Settlement effects and external calls: beforeSwap returns zero adjustment. afterSwap deducts the excess output, and vault.mint credits the same asset and amount to the Hook. No LP fee override, external strategy, or lending calls.
-
Evidence and label: Verified source, recovered control flow, and sampled trace 0xda0a75...0ea6d8.
Settlement, Pricing & Fee Customization → Custom accounting.
Figure 5: HXIC artifact card: an enabled output deduction and matching claim support the custom accounting label.
observed on-chain patterns, they merge synonymous labels into twelve sub-categories and group them into four domains. The codebook defines inclusion and exclusion criteria alongside deployment counts (Table 3).
Stage 3 (Full-Dataset Labeling). Both authors independently apply the finalized codebook to all 7,082 remaining deployments. First, they label the capabilities implemented by each callback on a bytecode card. They then retain a label for an associated deployment only when its pool configuration enables the corresponding callback and any required return-delta permissions. This permits shared code review while distinguishing deployments with different permissions. All supported labels are retained, so a Hook can have multiple capabilities. A third author helps resolve disagreements by jointly reviewing control flow, available source, and historical traces until consensus is reached.
Labeling Criteria and Taxonomy Results. Each label in Table 3 requires implementation evidence for a reachable callback path under the deployment's configuration; function names or event signatures alone do not suffice. We apply these criteria to Hooks with and without verified source, so labels indicate supported capabilities rather than historical use. Registered Hooks fall into three groups: classified, empty or uninitialized, or no-op. Classified Hooks may have multiple labels across enabled callbacks, and all percentages use the 7,873 registered Hooks. Other identified functions requires verified callback logic outside the eleven named sub-categories.
The most common capability is directly changing the amounts users pay or receive at settlement. Although dynamic LP-fee adjustment is a flagship design motivation for Hook-enabled AMMs [27, 41], only 6.15% can adjust standard LP-fee rates (LP fee management). By comparison, 71.37% can directly adjust what users pay or receive at settlement (custom accounting), and 31.28% restrict participation or access. RQ2 examines when settlement adjustments become additional charges.
Insight 2: Directly adjusting users' settlement amounts is supported by 71.37% of registered Hooks, compared with 6.15% for adjusting standard LP fees.
Table 4: Charge categories and matching historical evidence.
| Charge mechanism | Static | Historical Confirmation | |||
|---|---|---|---|---|---|
| Hooks (%) | Active (H) | Checked (K) | Charged (F) | Share (F/K) | |
| Amount-based swap | 1,791 (93.62%) | 1,487 | 1,457 | 871 | 59.78% |
| Fixed-amount fee | 7 (0.37%) | 5 | 4 | 2 | 50.00% |
| Stored-amount fee | 1 (0.05%) | 0 | 0 | 0 | - |
| External-amount fee | 25 (1.31%) | 22 | 15 | 1 | 6.67% |
| Liquidity fee | 89 (4.65%) | 57 | 57 | 2 | 3.51% |
| Total | 1,913 (100%) | 1,571 | 1,533 | 876 | 57.14% |
Each Hook has one primary category. The liquidity row excludes 11 Hooks with detected charges in both operation types, which are assigned to swap categories. H: Hooks with category-relevant history. K: Hooks in H with at least one operation whose settlement establishes a positive or zero charge. F: Hooks with observed charges matching their assigned category. F/K: share of checked Hooks with such charges.
Table 5: Charging-capable Hooks: pool counts and TVL.
| Protocol and chain | All Hook-enabled pools' TVL | Attached pools' TVL | Attached pools with available TVL / total |
|---|---|---|---|
| Uniswap v4 ETH | $42.848M | $1.830M | 7,288/7,328 |
| Uniswap v4 BSC | $4.474M | $0.790M | 8,764/9,206 |
| PancakeSwap CL | $66.928M | $0.451M | 746/746 |
| PancakeSwap Bin | $0.011M | $0.000M | - |
| Total | $114.260M | $3.072M | 16,798/17,280 |
Answer to RQ1. Among registered Hooks, 71.37% can directly change what users pay or receive at settlement, vs. 6.15% that adjust standard LP fees. Pool counts weakly reflect transaction activity ( across 3,052 Hooks in our call records).
6 RQ2: Undisclosed Charge Prevalence
We examine how settlement customization becomes a charging channel, how its deployment footprint relates to recorded liquidity, and how often charges occur in historical operations.
Charging Prevalence and Mechanisms. Applying our static analyzer (§3) to all 7,873 registered Hooks, we identify 1,913 deployments (24.30%, spanning 1,427 unique bytecodes) capable of imposing undisclosed settlement charges. Two authors independently audited 100 static positives uniformly sampled from the 1,913 identified charging Hooks against the identification criteria (§3.1), confirming all 100 as true positives (100% sample precision).
Charging paths occur in both swap and liquidity operations. Searching each type separately (§3.1) identifies swap charging in 1,824 Hooks and liquidity charging in 100, with 11 in both groups. To avoid double-counting, Table 4 assigns each Hook one primary category, prioritizing swap when both types are detected. For swaps, we classify the charge expression in the retained witness as amount-based when it depends on a trade amount, including through a stored or external rate. Otherwise, the category follows whether the charge amount is constant, stored, or externally supplied.
Charges tied to trade amounts dominate the assigned categories, accounting for 1,791 Hooks (93.62%). Among these, 1,595 apply percentage cuts using constant (917) or stored (678) rates, 13 use external rates, and 183 have other expressions involving trade amounts, including partially recovered calculations.
Deployment Footprint and Liquidity. Charging capability spans a larger share of pools than of recorded liquidity. The 1,913 charging-capable Hooks serve 17,280 of 50,011 Hook-enabled pools (34.55%). Table 5 reports 1.830M), while BSC Uniswap v4 has the highest relative share (17.67% of platform TVL).
Insight 3: Deployment counts alone cannot characterize charging exposure: pools attached to charging-capable Hooks constitute 34.55% of Hook-enabled pools but hold only 2.69% of recorded ecosystem TVL. Charging in Practice. Pool configurations permit the identified primary charging paths in 16,918 of the 17,280 associated pools (97.91%, spanning 1,848 Hooks), enabling the required callbacks and settlement adjustments (§3.1). The other 362 pools lack at least one required permission.
Historical reconstruction links each swap to its callback effects and resulting token movements to establish whether charging capability is exercised. After validating successful receipts and traces against the same transaction and block, we delimit the swap by its manager call path and identify its directly invoked callbacks using selectors, caller identities, and permissions. For swaps with a core AMM exchange, we match a unique core Swap event using the manager, pool, sender, amounts, and execution order, map returned adjustments to the two assets with disabled return-delta contributions discarded, and check that subtracting these adjustments from the core amounts reproduces the caller's settlement. For full-replacement swaps without a core exchange, settlement is reconciled directly from callback adjustments and token movements when exchanged amounts can be separated from extra deductions; ambiguous event associations or unexplained exchanged amounts remain unresolved.
We attribute transfers and protocol-claim changes to callbacks by asset, amount, and successful call path, checking receipt evidence and retained balances. Exchanged tokens, standard pool fees, refunds, unrelated payments, and later claim redemptions are excluded from new Hook revenue. An audited positive deduction establishes charging occurrence, while a zero-charge verdict requires the settlement to be fully explained by exchanged amounts and standard fees, including the effects of state-changing calls. Dollar-cost and ratio measurements in §7 additionally require every deduction to be fully matched to retained revenue, burns, or LP donations. The 361 swaps excluded from those measurements have valid core exchanges and settlement identities but incomplete matching of at least one deduction; they still count as charging swaps.
Of the 1,913 charging-capable Hooks, 1,571 have operations relevant to their primary category (H), and 1,533 have at least one with an established positive or zero charge (K, Table 4). Matching executed Hook code and charge-producing expressions to the assigned category confirms charges in 876 of these 1,533 Hooks (F, 57.14%).
A supplementary audit checks for historical swap deductions regardless of a Hook's primary category. For each combination of chain, Hook, callback selector, and return-value sign pattern, we select up to four observations ordered by SHA256 hash and add each Hook's latest swap. Across the 1,568 Hooks with swap history, this yields 1,953 operations in 1,604 transactions. Of these operations, 1,389 have confirmed deductions, 441 have no hookDelta charge, and 123 remain unresolved. The confirmed deductions span 1,118 transactions and 1,097 Hooks. These historical measurements differ in scope: Table 4 confirms category-matching charges in 876 Hooks, this sample confirms deductions regardless of category in 1,097, and $7 verifies collected revenue in 1,172 across all available traces. These three Hook sets share 794 deployments.
We then measure charging frequency across individual swaps, including deductions outside a Hook's primary category. Across 1,568 charging-capable Hooks with swap history, we identify 2,505,716 eligible swaps after excluding 20,997 service operations from 2,526,713 swap calls. The excluded operations mint UNI20 inscriptions, consuming the entire specified input as a service charge without an AMM exchange. A swap is accounted when settlement evidence establishes whether it incurs an additional deduction beyond exchanged tokens and standard pool fees. This succeeds for 2,482,619 eligible swaps (99.08%), with coverage of 98.27% on Ethereum Uniswap v4, 99.45% on BSC Uniswap v4, and 99.98% on PancakeSwap CL. For the remaining 23,097, we cannot separate exchanged tokens from charges or reconstruct the effects of state-changing external calls.
Charges recur within these accounted swaps, but their frequency varies by platform. Overall, 1,470,344 of the 2,482,619 swaps (59.23%) incur deductions. The rates are 75.76% on BSC Uniswap v4, 69.79% on PancakeSwap CL, and 43.53% on Ethereum Uniswap v4. RQ3 examines the economic costs of these deductions.
Answer to RQ2. We identify charging capability in 1,913 of 7,873 Hooks (24.30%). Their pools constitute 34.55% of Hook-enabled pools but hold 2.69% of recorded TVL. Among 2,482,619 accounted swaps involving identified charging-capable Hooks, 1,470,344 (59.23%) incur deductions.
7 RQ3: Economic Burden Analysis
Static identification establishes charging capability, whereas historical accounting distinguishes the resulting user costs from the Hook revenue retained by the contract. These quantities need not coincide because deductions extracted from settlement (§6) may also fund burns or LP donations. Costs therefore comprise all deductions beyond exchanged amounts and standard pool fees, including burns and LP donations that do not become Hook revenue, while unrelated donations and standalone burns are excluded. Among 1,470,349 charging operations (1,470,344 swaps and five liquidity operations), 10,815 include token destruction and 26,689 include LP donations. These operations may also generate Hook revenue, but the burned or donated amounts are excluded from that revenue. Cost measurements require every deduction to be fully matched to revenue, burns, or LP donations, while revenue can be verified from attributable transfers or new protocol claims. We value tokens in USD using Chainlink price feeds at the execution block or market quotes from the prior 24h. For USD valuation, accepted quotes must be positive, match token decimals, and carry timestamps at or before execution within the permitted 24-hour window alongside provider checks.
Hook Revenue and Concentration. Among 1,913 charging-capable Hooks, 1,172 collect charges in available traces. Revenue accounting records direct transfers and new protocol claims, counting each claim at creation and excluding later redemption from new revenue. The audited ledger, deduplicated by event identity,

Figure 6: Hook counts (bars) and revenue shares (line) by revenue band for 1,044 priced Hooks.

Figure 7: Global revenue ranks of 1,044 priced charging Hooks, grouped by platform. Bubble size indicates revenue.

Figure 8: Weekly revenue: platform shares (bars, left) and USD totals (line, right, log scale). The final week (*) covers July 27 to August 1, 2026.
contains 1,489,847 accepted records: 810,764 transfers and 679,083 claims linked to their mint traces. Of the 1,172 Hooks, 1,044 have priced revenue totaling 3,965,281.97) across 1,244,343 transactions. Direct token transfers via take contribute 74.84% (1.00M). Hooks can later redeem these claims for tokens.
Insight 4: Revenue accounting must track protocol claims alongside token payments because 25.16% of recorded Hook revenue accrues as newly minted claims.

(a) Additional cost (USD)
(b) Charge ratio
Figure 9: Cumulative distributions of Hook charges: (a) USD costs for 1,426,116 fully priced charging swaps and (b) fractions of the corresponding token amounts before deduction.
Revenue is concentrated and sustained over time. Figure 6 shows that seven Hooks earning at least $100K each account for 53.04% of the total, and the top ten account for 59.02%. Priced charges occur in 65 consecutive weeks from May 2025 through August 1, 2026. Figures 7 and 8 show revenue across Hooks and over time: Hooks are ranked globally, while weekly bars report each platform's share alongside the total revenue curve.
Per Swap Cost. Charging frequency and cost per swap differ across platforms. Of the 1,470,344 charging swaps in §6, 1,426,116 (96.99%) have fully reconciled deductions and accepted historical prices for every deducted asset (Figure 9a). Coverage is 91.24% on Ethereum Uniswap v4, 99.79% on BSC Uniswap v4, and 99.95% on PancakeSwap CL. The median additional cost is 2.79, and the maximum 8.17 on Ethereum Uniswap v4 and below $0.41 on BSC Uniswap v4 and PancakeSwap CL, despite more frequent charges.
Insight 5: Among identified charging-capable Hooks, charges occur more frequently on BSC Uniswap v4 than on Ethereum (75.76% versus 43.53% of accounted swaps), yet mean charges per fully priced charging swap are lower (below 8.17).
Charges Relative to Swap Amounts. We measure charges relative to token amounts before Hook deductions (Figure 9b). The relative-cost analysis uses a narrower sample, requiring a valid core exchange taking one asset and supplying the other to define the precharge denominator, with the user paying at least that input and receiving at most that output. Differences must be fully matched to retained Hook revenue, burns, or LP donations. Hook-executed exchanges failing these checks are excluded. We divide each input deduction by core input plus that deduction, and each output deduction by core output before deduction. Core input includes standard pool fees. Both denominators exclude gas, and the input denominator excludes refunds. For example, in one Ethereum transaction , the user transfers wei (the smallest ETH denomination) but receives a refund leaving wei. The Hook deducts wei, leaving 2 wei for the core swap; the charge is nearly 100% of the remaining input, but 0.5% of the initial transfer.
Valid ratios cover 295,764 input-side and 1,177,962 output-side charging swaps, with 3,743 represented on both sides. The remaining 361 swaps have confirmed charges but lack complete reconciliation of every deducted amount, so they are excluded from both ratio and dollar-cost samples. The median ratios are 1.00% on the input side and 0.25% on the output side. Charges strictly exceed 1% in 124,455 input observations (42.08%) and 134,691 output observations (11.43%). Deductions of this size can make narrow margin trades unprofitable without appearing in the quoted pool fee.
Comparison with Standard Pool Fees. We compare Hook charges with standard LP and protocol fees in the same swaps at the same historical token prices. To recover exact standard fees, we replay the pool's swap calculation using Pool and SwapMath and reproduce the recorded core deltas, final price, liquidity, tick, and applied fees for 743 swaps: 735 on Ethereum Uniswap v4 and eight on PancakeSwap CL, seven of the latter with nonzero protocol fees. Of 456 replays with comparable prices, 154 have zero standard fees. In the remaining 302, Hook charges exceed standard fees in 299 (99.01%).
To extend the comparison beyond exact replays without replaying every swap, we compute bounds on standard fees that account for the protocol's integer rounding. The core swap rounds fees up at each calculation step, so rounding increments can accumulate across a swap. Let be the gross core input consumed at step , including its standard fee , both in raw token units. Let be the total fee rate recorded in the Swap event, fixed during the core swap and expressed with denominator . For , protocol rounding gives . With total gross input , total standard fees , and at most steps, summing the rounded-up fees gives
Each additional step can add at most one raw token unit to the rounding difference, and fees cannot exceed gross input X. We use the conservative step bound , based on monotonic price progression through the protocol's finite tick range, including boundary and terminal steps. For , both bounds are zero.
Each comparison is tied to a chain, transaction, Hook, manager call path, and block, using the input asset, X, f, token decimals, and accepted historical prices. We convert both bounds and Hook costs to USD under the same valuation policy. Costs strictly above the converted upper bound are classified as higher than the standard fee, and those strictly below the converted lower bound as lower. Across the 1,470,344 confirmed charging swaps, event records identify 728,986 with zero standard fees (49.58%) and 741,358 with positive fee rates. Pricing Hook costs requires prices for the deducted assets, whereas comparing them with standard pool fees additionally requires a price for the core input asset; full pricing of Hook deductions therefore does not by itself establish price comparability for both fee types. Both fee types have comparable prices in 110,198 positive-rate swaps (14.86%), while 631,160 lack them. The bounds establish higher Hook charges in 82,665 (75.01%), lower charges in 27,497, and leave 36 indeterminate cases (which remain in the 110,198-swap denominator for the reported 75.01%).
Ethereum transaction 0x7562ef...fd0fc3.
Insight 6: Hook charges can dominate standard pool fees: they exceed them in 82,665 of 110,198 charging swaps with positive pool-fee rates and comparable token prices (75.01%).
Answer to RQ3. Across 1,044 priced Hooks, recorded revenue totals 8.17 on Ethereum Uniswap v4 and below $0.41 on BSC Uniswap v4. Hook charges exceed standard fees in 82,665 of 110,198 charging swaps with positive pool-fee rates and comparable prices (75.01%).
8 Discussion
Fee Disclosure and Monitoring. Fulfilling a quoted output does not establish fee transparency. In the HXIC example (Figure 1), the trader receives the quoted tokens while the Hook retains 18% of the core output, absent from the displayed fee breakdown. This gap arises because Hook deductions bypass standard pool-fee accounting, even when their rates are fixed. Dynamic charges further require disclosure to reflect the trade's inputs and execution state. Interfaces should therefore itemize standard fees and Hook deductions alongside expected payment and output. Pre-trade simulation could estimate these components for the trade's inputs and simulated state, with post-trade accounting reporting actual deductions. Both require separating charges from exchanged amounts carried in settlement adjustments (§3.1). Monitoring should also track upgrades to detect trading-rule changes at existing Hook addresses. Interpreting Economic Exposure. Deployment counts alone cannot characterize exposure. Pool counts weakly track observed transactions (RQ1). Pools attached to charging-capable Hooks comprise 34.55% of Hook-enabled pools but hold only 2.69% of recorded TVL (RQ2). Higher charging frequency can also accompany lower per-swap costs (RQ3). Assessment and monitoring should therefore combine activity, charging frequency, and cost with deployment and liquidity measures. TVL measures capital at the cutoff, whereas cumulative charges span the observation window.
Limitations and Scope of Inference. Measurements cover the four studied platforms through August 1, 2026. Charging rates use swaps with established charging status, while dollar totals use verified records with accepted historical prices and exclude unpriced charges. These subsets may differ systematically from omitted swaps, limiting generalization. Excluding unpriced charges does not guarantee that quotes are lower bounds, so $3.97M denotes recorded revenue rather than a strict lower bound. Bounded execution and unresolved dependencies can miss charging paths, and one primary category cannot represent all mechanisms a Hook supports. The study measures deductions outside standard pool-fee accounting (§2), without determining malicious intent or disclosure across all interfaces.
9 Related Work
Smart Contract Program Analysis. Static and symbolic analyzers inspect Solidity source code or recover execution paths and verify properties from EVM bytecode [8, 14, 19, 33, 35, 36], while fuzzers explore concrete state spaces [17, 31]. More specialized analyses model fund flows to identify Ponzi schemes [7], generate security-oriented descriptions for users [25], and detect allocation manipulation [24]. Our analysis links shared inputs and state across Hook callbacks to reconstruct settlement effects and separate additional charges from exchanged amounts and standard fees.
Smart Contract and DeFi Empirical Studies. Prior measurement studies characterize code reuse and diversity in the Ethereum contract ecosystem [16]. DeFi studies examine DEX execution, maximal extractable value (MEV) [9, 15], flash-loan exploits [29], price manipulation [18, 44], and traditional AMM mechanism design [4, 42]. Hook-enabled AMMs extend this setting by allowing external contracts to customize pricing and settlement. Our study characterizes how these contracts are deployed and reused, and measures the additional settlement costs they impose on traders.
Hook-Enabled AMM Ecosystems. Documentation and early overviews describe Uniswap v4 Hook permissions and fee mechanisms [5, 41]. Closest to our work, Oh and Lee [21] categorize structural threats and evaluate deployed Hooks through dynamic simulation. Our study measures the prevalence and economic burden of undisclosed settlement charges across Uniswap v4 and PancakeSwap Infinity, combining bytecode analysis with historical settlement reconstruction.
10 Conclusion
We combined bytecode analysis with historical settlement reconstruction to characterize the Hook ecosystem and measure undisclosed settlement charges on Uniswap v4 and PancakeSwap Infinity. Our analysis identified charging capability in 24.30% of registered Hooks, while historical accounting recorded $3.97M in Hook revenue. These charges bypass standard pool-fee accounting and can remain unitemized even when a trader receives the quoted output, showing that quote fulfillment alone does not establish fee transparency. Fee disclosure should therefore itemize additional Hook deductions alongside standard fees and reconcile the quoted breakdown with actual settlement.
References
[1] Hayden Adams. 2023. Our Vision for Uniswap v4. https://blog.uniswap.org/uniswap-v4. Published: 2023-06-13. Accessed: 2026-09-20.
[2] Hayden Adams, Moody Salem, Noah Zinsmeister, Sara Reynolds, Austin Adams, Will Pote, Mark Toda, Alice Henshaw, Emily Williams, and Dan Robinson. 2024. Uniswap v4 Core. https://app.uniswap.org/whitepaper-v4.pdf. Accessed: 2026-09-20.
[3] Alexey Akhunov and Moody Salem. 2018. EIP-1153: Transient Storage Opcodes. https://eips.ethereum.org/EIPS/eip-1153. Accessed: 2026-10-16.
[4] Mohammad Ali Asef and Seyed Mojtaba Hosseini Bamakan. 2024. From to uniswap hooks: A comparative review of decentralized exchanges (dex). arXiv preprint arXiv:2410.10162 (2024).
[5] Brad Bachu, Joel Hasbrouck, Fahad Saleh, and Xin Wan. 2025. An overview of uniswap v4 for researchers. Available at SSRN 5152215 (2025).
[6] BscScan. 2026. Verified source code for PancakeSwap positive-slippage absorption hook. https://bscscan.com/address/0x44428c6ce391915d51f963c0dd395cd0f95fdfd2#code#F1#L143.
[7] Weimin Chen, Xinran Li, Yuting Sui, Ningyu He, Haoyu Wang, Lei Wu, and Xiapu Luo. 2021. SADPonzi: Detecting and Characterizing Ponzi Schemes in Ethereum Smart Contracts. Proceedings of the ACM on Measurement and Analysis of Computing Systems 5, 2, Article 26 (2021), 30 pages. doi:10.1145/3460093
[8] ConsenSys Diligence. 2026. Mythril, a Security Analysis Tool for EVM Bytecode. https://github.com/ConsenSysDiligence/mythril. Accessed: 2026-05-25.
[9] Philip Daian, Steven Goldfeder, Tyler Kell, Yunqi Li, Xueyuan Zhao, Iddo Bentov, Lorenz Breidenbach, and Ari Juels. 2020. Flash boys 2.0: Frontrunning in decentralized exchanges, miner extractable value, and consensus instability. In 2020 IEEE symposium on security and privacy (SP). IEEE, 910–927.
[10] Leonardo de Moura and Nikolaj Bjørner. 2008. Z3: An Efficient SMT Solver. In Tools and Algorithms for the Construction and Analysis of Systems. Springer, 337–340. doi:10.1007/978-3-540-78800-3_24
[11] DeFiLlama. 2026. DeFiLlama Hook-based AMM. https://defillama.com/protocols/hook-based-amm.
[12] DeFiLlama. 2026. Hook-based AMM on BSC. https://defillama.com/protocols/hook-based-amm/bsc.
[13] DeFiLlama. 2026. Hook-based AMM on Ethereum. https://defillama.com/protocols/hook-based-amm/ethereum.
[14] Neville Grech, Lexi Brent, Bernhard Scholz, and Yannis Smaragdakis. 2019. Giga-horse: thorough, declarative decompilation of smart contracts. In 2019 IEEE/ACM 41st International Conference on Software Engineering (ICSE). IEEE, 1176–1186.
[15] Ningyu He, Tianyang Chi, Xiaohui Hu, and Haoyu Wang. 2025. The Gold Digger in the Dark Forest: Industrial-Scale MEV Analysis in Ethereum. In 2025 40th IEEE/ACM International Conference on Automated Software Engineering (ASE). IEEE, 3661–3671. doi:10.1109/ASE63991.2025.00303
[16] Ningyu He, Lei Wu, Haoyu Wang, Yao Guo, and Xuxian Jiang. 2020. Characterizing Code Clones in the Ethereum Smart Contract Ecosystem. In Financial Cryptography and Data Security. Springer, 654–675. doi:10.1007/978-3-030-51280-4_35
[17] Bo Jiang, Ye Liu, and Wing Kwong Chan. 2018. Contractfuzzer: Fuzzing smart contracts for vulnerability detection. In Proceedings of the 33rd ACM/IEEE international conference on automated software engineering. 259–269.
[18] Queping Kong, Jiachi Chen, Yanlin Wang, Zigui Jiang, and Zibin Zheng. 2023. Defitainter: Detecting price manipulation vulnerabilities in defi protocols. In Proceedings of the 32nd ACM SIGSOFT International Symposium on Software Testing and Analysis. 1144–1156.
[19] Loi Luu, Duc-Hiep Chu, Hrishi Olickel, Prateek Saxena, and Aquinas Hobor. 2016. Making smart contracts smarter. In Proceedings of the 2016 ACM SIGSAC conference on computer and communications security. 254–269.
[20] Peter Murray, Nate Welch, and Joe Messerman. 2018. ERC-1167: Minimal Proxy Contract. https://eips.ethereum.org/EIPS/eip-1167. Accessed: 2026-10-16.
[21] Hoon Oh and Seyoung Lee. 2026. Lifecycle-Aware Security Evaluation of Programmable DeFi Hooks: A Framework for Uniswap V4. Computer Networks 275 (2026), 111900. doi:10.1016/j.comnet.2025.111900
[22] OpenZeppelin. n.d.. OpenZeppelin Contracts 5.x: Proxy API. https://docs.openzeppelin.com/contracts/5.x/api/proxy. Accessed: 2026-10-16.
[23] Santiago Palladino, Francisco Giordano, and Hadrien Croubois. 2019. ERC-1967: Proxy Storage Slots. https://eips.ethereum.org/EIPS/eip-1967. Accessed: 2026-10-16.
[24] Yu Pan, Jing Li, Qi Zhang, Xifeng Jin, Yuannan Yang, and Dan She. 2026. AllocScope: Towards Automated Vetting of Allocation Manipulation in Smart Contracts. In Proceedings of the 34th ACM International Conference on the Foundations of Software Engineering (FSE Companion '26). ACM, 507–512. doi:10.1145/3803437.3805223
[25] Yu Pan, Zhichao Xu, Levi Taiji Li, Yunhe Yang, and Mu Zhang. 2023. Automated Generation of Security-Centric Descriptions for Smart Contract Bytecode. In Proceedings of the 32nd ACM SIGSOFT International Symposium on Software Testing and Analysis. ACM, 1244–1256. doi:10.1145/3597926.3598132
[26] PancakeSwap. 2025. CLVeCakeExclusiveHook: An Access-Control Hook Example for PancakeSwap Infinity. https://github.com/pancakeswap/infinity-
hooks/blob/644c30f1cb09e4eee04becb6198da1414bdb0e77/src/pool-cl/vecake-exclusive/CLVeCakeExclusiveHook.sol. Repository revision dated 2025-03-05. Accessed: 2026-09-20.
[27] Pancakeswap. 2026. Pancakeswap Infinity Hooks. https://docs.pancakeswap.finance/trade/pancakeswap-infinity/hooks.
[28] PancakeSwap. n.d.. PancakeSwap Explorer API. https://explorer.pancakeswap.com.
[29] Kaihua Qin, Liyi Zhou, Benjamin Livshits, and Arthur Gervais. 2021. Attacking the defi ecosystem with flash loans for fun and profit. In International conference on financial cryptography and data security. Springer, 3–32.
[30] seaify1. 2026. X post discussing positive-slippage absorption in a hook. https://x.com/seaify1/status/2008420053025517680.
[31] Chaofan Shou, Shangyin Tan, and Koushik Sen. 2023. Ityfuzz: Snapshot-based fuzzer for smart contract. In Proceedings of the 32nd ACM SIGSOFT international symposium on software testing and analysis. 322–333.
[32] Donna Spencer. 2009. Card sorting: Designing usable categories. Rosenfeld Media.
[33] Tianle Sun, Ningyu He, Jiang Xiao, Yinliang Yue, Xiapu Luo, and Haoyu Wang. 2024. All your tokens are belong to us: Demystifying address verification vulnerabilities in solidity smart contracts. In 33rd USENIX Security Symposium (USENIX Security 24). 3567–3584.
[34] The Graph. n.d.. Graph Explorer. https://thegraph.com/explorer.
[35] Trail of Bits. 2026. Slither, the Solidity Source Analyzer. https://github.com/cryti c/slither. Accessed: 2026-05-25.
[36] Petar Tsankov, Andrei Dan, Dana Drachsler-Cohen, Arthur Gervais, Florian Buenzli, and Martin Vechev. 2018. Securify: Practical security analysis of smart contracts. In Proceedings of the 2018 ACM SIGSAC conference on computer and communications security. 67–82.
[37] Uniswap. 2026. Hooks.sol – Uniswap v4 Hook Invocation and Return-Delta Logic. https://github.com/Uniswap/v4-core/blob/main/src/libraries/Hooks.sol.
[38] Uniswap. 2026. IHooks.sol – Uniswap v4 Core Hook Interface. https://github.com/Uniswap/v4-core/blob/main/src/interfaces/IHooks.sol.
[39] Uniswap. 2026. PoolManager.sol – Uniswap v4 Core PoolManager. https://github.com/Uniswap/v4-core/blob/main/src/PoolManager.sol.
[40] Uniswap Labs. 2025. SwapMath.sol: Uniswap v4 Core Swap Computation. https://github.com/Uniswap/v4-core/blob/v4.0.0/src/libraries/SwapMath.sol. Release v4.0.0. Accessed: 2026-10-16.
[41] Uniswap Labs. 2026. Uniswap v4 Hooks. https://docs.uniswap.org/contracts/v4/concepts/hooks.
[42] Sam Werner, Daniel Perez, Lewis Gudgeon, Ariah Klages-Mundt, Dominik Harz, and William Knottenbelt. 2022. Sok: Decentralized finance (defi). In Proceedings of the 4th ACM Conference on Advances in Financial Technologies. 30–46.
[43] Gavin Wood. 2025. Ethereum: A Secure Decentralised Generalised Transaction Ledger. https://ethereum.github.io/yellowpaper/paper.pdf. Shanghai version efc5f9a, dated 2025-02-04. Accessed: 2026-10-16.
[44] Bosi Zhang, Ningyu He, Xiaohui Hu, Kai Ma, and Haoyu Wang. 2025. Following Devils' Footprint: Towards Real-time Detection of Price Manipulation Attacks. In 34th USENIX Security Symposium (USENIX Security 25). 4127–4145.
[45] Thomas Zimmermann. 2016. Card-sorting: From text to themes. In Perspectives on data science for software engineering. Elsevier, 137–141.