NFTStrategyHook on Ethereum

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

Volume (24h)
$3.18K
Value locked (TVL)
$500.29K
All-time volume
$109.08M
Pools using this hook
6
Swaps (24h)
8 (4 traders)
Total swaps
94,091

What it does

NFTStrategyHook charges a dynamic fee on every swap in an NFTStrategy pool, routing most of it back to the NFT collection and part to the protocol token burn and a fee address.

How it works step by step

  • Charges a 10% fee on sells of the NFT strategy token.
  • Charges a buy fee that starts at 95% after launch and decays by 1% every 5 blocks down to 10%.
  • Takes the fee as a PoolManager claim and swaps non-ETH fees into ETH.
  • Splits the ETH fee 80% to the collection via addFees, 10% to the factory for PNKSTR buy-and-burn, and 10% to the fee address.
  • Restricts initial liquidity addition to the factory's loading phase.
  • Emits Trade and HookFee events for analytics.
Swap behaviour
On each swap afterSwap computes a fee: sells pay 10%, buys pay a decaying fee starting at 95% and falling to 10%, or zero when deployerBuying is set. The fee is taken from the output, converted to ETH if needed, then split 80/10/10 among the collection, the factory and the fee address, and emitted as HookFee and Trade events.
Liquidity behaviour
beforeAddLiquidity only permits liquidity addition when the factory's loadingLiquidity flag is true (launch flow); otherwise it reverts with NotNFTStrategy. No remove-liquidity callbacks.
Fee behaviour
Dynamic fee via afterSwap: sells (zeroForOne false path in calculateFee isBuying=false) are charged a flat 10% (DEFAULT_FEE 1000 bips). Buys start at 95% and decay by 1% every 5 blocks after the collection's deployment block down to 10%; buys are free if the factory's deployerBuying flag is set. The fee is taken as an ERC-6909 claim via manager.take on the fee currency, non-ETH fees are swapped to ETH through the pool, then split 80% to the NFTStrategy collection via addFees, 10% to the factory for PNKSTR buy-and-burn, and 10% to feeAddress or the collection-specific claimed address. The hook returns the fee amount as an afterSwap return delta.
Owner & admin controls
The NFTStrategy factory owner can change the global feeAddress via updateFeeAddress and can set any collection's fee destination via adminUpdateFeeAddress; the factory itself can also call adminUpdateFeeAddress. A collection owner (IERC721(collection).owner()) can redirect that collection's fee share via updateFeeAddressForCollection. No pausing or upgrade mechanism was found; the hook is not a proxy.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeAddLiquidity, beforeSwap, afterSwap, afterSwapReturnDelta

beforeInitialize: records the deployment block for the collection and requires the factory's loadingLiquidity flag. beforeAddLiquidity: restricts liquidity addition to the factory-controlled loading phase. beforeSwap: sets the midSwap flag on the NFTStrategy token when routerRestrict is enabled. afterSwap: takes the fee, routes it to fee recipients, emits Trade and HookFee events and clears midSwap. afterSwapReturnDelta: returns the fee amount so the swap delta accounts for the hook's take.

Security & trust assessment

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

Who controls it: The factory owner can redirect the protocol's 10% share and any collection's fee share to arbitrary addresses at any time. The factory owner (through the loadingLiquidity and deployerBuying flags) also controls whether liquidity can be added and whether buys are fee-free. The collection owner controls where that collection's fee share is sent.

Risk to user funds: The hook takes a percentage of every swap as a claim and forwards ETH to the collection contract, the factory and fee addresses. Users can lose up to 95% of a buy during the launch window and 10% on sells. Funds are not held long-term by the hook, but the hook can be left with stuck non-ETH balances if the nested swap fails to settle, and the recipients are admin-controlled.

Security findings

  • [medium] Admin can redirect fee recipients instantly: The fee split is decided per call by feeAddressClaimedByOwner or feeAddress, both changeable by privileged owners without timelock or events beyond none, so fee recipients can be swapped instantly.
  • [info] Very high launch buy fee: calculateFee sets buy fees to 95% at launch, meaning early buyers pay nearly the full swap amount as hook fee; the decay schedule is fixed in the contract.
  • [low] External calls to factory-controlled contracts during swap: afterSwap sets midSwap to true and false on the NFTStrategy token via external calls when routerRestrict is on; a revert in the subsequent path would leave the token state consistent only because the whole transaction reverts.
  • [low] Nested swap and ETH pushes inside afterSwap: Non-ETH fees are converted by a nested manager.swap from within afterSwap, and the ETH path uses forceSafeTransferETH to external addresses; the design relies on the factory and collection contracts being trusted.
  • [info] Hook takes fees from user swap output: Fees are taken from the trader's swap output on every swap, so the hook can hold claimed balances in the PoolManager and moves real value through addFees and ETH transfers; no withdrawal path for stuck tokens exists besides the receive function.

Contract details

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

Pools using NFTStrategyHook