NFTStrategyHook on Ethereum

Uniswap v4 Hook Contract 0xd6a45df0c82c9a686ab1e58fb28d8fc0cf106444 on Ethereum · Fee sharing · Verified contract

Volume (24h)
$57
Value locked (TVL)
$62.34K
All-time volume
$9.87M
Pools using this hook
1
Swaps (24h)
7 (3 traders)
Total swaps
12,114

What it does

Adds a decaying buy fee and fixed sell fee to NFTStrategy ETH pools, splitting each fee between the strategy collection, a PNKSTR buy-and-burn and a fee recipient.

How it works step by step

  • Restricts pool initialization to factory-launched ETH/token pools and records the deployment block
  • Charges a buy fee starting at 95% that drops 1% every 5 blocks to a 10% floor
  • Charges a constant 10% sell fee taken via afterSwap and returned through afterSwapReturnDelta
  • Splits collected fees 80% to the NFTStrategy collection, 10% to the factory for PNKSTR buy-and-burn, 10% to a fee recipient
  • Grants the NFTStrategy contract transfer allowances during liquidity loading and swaps
Swap behaviour
On every swap the hook takes a fee (95% decaying to 10% on buys, 10% on sells) from the swap output, converts non-ETH fees to ETH through the pool, and distributes them 80/10/10 to the collection, factory and fee recipient.
Liquidity behaviour
afterAddLiquidity only runs during factory-controlled liquidity loading; it grants the NFTStrategy contract a transfer allowance equal to the token amount added. No remove-liquidity callbacks.
Fee behaviour
Buy-side fee starts at 95% of swap output and drops by 1% every 5 blocks after pool initialization, floored at 10%; sell-side fee is a constant 10%. The fee is taken as an ETH or NFTSTR amount in afterSwap via manager.take, then split 80% to the collection's addFees, 10% sent to the factory for PNKSTR buy-and-burn, and 10% to the collection's custom fee recipient or the global feeAddress. Non-ETH fees are first swapped to ETH through the pool.
Owner & admin controls
Factory owner (via nftStrategyFactory.owner()) can change the global feeAddress with updateFeeAddress and can set any collection's fee recipient with adminUpdateFeeAddress; the factory itself can also call adminUpdateFeeAddress. A collection's ERC721 owner can set its own fee recipient via updateFeeAddressForCollection. The hook has no pause, no upgrade mechanism and no adjustable fee rate; buy fee schedule and 10% 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 and records the deployment block used for the decaying fee. afterAddLiquidity grants transfer allowance during factory loading. afterSwap takes the fee, distributes it, updates transfer allowance and emits events. afterSwapReturnDelta lets the hook return a delta equal to the fee so it is credited from the swap.

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 share to arbitrary addresses, which affects 10% of all fee revenue; the collection owner can redirect its own collection's 10% share. Neither can change the fee rate or block swaps.

Risk to user funds: The hook takes the swap fee from pool currency via manager.take, swaps non-ETH fees to ETH through the same pool, and forwards ETH to the NFTStrategy collection, the factory and fee recipients. It cannot block swaps or freeze funds, but a mistake or malicious change in fee recipients or factory-controlled flow would route pool-derived value away from LPs and traders.

Security findings

  • [medium] Hook moves pool funds during swaps: afterSwap calls manager.take and then performs an internal ETH-denominated swap via manager.swap for non-ETH fees; the hook holds and moves pool funds during every trade, including using its own ETH balance.
  • [medium] Transfer allowance and external ETH sends: Per-collection transfer allowances are raised in afterSwap and afterAddLiquidity and are only granted to the NFTStrategy contract, a reentrancy-sensitive path that relies on the factory's loadingLiquidity flag and external ETH sends via forceSafeTransferETH.
  • [low] Admin can redirect fee recipients: The factory owner can set the global feeAddress and override per-collection recipients at any time, redirecting 10% of fees.
  • [info] Very high initial buy fee: Buy fee starts at 95% and only drops with block count, so early buyers pay very high fees; fee calculation depends on block.number and deploymentBlock.
  • [info] Limited admin surface: No pause, upgrade or fee-rate control exists in the hook; ReentrancyGuard is imported but the swap path has no nonReentrant modifier.

Contract details

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

Pools using NFTStrategyHook