Dynamic fee hook on Polygon
Uniswap v4 Hook Contract 0x86ff650df79afc2af0a229aef4b0d74f05e0e0cc on Polygon · Dynamic fee
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $0
- Pools using this hook
- 1
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 0
What it does
A per-pool configurable dynamic-fee hook that charges swappers a fee bounded by built-in min/max limits and splits it among protocol, royalties and a vault, while leaving LP deposits and withdrawals untouched.
This read was written for the hook 0x2dbe…20cc on Robinhood Chain and reused here: the two share a code shape, so constants such as fees, owners and addresses can differ.
How it works step by step
- Runs a per-pool fee system where each pool has its own admin, configuration and optional plug-in modules that can shape the swap fee.
- Checks pool setup at creation time and registers the pool with its settings (fee bounds, update interval, staleness limits).
- Computes a fee on each swap within contract-defined minimum and maximum fee constants, with a fixed protocol share and capped total royalties.
- Can take a portion of swap amounts through swap return deltas, apparently routed to a vault, protocol and royalty recipients.
- Does not run on liquidity adds or removals, so LPs can deposit and withdraw freely.
- Swap behaviour
- Before and after each swap the hook looks up the pool's configuration and modules, computes a fee, and can adjust swap amounts to collect it. Exact fee values and caps (MIN_FEE, MAX_FEE, MAX_TOTAL_ROYALTY_BPS) exist as constants but cannot be read from the bytecode summary.
- Liquidity behaviour
- No liquidity callbacks are enabled; LPs can add and withdraw freely and the hook cannot block or charge withdrawals.
- Fee behaviour
- Swap fees are set per pool between hard-coded minimum and maximum constants and may be collected via return deltas, with a fixed protocol share and capped royalties sent to recipients/vault. Exact percentages are unknown from bytecode.
- Owner & admin controls
- Each pool has an admin (transferable or resignable) who can change fee settings, module configuration, royalty splits and price/tick parameters, apparently within contract constants like MAX_FEE and MAX_TOTAL_ROYALTY_BPS whose values are not visible.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize: registers and validates new pools; beforeSwap: computes the fee and may take part of the input; afterSwap: updates state and may take part of the output; beforeSwapReturnDelta/afterSwapReturnDelta: lets the hook deduct fees from swap amounts.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, low confidence).
Who controls it: Per-pool admins can adjust fees, royalties and modules within contract-defined bounds whose values are unknown; admin can be transferred or resigned.
Risk to user funds: The hook can take a fee from swap input or output up to an unverified MAX_FEE plus royalties; LP principal stays in the PoolManager and withdrawals are unrestricted.
Security findings
- [medium] Unverified hook with active swap deltas: The hook can deduct from swap amounts and per-pool admins can tune fees and royalties; exact caps cannot be confirmed without source.
- [low] External fee modules: Admin-configured modules are called with a gas limit during swaps and may influence fees or cause swaps to fail.
- [info] LP withdrawals unrestricted: Remove-liquidity callbacks are disabled, so LP principal cannot be locked by the hook.
Contract details
- Verified source
- No
- Bytecode size
- 23,722 bytes
- Upgradeable proxy
- No
- Detected patterns
- return-delta
Pools using Dynamic fee hook
- POL / USDC (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today