UniversalKlikHook on Ethereum

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

Volume (24h)
$0
Value locked (TVL)
$16.62K
All-time volume
$8.58M
Pools using this hook
1,290
Swaps (24h)
0 (0 traders)
Total swaps
53,339

What it does

A Uniswap v4 hook that charges a market-cap-tiered fee in ETH on token swaps and splits it between a platform treasury and the token's creator.

How it works step by step

  • Computes a swap fee from the token's market cap, looked up from a configured factory contract.
  • Uses 16 market-cap tiers from 1.25% down to 0.35%, with the owner able to change them within a 1.25% cap per tier.
  • Takes the ETH-side fee from the pool with poolManager.take and returns it as a return delta.
  • Forwards a platform share to the treasury and the remainder to the token address.
  • Waives all fees in the block the pool is initialized.
  • Reverts exactOutput sells because the fee cannot be computed before the swap.
Swap behaviour
On ETH-in exact-input buys the fee is taken in beforeSwap and sent out to the treasury and token address. On exact-output buys and exact-input sells the fee is taken in afterSwap on the ETH side. exactOutput sells revert.
Liquidity behaviour
No liquidity callbacks.
Fee behaviour
Charges a dynamic fee in ETH on every swap of a token/ETH pool, with a fee tier chosen from the token's market cap (looked up via an external factory). Tiers run from 1.25% total at low market cap down to 0.35% at the top; the fee is split between a platform treasury and the token (creator) address. Pools get no fee in the block they were initialized.
Owner & admin controls
Owner (set to tx.origin at deploy) can set platform treasury, factory address, fee tiers (capped at 1.25% per tier), transfer ownership, and rescue any ETH held by the hook via rescueETH. No pause or upgrade mechanism found.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize records the pool's deployment block so the launch block is fee-free. beforeSwap and afterSwap take the ETH-side fee from the pool via poolManager.take and return it as a delta so the swapper pays it. beforeSwapReturnDelta and afterSwapReturnDelta are enabled so the hook can alter the swap's amounts.

Security & trust assessment

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

Who controls it: The owner can change fee tiers (up to 1.25% per tier), redirect the platform treasury and factory, and sweep all ETH held by the hook. A malicious owner could redirect platform fees to an arbitrary address or swap in a factory returning a manipulated market cap to move fees between tiers.

Risk to user funds: The hook holds ETH temporarily during swaps and can take a fee from the pool's ETH delta through return deltas. It does not hold token balances. The owner can withdraw any ETH the hook holds, and swaps can be blocked if the token contract rejects ETH.

Security findings

  • [medium] Owner-controlled fee routing and tier selection: Owner can point platformTreasury and factory at any address; the factory's getMarketCap result decides which fee tier applies, so a compromised owner or factory can push fees to the maximum 1.25% for any pool.
  • [medium] Owner can sweep hook ETH balance: rescueETH transfers the hook's entire ETH balance to any address chosen by the owner, including fees waiting to be forwarded.
  • [low] Swaps can revert if the token rejects ETH: Creator share is sent to the token address via a low-level call that reverts the swap on failure, so a token contract that rejects ETH can block swaps; the platform share failure is silent and stranded ETH remains in the hook.
  • [info] exactOutput sells revert: Swaps are blocked for exactOutput sells, a design restriction that can be noted by users attempting those trades.
  • [info] Single-key ownership: Owner is set to tx.origin in the constructor and is a single EOA with no two-step transfer, so ownership is not protected by a multisig or timelock.

Contract details

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

Pools using UniversalKlikHook