WonkHook on Arc
Uniswap v4 Hook Contract 0x21bdc377265e2a26ba336f24381e67e768253044 on Arc · Launchpad · Verified contract
- Volume (24h)
- $162.07K
- Value locked (TVL)
- $323
- All-time volume
- $3.19M
- Pools using this hook
- 575
- Swaps (24h)
- 24 (3 traders)
- Total swaps
- 104,752
What it does
CookHook is the graduation hook for Cook token launches: it charges a swap fee and a creator tax on every swap, records a TWAP oracle, and when the price hits the target it burns the bonding band and re-mints the raise as a permanently locked buy wall.
How it works step by step
- Only initializes pools that the factory has registered as launches, and sets up a per-pool tick-cumulative ring buffer that serves TWAPs through consult().
- In afterSwap it takes swapFeeBps plus the launch's taxBps off the swap's unspecified leg. The cut is returned as a positive hook delta and booked as ERC-6909 claims in pendingFees and pendingCreatorTax.
- When the pool price reaches the target, it graduates the pool in the same swap. It burns the main-band position, re-mints the raise as Position 3 owned by CookLauncherLocker, and sets a graduated latch.
- claimFees, callable by the creator or an operator, sells any token-denominated fees for base on the pool itself (price impact capped, default 3%), then pays the treasury share and the creator share in base.
- Lets a creator hand over their role at any time. The owner can also propose a creator override that takes effect after a 3 day timelock and expires after a further 3 day window; anyone can execute a matured proposal.
- Swap behaviour
- No beforeSwap. afterSwap writes an oracle observation, computes launch progress, takes the fee and tax from the unspecified leg (positive return delta) and mints matching ERC-6909 claims to itself. If the target price is reached and the main band is set, it graduates the pool in the same transaction. It emits CurveBuy or CurveSell, attributing the trader to 20-byte hookData or tx.origin. The pool's LP fee stays at zero.
- Liquidity behaviour
- No liquidity callbacks. Liquidity is managed only by the factory-created main band and, at graduation, by this hook through PositionManager.modifyLiquiditiesWithoutUnlock: it burns Position 1 and mints Position 3 to the locker, which has no withdrawal path.
- Fee behaviour
- The pool LP fee is zero and the hook charges everything. Fee = swapFeeBps (protocol-wide, snapshotted per launch at registration) and tax = the launch's taxBps, both applied to the unspecified leg. The combined cut is capped at 99.99%. protocolFeeShareBps of the swap fee (up to 100%) goes to the treasury, read live at claim time. The rest of the fee plus all of the tax goes to the creator. Token-denominated fees are converted to base at claim time.
- Owner & admin controls
- The owner (Ownable2Step) can set swapFeeBps (affects future launches only) and protocolFeeShareBps (affects all launches from the next claim). It can also set the maximum internal price impact (1 to 9999 bps), manage the operator set, wire the factory and the treasury/TWAP buyer (each one-shot), and propose or cancel creator overrides (3 day timelock). The owner can call sweep() to move any asset the hook holds, to any address. Operators can call claimFees and, via Treasury, withdraw the treasury balance. renounceOwnership is exposed. The contract is not an upgradeable proxy.
Enabled Uniswap v4 callbacks
beforeInitialize, afterInitialize, afterSwap, afterSwapReturnDelta
beforeInitialize rejects pools that are not registered launches. afterInitialize seeds the oracle observation buffer. afterSwap collects the fee and tax, updates the oracle and triggers graduation. afterSwapReturnDelta lets the hook charge the fee and tax by adjusting the swapper's delta.
Security & trust assessment
Risk level: medium (verified source, high confidence).
Who controls it: The owner can raise the swap fee for future launches, change the protocol/creator split for all pools, change the conversion price-impact bound, sweep assets held by the hook, and reroute creator fees after a 3 day delay. It cannot remove the locked Position 3 liquidity, which has no exit in the locker. Operators can trigger claims and withdraw from the treasury.
Risk to user funds: The hook holds ERC-6909 claims for uncollected fees and tax, plus transient balances from graduation. The owner can sweep raw tokens or native currency the hook holds. LP principal is not held by the hook: the main band is burned at graduation and Position 3 goes to a locker with no withdrawal function. Swappers bear the fee and tax, which could be very high if configured so. The hook does not block swaps except through graduation reverts.
Security findings
- [medium] Fee ceiling is nearly 100%: MAX_SWAP_FEE_BPS and MAX_TOTAL_FEE_BPS are 9999. The owner can set swapFeeBps up to 99.99% for new launches, and the creator tax is chosen per launch (capped by the registry, not visible here). Fee and tax are deducted from the swapper's output or added to the input.
- [medium] Owner can sweep anything held by the hook: sweep(asset, to, amount) is onlyOwner and transfers any ERC-20 or native balance. This includes the ERC-20 and native balances the hook holds, such as graduation leftovers and base taken in claimFees. ERC-6909 claims backing pending fees are not moved by sweep, and the locked Position 3 sits in the locker, out of its reach.
- [low] Creator fee routing can be overridden by the owner: proposeCreatorTransfer lets the owner redirect a pool's creator fees and tax after a 3 day timelock. The creator cannot cancel it, and a matured proposal supersedes a creator-initiated transfer. It is publicly visible by event and executable by anyone.
- [info] Hook takes tokens via return delta: Every swap pays the fee and tax to the hook as ERC-6909 claims. They stay pending until the creator or an operator calls claimFees. Token-side fees are sold on the pool itself, bounded by maxInternalPriceImpactBps, so the sale can still move the price.
- [low] Graduation inside a user swap can revert the swap: _graduate reverts with PeripheryNotSet if the treasury or TWAP buyer is unset, and with PriceMovedPastTarget under certain price conditions. A swap that would cross the target then fails. This is a liveness risk, not a loss of funds.
Contract details
- Verified source
- Yes (WonkHook)
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Bytecode size
- 24,359 bytes
- Upgradeable proxy
- No
- Detected patterns
- launchpad, moves-currency, oracle, ownable, return-delta, self-unlock, tax
Pools using WonkHook
- USDC / BOOGAY (Dynamic fee) — 24h volume $8.12K, TVL $0.05, 1 swaps today
- USDC / PANCHU (Dynamic fee) — 24h volume $8.12K, TVL $0.05, 1 swaps today
- USDC / GRUMP (Dynamic fee) — 24h volume $8.12K, TVL $0.05, 2 swaps today
- USDC / ZONED (Dynamic fee) — 24h volume $8.12K, TVL $0.05, 1 swaps today
- USDC / WARKALSHI (Dynamic fee) — 24h volume $8.12K, TVL $0.05, 2 swaps today
- USDC / BPT (Dynamic fee) — 24h volume $8.12K, TVL $0.05, 1 swaps today
- USDC / SACK (Dynamic fee) — 24h volume $8.12K, TVL $0.05, 1 swaps today
- USDC / ARCTIC (Dynamic fee) — 24h volume $8.11K, TVL $0.05, 1 swaps today
- USDC / ARINU (Dynamic fee) — 24h volume $8.11K, TVL $0.05, 1 swaps today
- USDC / BEARWOOD (Dynamic fee) — 24h volume $8.11K, TVL $0.02, 2 swaps today
- USDC / TYLERARC (Dynamic fee) — 24h volume $8.11K, TVL $0.05, 1 swaps today
- USDC / GPT6ARC (Dynamic fee) — 24h volume $8.11K, TVL $0.05, 1 swaps today
- USDC / WONKFUN (Dynamic fee) — 24h volume $8.11K, TVL $0.05, 1 swaps today
- USDC / GENIUS (Dynamic fee) — 24h volume $8.11K, TVL $0.05, 1 swaps today
- USDC / FEBE (Dynamic fee) — 24h volume $8.11K, TVL $0.05, 1 swaps today
- USDC / TZILLA (Dynamic fee) — 24h volume $8.11K, TVL $0.05, 1 swaps today
- USDC / HONG (Dynamic fee) — 24h volume $8.08K, TVL $0.05, 1 swaps today
- USDC / WORLD (Dynamic fee) — 24h volume $8.08K, TVL $0.05, 1 swaps today
- USDC / MONEYCAT (Dynamic fee) — 24h volume $8.06K, TVL $0.05, 1 swaps today
- USDC / INURANUSAR (Dynamic fee) — 24h volume $8.05K, TVL $0.05, 2 swaps today