StrategyHookV2 on Base

Uniswap v4 Hook Contract 0xc3b8e77ac038aa260035a1911827086c34a9e844 on Base · Fee sharing · Verified contract

Volume (24h)
$0
Value locked (TVL)
$369
All-time volume
$424.07K
Pools using this hook
1
Swaps (24h)
0 (0 traders)
Total swaps
1,282

What it does

Charges a dynamic fee on swaps in this pool and forwards the collected ETH to a strategy contract (80%) and an optional fee-split recipient (20%), while locking liquidity after the initial deposit.

How it works step by step

  • Requires currency1 to be the strategy token at pool initialization
  • Allows a single initial liquidity addition, then reverts all further adds
  • Takes a dynamic fee from swap output in afterSwap using poolManager.take
  • Sells use a graduated 90% to 10% fee over 9 blocks after feeCooldown, else feeBips or initialSellFee
  • Distributes collected ETH 80% to strategy and 20% to feeSplit when enabled, otherwise 100% to strategy
  • Swaps non-ETH fee tokens to ETH through the same pool before distribution
Swap behaviour
After each swap, the output-currency fee is taken from the pool; sells follow a cooldown-based fee schedule and buys use the standard fee, and the swapper is charged via a positive afterSwap return delta.
Liquidity behaviour
beforeAddLiquidity allows exactly one initial liquidity addition (sets initialLiquidityLoaded) and reverts on all later additions, permanently locking liquidity provision. No remove-liquidity callbacks are enabled.
Fee behaviour
Swap output is taken as a fee at a dynamic rate: buys use feeBips (default 10%); sells use a graduated 90% down to 10% cooldown schedule after feeCooldown() is called, feeBips afterwards, or initialSellFee (50%) before NFTs start accumulating. Collected ETH is split 80% to the strategy and 20% to feeSplit when feeSplitEnabled, otherwise 100% to the strategy. Non-ETH fees are swapped to ETH via the pool before distribution.
Owner & admin controls
Owner (solady Ownable with two-step handover) can set feeBips up to 10000 (100%), set feeSplit recipient, toggle feeSplitEnabled, and call emergencyWithdraw to drain all ETH held by the hook to any address. No pause or upgrade mechanism is present in the verified source.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeAddLiquidity, afterSwap, afterSwapReturnDelta

beforeInitialize: requires currency1 to equal the strategy address. beforeAddLiquidity: permits only the first liquidity addition. afterSwap: collects dynamic fees from the output currency via poolManager.take, distributes them, and returns a positive afterSwapReturnDelta to charge the swapper. afterSwapReturnDelta: enables the hook to take a delta from swaps.

Security & trust assessment

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

Who controls it: The owner can set the fee to 100% of swap output on all buys and sells, redirect the protocol share to any address, and withdraw all ETH accumulated in the hook. The strategy contract can also toggle midSwap flags and trigger accumulation/cooldown state.

Risk to user funds: The hook takes its fee as a positive afterSwap delta and holds ETH transiently during distribution; failed distributions can leave ETH stuck in the hook, which only the owner can withdraw. The owner can set fees up to 100% of swap output, so swappers on this pool are exposed to arbitrary fee changes. LP funds are not directly movable by the hook, but liquidity cannot be added after the first deposit.

Security findings

  • [medium] Owner can withdraw hook ETH: emergencyWithdraw lets the owner send any ETH balance held by the hook to an arbitrary address.
  • [medium] Owner can set fee to 100%: setFeeBips accepts values up to 10000, so the owner can set a 100% fee on every swap, taking all swap output.
  • [low] Reliance on external strategy contract state: The hook sets the strategy's midSwap flag true and false around fee collection; if the strategy is misconfigured or its addFees reverts, distribution failures are caught but the flag handling depends on the strategy contract's correctness.
  • [info] Liquidity permanently locked: Liquidity addition is permanently locked after the first deposit, and the hook has no mechanism to unlock it.
  • [low] Failed distributions are not recoverable automatically: Fee distribution uses try/catch and emits DistributionFailed, so a failing recipient does not revert swaps, but failed amounts are not recorded for retry and remain as contract ETH.

Contract details

Verified source
Yes (StrategyHookV2)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
10,144 bytes
Upgradeable proxy
No
Detected patterns
dynamic-fee, ownable, return-delta

Pools using StrategyHookV2