CreatorCoinHook on Base

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

Volume (24h)
$0
Value locked (TVL)
$0
All-time volume
$139.20M
Pools using this hook
369,331
Swaps (24h)
882 (63 traders)
Total swaps
9.1M

What it does

Hook for Zora Creator Coin pools that, on every swap, collects LP fees from the hook's own liquidity positions, recycles part of them as new 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 it checks the caller is a registered V4 coin, builds multi-curve Doppler liquidity positions from the coin's pool configuration, and mints them into the pool from the hook.
  • After every swap it collects accrued fees from all of its positions by calling modifyLiquidity with a zero liquidity delta.
  • About 33% of the collected fees are re-minted as single-sided liquidity positions placed two tick spacings away from the current tick.
  • The remaining fees are swapped through the coin's payout swap path (possibly multi-hop) into a final payout currency and taken to the hook.
  • The hook then pays 50% of the payout to the coin's payoutRecipient and the remainder to the protocolRewardRecipient, and emits CreatorCoinRewards and Swapped events.
  • Liquidity can be migrated to a new hook through a registered upgrade path, either by the coin calling migrateLiquidity or by a registered old hook calling initializeFromMigration.
Swap behaviour
No fee or delta changes are applied to the user's swap itself: afterSwap returns a zero delta. After the swap the hook runs reward logic inside the pool manager unlock context. It collects fees, mints LP rewards, swaps the rest to the payout currency, transfers the rewards, and emits a Swapped event. It reverts with NoCoinForHook if the pool has no registered coin. It also calls the coin's getPayoutSwapPath and tries IMsgSender(sender).msgSender() to record the original swapper. A revert anywhere in this path, for example a failing recipient transfer or a swap-path pool failure, would revert the user's swap.
Liquidity behaviour
No liquidity callbacks. The hook itself is the LP owner of the pool's positions: it mints them on initialization, adds fee-funded single-sided positions after swaps, and burns them all during a migration.
Fee behaviour
The pool LP fee is set by the coin's pool configuration (the multi-curve default is 3%). The hook does not override it with a dynamic fee. Fees accrue to the hook's positions and are split: about 33.33% is recycled as LP liquidity and the rest is paid out as market rewards. Of the market rewards, 50% goes to the creator payout recipient and the remainder goes to the protocol reward recipient. A trade referrer in the hookData is decoded but not used by CreatorCoinHook.
Owner & admin controls
No owner, pause or parameter-setting functions were found in CreatorCoinHook or BaseZoraV4CoinHook. Trusted message senders, the coin version lookup and the upgrade gate are fixed in the constructor or immutable. Migration can only be triggered by the pool's registered coin and only along paths registered in the external IHooksUpgradeGate, whose governance is not visible in this source.

Enabled Uniswap v4 callbacks

afterInitialize, afterSwap

afterInitialize is used to verify the coin, store the pool-to-coin mapping and positions, and mint the initial liquidity. afterSwap is used to collect fees, recycle part of them as liquidity, convert the rest to the payout currency and distribute rewards.

Security & trust assessment

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

Who controls it: There is no owner key in this contract. The main trust points are the external upgrade gate, which decides allowed migration destinations, and the coin contract, which supplies the payout recipients, the swap path and the migration trigger. A malicious or compromised coin or gate could redirect the pool's liquidity to another hook or change who receives rewards.

Risk to user funds: The hook does not custody user swap funds and takes nothing from swap amounts. It does control the protocol-owned LP positions in the pool and can burn and move them during an authorized migration. Swaps can be blocked if the reward or swap-path logic reverts.

Security findings

  • [medium] Hook owns the pool's liquidity and can move it: All pool liquidity positions are owned by the hook. migrateLiquidity burns them all and sends the tokens to a new hook, which is limited to the coin caller and a path registered in the upgrade gate.
  • [medium] Migration depends on an external upgrade gate: isRegisteredUpgradePath on the external IHooksUpgradeGate decides which hooks may receive liquidity. Whoever controls that gate can authorize a destination hook, and the gate's governance is not visible here.
  • [medium] Swaps depend on external calls and can be blocked: afterSwap calls the coin's getPayoutSwapPath and recipient getters, performs swaps in other pools, and transfers tokens or ETH to the payout and protocol recipients. If any of these reverts, for example a recipient rejecting ETH (EthTransferFailed), the swap reverts.
  • [low] Fee swaps are not price-protected: The conversion swaps use the full price limit, with no minimum output, and run on every swap. Fee amounts are small relative to pool size, but the hook-initiated swaps could be sandwiched.
  • [info] Hook holds funds only transiently: Collected fees are taken to the hook and paid out in the same call, and the hook does not use return deltas, so it does not skim user swap amounts. The receive function accepts ETH only from the pool manager.

Contract details

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

Pools using CreatorCoinHook