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
- ETH / COLE (0.00% fee) — 24h volume $0, TVL $437, 0 swaps today
- ETH / SHOW (0.00% fee) — 24h volume $0, TVL $432, 0 swaps today
- ETH / Everything (0.00% fee) — 24h volume $0, TVL $668, 0 swaps today
- ETH / TCC (0.00% fee) — 24h volume $0, TVL $76, 0 swaps today
- ETH / T (0.00% fee) — 24h volume $0, TVL $2.33, 0 swaps today
- ETH / Geka (0.00% fee) — 24h volume $0, TVL $19, 0 swaps today
- ETH / Brian (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / TROON (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / LASTMAN (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / kleptocracy (0.00% fee) — 24h volume $0, TVL $1.23, 0 swaps today
- ETH / GIGO (0.00% fee) — 24h volume $0, TVL $1.80, 0 swaps today
- ETH / LASTMAN (0.00% fee) — 24h volume $0, TVL $1.73, 0 swaps today
- ETH / Savvy (0.00% fee) — 24h volume $0, TVL $105, 0 swaps today
- ETH / Huxley (0.00% fee) — 24h volume $0, TVL $3.32, 0 swaps today
- ETH / Matt (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / Longjunbao (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / FLESH (0.00% fee) — 24h volume $0, TVL $0.80, 0 swaps today
- ETH / DOGELON (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / monies (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / WINNIE (0.00% fee) — 24h volume $0, TVL $0.85, 0 swaps today