DexHooks

Docs

How DexHooks reads hooks, classifies them, and measures the activity behind them.

What is a hook?

A Uniswap V4 pool can attach a hook: a contract that runs at set moments in the pool's life. Hooks can control fees, launch conditions, allowlists, swap behavior, revenue routing and limits. Most explorers show pools, tokens, volume and liquidity. DexHooks adds the missing dimension: what logic is controlling that liquidity.

Hook categories

A classification is only stated as fact when it is confirmed. Tentative ones are marked “Likely”, and unclassified hooks stay Unknown.

Fee Hook
Charges or redirects swap fees.
Dynamic Fee
Changes fees according to market conditions.
Launch Protection
Controls trading during launch.
Allowlist
Restricts who can interact.
Revenue Sharing
Routes part of activity revenue somewhere.
Trading Limits
Maximum buy, sell, wallet, or transaction limits.
Oracle
Uses external or onchain data to change behavior.
Custom Logic
Anything that does not fit existing categories.
Unknown
Indexed, but not yet confidently classified.

Ranking metrics

Hooked Volume
Total trading volume across pools using the hook. The main ranking metric.
Hooked Liquidity
ETH and stablecoin reserves held by the hook's pools. The other token's side is not counted, because its price is set by the pool itself. Exact only for pools indexed since creation; shown as a lower bound (≥) otherwise.
Volume in USD
Measured on the ETH or stablecoin side of each swap. Stablecoins count as $1 and ETH is priced from ETH/stablecoin swaps. Pools with neither side have no USD volume.
Hooked Swaps
Number of swaps that invoked the hook.
Active Pools
Pools using the hook that had at least one swap in the last 24 hours.
Growth
Change in volume or swaps versus the previous period of the same length.
Estimated Hook Fees
Swap fees read from each Swap event. A hook that can take extra amounts itself is marked Estimated. Otherwise labelled Estimated (prefixed with ~) or Unavailable. DexHooks does not invent revenue numbers.

Reading hook callbacks

A hook's permissions are encoded in the last 14 bits of its address, so they can be read without source code.

beforeInitialize
Runs custom logic before a pool is created, and can reject pools it does not accept.
afterInitialize
Runs custom logic right after a pool is created, such as recording its launch time.
beforeAddLiquidity
Runs custom logic before liquidity is added, and can block deposits.
afterAddLiquidity
Runs custom logic after liquidity is added.
beforeRemoveLiquidity
Runs custom logic before liquidity is withdrawn, and can block or delay withdrawals.
afterRemoveLiquidity
Runs custom logic after liquidity is withdrawn.
beforeSwap
Runs custom logic before every swap. It can change the fee or block the trade.
afterSwap
Runs custom logic after every swap.
beforeDonate
Runs custom logic before tokens are donated to the pool's liquidity providers.
afterDonate
Runs custom logic after tokens are donated to the pool's liquidity providers.
beforeSwapReturnDelta
Can change how much a trader pays or receives before the swap executes.
afterSwapReturnDelta
Can take or add tokens to a trade's output after the swap executes.
afterAddLiquidityReturnDelta
Can change the amounts a liquidity provider owes when depositing.
afterRemoveLiquidityReturnDelta
Can change the amounts a liquidity provider receives when withdrawing.