CreatorCoinHook on Base

Uniswap v4 Hook Contract 0x5e5d19d22c85a4aef7c1fdf25fb22a5a38f71040 on Base · Rewards · Verified contract

Volume (24h)
$0
Value locked (TVL)
$0
All-time volume
$14.66M
Pools using this hook
18,921
Swaps (24h)
441 (26 traders)
Total swaps
5.2M

What it does

Hook for Zora Creator Coin pools on Uniswap v4 that seeds the pool with the coin's liquidity curve and, after every swap, harvests LP fees, reinvests part of them as liquidity, converts the rest to a backing currency and pays it to the creator and the protocol.

How it works step by step

  • On pool initialization, the hook verifies that the caller is a registered V4 coin, computes multi-curve (Doppler-style) liquidity positions from the coin's pool configuration and mints them into the pool through the hook's own unlock callback.
  • After every swap it collects accrued fees from all of its stored positions by calling modifyLiquidity with a zero liquidity delta.
  • About 33.33% of the collected fees (LP_REWARD_BPS = 3333) is re-minted as single-sided liquidity, placed two tick spacings away from the current tick. The remainder becomes market rewards.
  • The remaining fees are swapped through the coin's payout swap path (possibly multi-hop) into the payout currency, taken to the hook, and split 50% to the coin's payoutRecipient (creator) and 50% to the protocolRewardRecipient.
  • The hook emits a Swapped event with the swapper, the trusted-sender flag, the swap amounts and the post-swap price.
  • A coin can migrate liquidity to a new hook version if the upgrade gate has registered that upgrade path.
Swap behaviour
No beforeSwap callback. In afterSwap the hook looks up the coin for the pool and reverts with NoCoinForHook if there is none. It then collects fees from its positions, re-mints part of them as liquidity, swaps the rest to the payout currency inside the pool manager, pays out rewards, and emits Swapped. It returns a zero delta, so it does not take tokens from the swapper through return deltas. The hook swaps in other pools during afterSwap, so the gas cost of each swap is higher.
Liquidity behaviour
The hook registers no add/remove liquidity callbacks. It is the owner of the pool's positions: it mints them at initialization and when it re-mints rewards, burns them all during migrateLiquidity, and can mint leftover balances into the last position after a migration. Third-party LPs are not restricted by callbacks.
Fee behaviour
The hook does not override the swap fee. The pool's LP fee is set when the pool is created, and the MarketConstants library defines 3% (30000) for V4 coins. The hook takes the fees accrued on its own positions: about 1/3 goes back into liquidity, and the rest goes 50% to the creator and 50% to the protocol recipient in the payout currency. The CreatorCoinRewards path has no referrer or Doppler split.
Owner & admin controls
No owner or pause functions appear in the hook's ABI or source, and the parameters are immutable (pool manager, coin version lookup, upgrade gate, supply for positions). The trusted message senders are set only in the constructor. The only privileged flows are migrateLiquidity, which only the pool's coin contract can call and only to a new hook registered in the external HooksUpgradeGate, and initializeFromMigration, which only registered old hooks can call. Who controls the upgrade gate and the coin contracts cannot be seen from this input.

Enabled Uniswap v4 callbacks

afterInitialize, afterSwap

afterInitialize registers the coin for the pool, generates its positions and mints the initial liquidity, and returns early if the hook itself initialized the pool during a migration. afterSwap harvests and reinvests fees, converts the rest to the payout currency, distributes rewards and emits the Swapped event.

Security & trust assessment

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

Who controls it: There is no owner in the hook itself. Control sits with the external upgrade gate, which decides which hook migrations are allowed, and with the coin contract, which sets the payout recipients and can trigger migration. These could redirect fee flows or move the liquidity into a different hook.

Risk to user funds: The hook does not custody user deposits. It holds the pool's seeded liquidity positions through the pool manager and transiently holds fee tokens before paying them out. The protocol and creator receive about two-thirds of the fees accrued on its positions. A failing reward transfer can block swaps, and a migration can move the liquidity to another hook.

Security findings

  • [medium] Hook controls pool liquidity and can migrate it: migrateLiquidity burns all hook-held positions and moves the tokens to a new hook, callable by the coin contract if the upgrade gate has registered the path. Whoever controls the gate and the coin can therefore redirect pool liquidity to a different hook.
  • [medium] Reward recipients come from external coin contract: payoutRecipient, protocolRewardRecipient and the payout swap path are read from the coin contract on each swap. Anyone who can change those values on the coin can change where the rewards go.
  • [low] Swaps depend on external calls and can revert: afterSwap makes external calls to the coin and performs nested swaps along the payout path. A reverting recipient, a coin lookup failure or an ETH transfer failure (EthTransferFailed) would make the swap fail.
  • [low] Recursive swaps for fee conversion: UniV4SwapToCurrency swaps with price limits at the extreme edges (MIN/MAX sqrt price), with no slippage protection on the fee conversions. The comment says the limit is deliberately not exposed, so fee conversion can happen at poor prices in thin pools.
  • [info] No return-delta permissions: The hook has neither beforeSwapReturnDelta nor afterSwapReturnDelta enabled, and afterSwap returns zero, so it cannot take extra swapper funds through deltas.

Contract details

Verified source
Yes (CreatorCoinHook)
Compiler
solc 0.8.28+commit.7893614a
Bytecode size
20,037 bytes
Upgradeable proxy
No
Detected patterns
moves-currency, rewards, self-unlock

Pools using CreatorCoinHook