NFTStrategyHook on Ethereum

Uniswap v4 Hook Contract 0x8fb66c6e0f3cbb25001e0f1c0352cc888cff6444 on Ethereum · Dynamic fee · Verified contract

Volume (24h)
$3.86K
Value locked (TVL)
$301.89K
All-time volume
$11.05M
Pools using this hook
13
Swaps (24h)
9 (8 traders)
Total swaps
24,581

What it does

A Uniswap v4 hook for NFTStrategy ETH/token pools that charges a time-decaying buy fee and a flat 10% sell fee and distributes the collected fees to the strategy, a buy-and-burn factory and a fee recipient.

How it works step by step

  • Restricts pool initialization to ETH/token pairs created by the NFTStrategy factory and records each collection's launch time.
  • Charges a buy fee that starts at 99% and falls 1% per minute to a 10% floor, and a fixed 10% sell fee.
  • Takes the fee from the swap output through the pool manager and returns it as a hook delta.
  • Splits collected ETH: 80% to the NFT strategy collection, 10% to the factory for PNKSTR buy-and-burn, 10% to the fee destination.
  • Grants transfer allowance to the collection token during factory liquidity loading and after swaps.
Swap behaviour
On every swap the hook rejects exact-output orders, computes the fee (buy fee decays from 99% to 10% over time, sell fee is 10%), takes it from the output via afterSwapReturnDelta, converts any token fee to ETH, splits it 80/10/10, adjusts the collection transfer allowance and emits HookFee and Trade events.
Liquidity behaviour
Only the afterAddLiquidity callback is used. During factory loading it increases the collection token's transfer allowance by the token amount added and returns a zero delta; outside loading it reverts with NotNFTStrategy. No remove-liquidity callbacks.
Fee behaviour
Sell fee is a constant 10% (1000 bps). Buy fee starts at 99% (9900 bps) at deployment and drops by 1% per minute until it reaches 10%, after which it stays at 10%. Fees are taken from the output currency in afterSwap and split 80% to the NFTStrategy collection via addFees, 10% to the NFTStrategyFactory for PNKSTR buy-and-burn, and 10% to the fee address or collection-specific destination. Non-ETH fees are swapped to ETH through the pool manager before distribution.
Owner & admin controls
The NFTStrategyFactory owner can call updateFeeAddress to change the default fee recipient and adminUpdateFeeAddress to set per-collection fee destinations. The NFT collection owner can set a per-strategy fee destination via updateFeeAddressForCollection. There is no pause, no upgrade mechanism and no ability to change fee rates in the hook itself; buy fee schedule is hardcoded.

Enabled Uniswap v4 callbacks

beforeInitialize, afterAddLiquidity, afterSwap, afterSwapReturnDelta

beforeInitialize restricts pool creation to ETH/token pools launched by the factory and records the collection's deployment time used for the fee decay. afterAddLiquidity grants the collection a transfer allowance during factory liquidity loading. afterSwap reverts exact-output swaps, takes the dynamic fee via manager.take, distributes fees, increases transfer allowance, and emits events. afterSwapReturnDelta lets the hook return a positive delta equal to the fee so the fee is taken from the swap output.

Security & trust assessment

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

Who controls it: The factory owner can redirect the default fee address and any collection's fee destination at will, diverting 10% of fees and the owner share of collection fees. The owner cannot change fee percentages, pause swaps, or move pool funds directly through this hook.

Risk to user funds: The hook holds fee amounts transiently inside the pool manager accounting and distributes them immediately to the collection strategy, factory and fee address. It does not custody user principal. Swaps cannot be blocked by an admin key, but users pay the fee via the swap output, and the hook can alter how collection tokens are transferable.

Security findings

  • [info] Extreme initial buy fee: Buy fee starts at 99% and decays 1% per minute from deployment, so early buyers pay almost the entire swap output as fee.
  • [info] Exact output swaps disabled: Exact-output swaps are reverted in afterSwap, so exact-output routers and aggregators cannot trade the pool.
  • [medium] Admin can redirect fee recipients: Fee destinations (feeAddress and feeAddressClaimedByOwner) are set by the factory owner or the factory itself with no timelock, so fee recipients can be changed instantly.
  • [low] Unbounded internal fee swap: Non-ETH fee amounts are swapped back through the same pool with no slippage bound (sqrtPriceLimitX96 is the extreme limit), so the conversion is exposed to price manipulation within the hook's own swap.
  • [low] Transfer allowance granted by hook: Transfer allowance on the NFTStrategy token is increased by hook logic on every swap and liquidity load; misconfiguration of loadingLiquidity could grant transfer allowances that bypass intended restrictions.

Contract details

Verified source
Yes (NFTStrategyHook)
Compiler
solc 0.8.30+commit.73712a01
Bytecode size
6,781 bytes
Upgradeable proxy
No
Detected patterns
dynamic-fee, moves-currency, return-delta

Pools using NFTStrategyHook