DuckHookV4 on Ink

Uniswap v4 Hook Contract 0x067a168da351d40e086b974f16f94cb0f3df00c4 on Ink · Dynamic fee · Verified contract

Volume (24h)
$0
Value locked (TVL)
$0.31
All-time volume
$62
Pools using this hook
1
Swaps (24h)
0 (0 traders)
Total swaps
3

What it does

A Uniswap v4 launchpad hook that charges a fixed creator-chosen fee (1 to 5 percent) on token sells, blocks an address from swapping twice in one block, and lets pool creators split accrued fees among wallets.

How it works step by step

  • Registers launchpad pools with a token, quote currency, creator, launch time and a sell-fee tier chosen at registration (default 2 percent)
  • Takes a sell-side fee in quote currency via afterSwapReturnDelta and accrues it per pool
  • Blocks the same sender from swapping the same registered pool twice in one block
  • Lets the pool creator split claimed fees across up to 5 wallets summing to 10000 bps
  • Supports a change-of-token-owner (CTO) process where applicants pay a fee to the platform wallet and the owner approves or rejects the transfer
  • Restricts pool registration to whitelisted launcher addresses
Swap behaviour
beforeSwap enforces one swap per address per block on registered pools. afterSwap detects sells by balance-delta signs and takes the hook fee on the quote output via a return delta; buys are untouched.
Liquidity behaviour
No liquidity callbacks.
Fee behaviour
On sells only (token leaves pool, quote leaves to trader), the hook takes hookFeeBps of the quote-currency output (default 2%, selectable tiers 1%, 2%, 3%, 5% at registration) via a return delta. Accrued fees are claimable by the pool creator, optionally split across up to 5 wallets summing to 10000 bps. Buys are not charged the hook fee.
Owner & admin controls
Owner (set at deploy, transferable) can add/remove launchers, set the CTO application fee, set the platform wallet that receives CTO fees, approve or reject CTO applications, and transfer ownership. Owner cannot change fee rates of existing pools or withdraw accrued fees directly; fee rates are fixed per pool at registration. No pause or upgrade mechanism found.

Enabled Uniswap v4 callbacks

beforeSwap, afterSwap, afterSwapReturnDelta

beforeSwap: blocks a same-address second swap in the same block on registered pools. afterSwap: computes the sell fee, takes it from the pool via the PoolManager and returns it as a hook delta (afterSwapReturnDelta). Initialize, liquidity, and donate hooks are present but return only their selectors.

Security & trust assessment

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

Who controls it: The owner can add arbitrary launcher addresses that can register pools with any token, quote currency and creator, and can reassign the CTO creator role via approval; the owner also controls the platform wallet receiving CTO fees. The owner cannot alter an existing pool's hook fee or seize accrued fees.

Risk to user funds: The hook takes a percentage of quote-currency output on sell swaps and holds it until claimed by creator. It does not hold LP principal and has no pause or withdraw-all function, so it cannot freeze user funds, but it can block same-block repeat swaps by an address.

Security findings

  • [medium] Privileged owner controls launcher set and creator reassignment: Owner can add or remove launchers that register pools, and can approve CTO transfers that change who controls a pool's fee claims and fee splits.
  • [low] Same-block swap restriction: beforeSwap reverts for the same sender twice in one block on registered pools, which can block legitimate rapid-succession or router-batched swaps by the same address.
  • [info] Hook moves pool funds on sells: The hook takes its fee via take() and afterSwap return delta, so it always has the authority to move quote-currency out of the pool on sells; accrued fees are held by the hook contract until claimed.
  • [info] Accrued fees held in hook balance: claimFees is callable by anyone but always pays the stored creator or split wallets, so it cannot redirect funds, though accrued fees sit in the hook until claimed.

Contract details

Verified source
Yes (DuckHookV4)
Compiler
solc 0.8.36+commit.8a079791
Bytecode size
6,595 bytes
Upgradeable proxy
No
Detected patterns
dynamic-fee, launchpad, moves-currency, ownable, return-delta

Pools using DuckHookV4