SentryInkWethXStockHook on Ink

Uniswap v4 Hook Contract 0x18d155d3a8d65ab32793926392a11671c78038cc on Ink · Launchpad · Verified contract

Volume (24h)
$2.26K
Value locked (TVL)
$16.40K
All-time volume
$532.77K
Pools using this hook
145
Swaps (24h)
104 (46 traders)
Total swaps
11,997

What it does

A Uniswap v4 hook for WETH-paired campaign token pools that charges a time-decaying swap fee in WETH and splits it between holder reflections, the token creator, a terminal pot and a growth sink.

How it works step by step

  • Sets the LP fee to zero and charges a separate dynamic curve fee on every swap, starting high and decaying toward a floor after a hold period.
  • Takes the fee in WETH from the pool manager and splits it 25% to holder reflections, 45% to the creator, 15% to a terminal pot and 15% to a growth sink.
  • Accrues the reflection share as WETH per token; an authorized keeper converts it through Velodrome swaps into a reward wrapper and calls notifyReward() on the token so holders can claim.
  • During an early reflection start delay, the reflection share is sent to the factory treasury in WETH instead of accruing to holders.
  • If the pool manager has insufficient WETH at swap time, books the fee as ERC-6909 claims that anyone can later settle via settlePending.
  • Restricts liquidity additions to the factory's LP vault and records a launch timestamp and an optional buyer whitelist that gets the floor fee.
Swap behaviour
On each swap the hook computes the current decaying fee on the gross WETH leg, takes it out of the swap through a before-swap or after-swap delta, and distributes it to the reflection accrual, creator, terminal pot and growth sink. Whitelisted tx.origin buyers get the floor fee during the whitelist period. Quoter simulation calls are accounted but not taken.
Liquidity behaviour
beforeAddLiquidity reverts unless the sender is the factory's vault or the factory itself. Removal is not restricted by the hook.
Fee behaviour
The LP fee is 0 and an override flag is returned each swap. The swap fee is a time-decaying curve between startFee and endFee, with a hold period, a halving schedule and a floor. The fee is split 25/45/15/15 in bps of the total, with the sink taking the rounding remainder. Creator share is redirected to the pots if no recipient is set.
Owner & admin controls
A single owner (transferable via transferOwnership, with no timelock or multisig requirement in the code) can set the terminal pot and growth sink addresses, add or remove keepers that can call convert, change the Velodrome tick spacings and the Quotrons pool route, and rescue any token held by the hook except WETH owed to holders. Fee parameters, share bps and the factory address are immutable.

Enabled Uniswap v4 callbacks

beforeInitialize, afterInitialize, beforeAddLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize restricts pool creation to the factory and requires a dynamic-fee pool with a registered WETH-side. afterInitialize records the launch timestamp. beforeAddLiquidity gates liquidity provision to the vault. beforeSwap and afterSwap take the curve fee and may return a delta to the pool manager. beforeSwapReturnDelta and afterSwapReturnDelta allow the hook to take currency from swaps.

Security & trust assessment

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

Who controls it: The owner key can redirect the pot and sink shares of all swap fees, change the reward conversion route, appoint keepers, and withdraw non-WETH tokens from the hook. Users can be affected by fee redirection and by keeper-chosen conversion parameters, though the hook cannot seize holder-owed WETH via rescue.

Risk to user funds: The hook takes WETH from every swap through return deltas and can hold WETH as reflection accrual and as ERC-6909 claims. It also holds ERC-6909 claims that represent fees. The owner can rescue tokens other than holder-owed WETH. Swaps are not blocked by any pause, but a rescue or pot redirection can move fee value that the hook has accrued.

Security findings

  • [medium] Owner can redirect fee destinations: setPots lets the owner point the terminal pot and growth sink at any address, so the owner can route the 30% pot/sink share of every swap fee to itself with no timelock. setRoute can point the reward conversion at an arbitrary hook and pool, also controlled by the owner.
  • [medium] Owner can rescue non-WETH funds and change keepers: rescue transfers any ERC-20 held by the hook to an arbitrary address, excluding only WETH that is owed to holders. setKeeper grants the convert() path, which sends reward tokens to the token contract and notifies rewards, to any address the owner chooses.
  • [low] Deferred claims rely on settlePending: When the pool manager lacks WETH float, skims become ERC-6909 claims on the hook. These are delivered by the permissionless settlePending, so fees may be delayed rather than lost, but a stuck claim depends on someone calling it.
  • [low] Conversion slippage is keeper-controlled: The Velodrome hops use amountOutMinimum of 0 and the final minimum is passed by the keeper, so a malicious or careless keeper can convert reflections at a bad rate, subject to the minStockOut check the keeper sets.
  • [info] Single owner key with no timelock: Ownership is a single EOA-style key with no two-step transfer or timelock, which concentrates the admin risks above in one account.

Contract details

Verified source
Yes (SentryInkWethXStockHook)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
13,217 bytes
Upgradeable proxy
No
Detected patterns
access-control, dynamic-fee, launchpad, liquidity-management, moves-currency, ownable, return-delta, self-unlock

Pools using SentryInkWethXStockHook