Dynamic fee hook on World Chain

Uniswap v4 Hook Contract 0xa91940e2226ea36327aec742c4ce03a337f84044 on World Chain · Dynamic fee

Volume (24h)
$0
Value locked (TVL)
$0
All-time volume
$4.67
Pools using this hook
1
Swaps (24h)
0 (0 traders)
Total swaps
1

What it does

A Uniswap v4 hook that takes a fee from swaps after execution and routes it to a treasury, with owner-managed exemptions for specific addresses.

How it works step by step

  • Charges a fee on swap output through afterSwap with afterSwapReturnDelta enabled.
  • Exempts whitelisted addresses from the hook fee via the isFeeExempt mapping.
  • Accumulates collected fees and forwards them through handleHookFees to a treasury address.
  • Exposes HOOK_FEE and treasury getters so the fee configuration is readable on-chain.
  • Uses ERC6909 claims and currency movement helpers to hold and settle fee amounts with the pool manager.
  • Restricts configuration changes (fee exemptions, ownership) to the owner.
Swap behaviour
After each swap the hook runs afterSwap and uses return delta accounting to take a share of the output, skipping addresses marked as fee-exempt.
Liquidity behaviour
Liquidity add and remove callbacks (beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity, afterRemoveLiquidity) are present in the dispatch table, but the decoded selectors do not reveal whether they apply custom logic beyond returning the selector.
Fee behaviour
HOOK_FEE() is exposed as a pure getter and the hook takes a fee on swaps via afterSwap return delta, with exempt addresses (isFeeExempt mapping) skipping the fee. Exact fee rate and accounting could not be determined from decoded bytecode alone.
Owner & admin controls
Owner (storage slot 0) can transfer or renounce ownership and can set per-address fee exemption via setFeeExempt(address,bool) (slot 1 mapping). No pause or upgrade functions were identified in the decoded selectors. The owner-only handleHookFees(address[]) and treasury-related functions are present but their access checks could not be fully confirmed from bytecode alone.

Enabled Uniswap v4 callbacks

afterSwap, afterSwapReturnDelta

afterSwap: applies a post-swap fee or accounting step. afterSwapReturnDelta: lets the hook take a share of the swap output as a return delta. Other callbacks in the dispatch table appear to be interface stubs.

Security & trust assessment

Risk level: medium, estimated (decoded bytecode, low confidence).

Who controls it: The owner can exempt addresses from the hook fee, transfer ownership to any address, or renounce ownership. Control over handleHookFees and treasury routing means the owner can direct accumulated hook fees.

Risk to user funds: The hook can take a share of swap output via afterSwapReturnDelta and the owner directs accumulated fees to a treasury. Funds held by the hook itself are at risk only through owner-controlled withdrawal paths, which could not be fully verified without source.

Security findings

  • [medium] Hook takes swap proceeds via return delta: Afterswap return delta lets the hook take a portion of every swap's output token, so the hook contract holds and moves user-generated value.
  • [medium] Owner controls fee exemptions: Owner can add or remove fee-exempt addresses at will, which can selectively shift fee burden between traders.
  • [medium] Owner controls fee destination: Hook-fee accumulation is routed through handleHookFees and treasury, so the owner determines where collected fees go.
  • [info] Single-owner control without timelock: Ownable pattern with transferOwnership and renounceOwnership; no timelock was identified in the decoded selectors.

Contract details

Verified source
No
Bytecode size
7,401 bytes
Upgradeable proxy
No
Detected patterns
erc6909-claims, moves-currency, ownable, return-delta, self-unlock

Pools using Dynamic fee hook