UniversalKlikHook on Ethereum

Uniswap v4 Hook Contract 0x96b893683afbfec071e90f78d00de4bb932fe0cc on Ethereum · Fee sharing · Verified contract

Volume (24h)
$651
Value locked (TVL)
$51.03K
All-time volume
$9.47M
Pools using this hook
2,239
Swaps (24h)
11 (5 traders)
Total swaps
44,962

What it does

Charges a dynamic 0.35% to 1.25% fee on ETH-side amounts of trades in token pools, with the fee tier chosen by the token's market cap and split between a platform treasury and the token creator.

How it works step by step

  • Reads a token's market cap from a configured factory contract to select a fee tier between 0.35% and 1.25%.
  • Charges the fee on ETH-side amounts in buys and sells of token pools, with the exact side depending on swap direction and exact-input or exact-output mode.
  • Pays no fee in the pool's deployment block.
  • Splits each fee between a platform treasury address and the token's creator address, sending the creator share directly to the token contract address.
  • Lets the owner update fee tiers, treasury, factory, transfer ownership and rescue ETH.
Swap behaviour
On exactInput buys the fee is taken in beforeSwap from the ETH input. On exactOutput buys and exactInput sells the fee is taken in afterSwap from the unspecified ETH amount. exactOutput sells revert.
Liquidity behaviour
No liquidity callbacks.
Fee behaviour
Charges a dynamic fee on ETH-side amounts of token trades: total fee ranges from 0.35% to 1.25% depending on token market cap read from the factory (default tiers 1.25% down to 0.35%), with zero fee in the pool's deployment block. The fee is split between a platform treasury (platformBps) and the token creator address (remainder). Fallback fee is 1% if no factory is set. Buys with exactInput are taxed in beforeSwap, exactOutput buys and exactInput sells are taxed in afterSwap.
Owner & admin controls
Owner (set to tx.origin at deployment) can set fee tiers (capped at 1.25% total per tier), set platform treasury address, set factory address used for market-cap lookups, transfer ownership, and rescue any ETH held by the hook to an arbitrary address. No pause function and no proxy upgrade mechanism found.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize records the deployment block per pool to exempt launch-block trades from fees. beforeSwap takes the fee on exactInput buys by calling poolManager.take and returns a specified-currency delta. afterSwap taxes the unspecified ETH side for exactOutput buys and exactInput sells and returns an unspecified delta. beforeSwapReturnDelta and afterSwapReturnDelta allow the hook to take fee amounts from swap deltas.

Security & trust assessment

Risk level: medium (verified source, high confidence).

Who controls it: The owner can set fee tiers up to 1.25% per tier, redirect platform fees by changing the treasury address, change the factory feeding market-cap data (which changes which fee tier applies to every pool), transfer ownership to any address, and withdraw any ETH balance the hook holds. The owner therefore controls fee levels and fee routing for all pools using this hook.

Risk to user funds: The hook holds ETH temporarily during swaps and when platform sends fail. Users cannot be charged more than the 1.25% per-tier cap per swap, but the owner can rescue any ETH held by the hook. The hook takes fee ETH via return deltas, so trader proceeds are reduced by the fee. Token balances are not custodied by the hook.

Security findings

  • [medium] Owner can alter fee schedule and market-cap source instantly: setFactory and setFeeTiers let the owner change the market-cap source and fee schedule for all existing pools immediately, with no timelock. Fees are capped at 1.25% per tier, so the maximum fee is bounded.
  • [medium] Owner can withdraw all ETH held by the hook: rescueETH transfers the hook's full ETH balance to any address chosen by the owner. ETH from failed platform sends is held in the hook until rescued, so this includes accumulated fee funds.
  • [medium] Creator transfer failure reverts swaps: A failed platform treasury send is silently ignored and the amount stays in the hook, while a failed creator transfer reverts the whole swap. A malicious or non-payable creator address can therefore block swaps for that token.
  • [info] Hook takes currency via return deltas: The hook can take ETH from swap deltas on each taxed swap and send it to the treasury and creator, so user swap outcomes depend on these fee transfers succeeding.
  • [info] Single owner set from tx.origin: ownership is set to tx.origin in the constructor and the owner is a single EOA with no multisig requirement visible in the code.

Contract details

Verified source
Yes (UniversalKlikHook)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
7,030 bytes
Upgradeable proxy
No
Detected patterns
dynamic-fee, moves-currency, ownable, return-delta, rewards

Pools using UniversalKlikHook