ConfigurableKlikHook on Ethereum

Uniswap v4 Hook Contract 0xb8d9477eb6ef5f0df5219cf0c8130dd7e520e0cc on Ethereum · Dynamic fee · Verified contract

Volume (24h)
$2.07K
Value locked (TVL)
$60.89K
All-time volume
$7.43M
Pools using this hook
593
Swaps (24h)
11 (4 traders)
Total swaps
14,864

What it does

A Uniswap v4 fee hook that charges buy and sell taxes on ETH-paired token pools, with a launch-decay tax and a volume-driven surcharge, and routes the fee to the platform, hook creator, token creator, a buyback-and-burn budget and holder rewards.

How it works step by step

  • Charges a per-pool buy tax and sell tax, in basis points, on every swap in an ETH-paired pool.
  • Applies a launch decay that starts high and slides to the normal tax over a set number of seconds, for both buys and sells.
  • Adds a surcharge that rises linearly with the pool's rolling ETH volume, capped at a constant 25% total effective tax.
  • Splits every fee five ways (platform, hook creator, token creator, buyback, rewards) and pays each share out or records it for later claiming.
  • Accumulates a buyback budget and, once 0.1 ETH is reached, swaps it for tokens and burns them through the PoolManager claim mechanism.
  • Pushes ETH rewards to a limited number of holders per swap via the token's accrueRewards and processRewards functions.
Swap behaviour
On exact-input buys, beforeSwap takes the buy-side fee from the specified ETH amount. On sells and exact-output buys, afterSwap takes the fee from the ETH the pool moved. Each taxed swap triggers distribution, a possible automatic buyback and burn, and a bounded push of rewards to holders.
Liquidity behaviour
No liquidity callbacks.
Fee behaviour
Each taxed swap charges a buy tax and a sell tax in bps, plus a launch decay that starts at decayStartBps on buys and sells and slides down over decaySeconds, plus an activity surcharge that scales with recent ETH volume up to surchargeMaxBps. Total is hard-capped at 25% (MAX_EFFECTIVE_TAX_BPS). The launch block is fee-free. Fees are split five ways (platform, hook creator, token creator, buyback, rewards) with exact-to-the-wei accounting; the token creator share is sent to the token contract.
Owner & admin controls
Platform (hookRegistry or platformTreasury) can call setAutoPush, setPlatformTreasury, setTokenFactory (registry only), sweepPlatform and executeBuyback (platformTreasury only). Hook creators can claim their own earnings but cannot change config. The BUYBACK_THRESHOLD and MAX_EFFECTIVE_TAX_BPS are constants with no setter. Config per pool is set at registration by the token factory and is not changeable afterwards. The proxy delegates to an implementation address, so the implementation could be swapped if the proxy admin holds an upgrade key; upgrade authority is not visible in the provided input.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize restricts pool initialisation to the token factory. beforeSwap takes the buy-side fee via poolManager.take, records volume and flushes pending burns. afterSwap records sell-side or exact-output fees, takes them, may trigger the automatic buyback, flushes burns on buys and pushes rewards to holders. beforeSwapReturnDelta and afterSwapReturnDelta are enabled so the hook can take a specified-currency amount from the swap, which is how the fee is charged.

Security & trust assessment

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

Who controls it: Platform keys can redirect the platform share (setPlatformTreasury), change the auto-push budget and holder count, trigger manual buybacks, and sweep unclaimedPlatform. They cannot change per-pool tax rates. If the proxy upgrade admin is a single key, that key could replace the implementation and therefore change fees, pool handling and fund routing for every hook instance.

Risk to user funds: The hook takes ETH from every taxed swap and holds it transiently, then forwards it to the platform treasury, the hook creator (claimable), the token contract, the holder reward sink and the buyback budget. Failed direct sends fall back to unclaimedPlatform or pendingRewards held by the hook. The hook can also burn tokens bought with the buyback budget and hold ERC-6909 claims until flushed. A swap can revert through the 'Creator fee failed' require if the token rejects the ETH transfer, and the BuybackSkipped path is designed not to block the trader's swap.

Security findings

  • [medium] Upgradeable proxy with unverified admin: The hook is deployed behind a proxy whose implementation can differ from the verified source if an upgrade is made. Upgrade authority and any timelock were not provided in the input.
  • [medium] Buyback can be sandwiched: The automatic buyback has no price guard. Anyone can push the price up, let a burn fire at the inflated price and sell, with the loss borne by token holders. The source comments state a measured cost of up to roughly 25% of a tranche at a 10 ETH pump.
  • [low] Reward parking relies on later swaps: Exact-input and exact-output paths and rewards parking were hardened after prior audit findings. Parked reward shares are released only in a later block, which limits same-transaction extraction but still depends on subsequent swaps happening to flush them.
  • [info] Hook takes tokens via return deltas: Buy and sell tax are taken in the specified currency through return deltas, so the hook can reduce the amount a trader receives or increase the amount they pay. A 25% effective cap bounds this, and a pool config can set fees well below that ceiling.
  • [info] Per-pool tax bounded by constant cap: Tax rates are fixed at registration per pool and cannot be altered by an admin, and the 25% cap is a constant.

Contract details

Verified source
Yes (ConfigurableKlikHook)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
45 bytes
Upgradeable proxy
Yes
Detected patterns
moves-currency, return-delta, rewards, self-unlock, tax, upgradeable

Pools using ConfigurableKlikHook