NFTStrategyHook on Ethereum

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

Volume (24h)
$9.68K
Value locked (TVL)
$180.98K
All-time volume
$3.76M
Pools using this hook
4
Swaps (24h)
9 (8 traders)
Total swaps
7,045

What it does

A Uniswap v4 hook for NFTStrategy ETH pools that charges a buy fee starting at 99% and falling 1% per block to a 10% floor, a flat 10% sell fee, and splits the collected fees between the strategy collection, PunkStrategy buy-and-burn, and a fee address.

How it works step by step

  • Charges a buy fee that starts at 99% in the pool's initialization block and decreases by 1 percentage point per block until it reaches 10%.
  • Charges a fixed 10% fee on sells.
  • Splits each ETH fee 80% to the NFTStrategy collection, 10% to the factory for PNKSTR buy-and-burn, and 10% to the fee recipient.
  • Converts non-ETH fee amounts to ETH through an internal pool swap before distribution.
  • Restricts pool creation and liquidity addition to factory-controlled launch flows and grants transfer allowances to the collection token.
  • Blocks exact-output swaps.
Swap behaviour
Exact-output swaps are rejected. On every swap the hook calculates the fee (decaying buy fee or flat sell fee), takes it from the output via the pool manager, converts non-ETH fees to ETH, and distributes the ETH.
Liquidity behaviour
afterAddLiquidity only runs during factory-controlled liquidity loading (requires nftStrategyFactory.loadingLiquidity()); it grants the collection contract a transfer allowance equal to the token amount added. No remove-liquidity callbacks are enabled.
Fee behaviour
Sells are charged a fixed 10% (1000 bips). Buys start at 99% in the pool's initialization block and fall by one percentage point per block until reaching 10%, at which point they stay at 10%. Fees are taken in the output currency of the swap via manager.take; non-ETH fees are swapped to ETH through the pool before distribution. Fees are split 80% to the NFTStrategy collection contract, 10% to the NFTStrategyFactory (to buy and burn PNKSTR), and the remaining 10% to the collection's claimed fee address or the global feeAddress.
Owner & admin controls
Factory owner (via nftStrategyFactory.owner()) can change the global feeAddress with updateFeeAddress and can set or override per-collection fee recipients with adminUpdateFeeAddress; the factory contract itself can also call adminUpdateFeeAddress. The collection owner can set its own fee recipient via updateFeeAddressForCollection. No pause, no upgrade mechanism and no fee-rate setter were found in the hook; buy fee decay and sell fee are hardcoded constants.

Enabled Uniswap v4 callbacks

beforeInitialize, afterAddLiquidity, afterSwap, afterSwapReturnDelta

beforeInitialize restricts pool creation to ETH/token pools launched by the factory, records deployment time and block for buy-fee decay. afterAddLiquidity restricts liquidity addition to factory loading and sets a transfer allowance on the collection token. afterSwap reverts exact-output swaps, computes the fee, takes it from the pool, distributes it, and emits HookFee and Trade events. afterSwapReturnDelta lets the hook keep the fee amount as a return delta, so the hook takes the fee from the swap output.

Security & trust assessment

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

Who controls it: The factory owner can redirect the global fee address and any collection's fee address to arbitrary destinations, so fee revenue can be sent to a single privileged key. The factory itself is also an authorized caller of adminUpdateFeeAddress. The hook has no pause and no fee-rate setter, so the owner cannot change swap pricing directly.

Risk to user funds: The hook takes the fee from each swap through afterSwapReturnDelta and holds the fee in transit only until it is forwarded in the same transaction. It can convert non-ETH fees to ETH by swapping in the pool. It does not hold a user balance long-term. Traders can lose most of the input value when buying in the first blocks, because the fee is 99% at launch; the hook does not cap or block swaps.

Security findings

  • [medium] Privileged fee-recipient redirection: updateFeeAddress and adminUpdateFeeAddress let the factory owner redirect the fee share paid to feeAddress and to any collection's fee address without a timelock.
  • [low] Fee distribution relies on external recipients: Fees are sent via forceSafeTransferETH to feeAddress or the claimed address. If that address is a contract that reverts on ETH receipt, the forced transfer still succeeds, but the hook does not check the result of the transfers to the factory and recipients, so the accounting outcome depends on those contracts.
  • [info] Very high initial buy fee: Buy fees start at 99% and decay over blocks; a buyer in the first blocks after launch pays almost the entire swap amount as fee, which is intentional but can be harmful to unsuspecting traders.
  • [low] Internal fee swap without price limit guard: The hook swaps non-ETH fees through the same pool using manager.swap and settles with the pool manager, and it has no slippage protection on that internal swap.
  • [info] ReentrancyGuard not applied to fee paths: The hook is an inherited BaseHook with ReentrancyGuard present but the reentrancy guard is not applied to afterSwap or fee-processing paths that make external ETH transfers.

Contract details

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

Pools using NFTStrategyHook