FeeHookV3 on Ethereum

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

Volume (24h)
$2.25K
Value locked (TVL)
$61.53K
All-time volume
$29.42M
Pools using this hook
5,110
Swaps (24h)
12 (9 traders)
Total swaps
144,914

What it does

A fee-collection hook for ETH-paired pools that charges a market-cap tiered or custom swap fee and splits it among creators, a protocol wallet, optional partners, and an optional extension module.

How it works step by step

  • Charges an ETH-denominated fee on swaps via beforeSwap and afterSwap return deltas, sized by the market-cap tier table or a per-token custom fee.
  • Splits each fee between a creator slice (minimum 10%, distributed across up to 5 recipients) and a protocol slice.
  • Optionally carves a partner share (up to 50% of protocol slice) and a module share (up to 30% of remainder) out of the protocol slice.
  • Credits all shares to pull-based ethOwed balances that recipients withdraw through claim(), which admin cannot block.
  • Market cap is derived from pool sqrtPriceX96 and total supply of 1 billion tokens, and drives tier and custom fee decay.
Swap behaviour
On each swap where ETH is the side being specified or the unspecified side, the hook computes a fee from the current market cap derived from pool price, takes the fee in ETH into the hook, and credits it to ethOwed balances via the split logic.
Liquidity behaviour
No liquidity callbacks.
Fee behaviour
Each swap that involves the ETH side is charged a fee taken in ETH via beforeSwap or afterSwap return delta. The base rate comes from a market-cap tier table (max 4.00%), or a per-token custom fixed fee (1.25% to 2.00%) that decays by 15% per 75 ETH market-cap band up to 3 reductions when customFeesEnabled is true. The fee is split: creator slice (min 10%, default 25%, distributed across up to 5 recipients), protocol slice, of which a partner can take up to 50% and an optional module up to 30% of the remainder. Remainder goes to protocolWallet. All shares are credited to ethOwed and withdrawn via claim().
Owner & admin controls
Owner (Ownable2Step, transfer requires acceptOwnership) can: setFeeTiers (up to 8 tiers, each capped at 4.00%), setSplit (protocol/creator split, creator floor 10%), setCustomFeesEnabled, adminSetCustomFee (1.25% to 2.00% or 0 to clear), adminSetCreatorRecipients, adminSetPartnerForToken (override or clear any token's partner), setPartnerBps (each partner capped at 50% of protocol slice), setHookModule (hot-swap an extension module that can take up to 30% of post-partner protocol slice), setModuleGasLimit (cap 1M gas), transferOwnership/renounceOwnership. No pause function and no proxy upgrade path found. Owner cannot touch ethOwed balances or protocolWallet. Factory-only one-time writes apply to creator registration, creator recipients, custom fee, and partner attribution at launch.

Enabled Uniswap v4 callbacks

beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeSwap: takes the ETH-denominated fee on exact-input or exact-output swaps where ETH is the specified side and credits it to ethOwed balances via poolManager.take. afterSwap: handles the complementary case where ETH is the unspecified side, taking the fee and returning it as a delta. beforeSwapReturnDelta and afterSwapReturnDelta: allow the hook to take a fee amount from the swap's currency deltas, which is how the fee is collected.

Security & trust assessment

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

Who controls it: The owner can set fee tiers up to 4% on every swap, change the protocol/creator split, set custom fees, redirect creator recipients, reassign partner attribution for any token, and install an arbitrary extension module that receives up to 30% of post-partner protocol fees. The owner cannot seize already-accrued ethOwed balances or change protocolWallet, and the creator floor and partner cap are enforced on-chain. A compromised owner could still redirect future fees to chosen addresses within these bounds.

Risk to user funds: The hook holds ETH it takes via poolManager.take and credits balances in ethOwed for creators, partners, module recipients, and protocolWallet. Users do not hold funds in the hook; their exposure is the fee charged per swap and the owner's ability to raise it within the 4% cap or redirect shares through partner and module configuration. Accrued balances can be withdrawn by their owners via claim() which admin cannot block.

Security findings

  • [medium] Owner can redirect protocol fee share to arbitrary partners: Owner-controlled setPartnerBps and adminSetPartnerForToken let the owner route a share of protocol fees to partner wallets; each partner is capped at 50% of protocol slice but any wallet can be registered.
  • [medium] Hot-swappable extension module receives protocol fees: setHookModule installs an arbitrary external contract that is called on every accrual with a 200k gas budget and can receive up to 30% of post-partner protocol fees. Swaps cannot be blocked by a faulty module because the call is try/catch wrapped.
  • [medium] Owner can change swap fee rates instantly: Fees are taken in ETH on every swap at up to 4.00% through tier tables the owner can change with no timelock, and the custom fee path can set 1.25% to 2.00% per token.
  • [low] Admin can replace creator fee recipients: Creator and partner recipient addresses are plain storage and adminSetCreatorRecipients can replace them at any time; fees accrue to whatever address is set.
  • [info] Market-cap-based pricing depends on pool spot price: Pool must have ETH as currency0 and the hook depends on poolManager.getSlot0 for market-cap calculations; a zero sqrtPrice returns zero mcap and falls back to the highest-fee-band path.

Contract details

Verified source
Yes (FeeHookV3)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
12,266 bytes
Upgradeable proxy
No
Detected patterns
dynamic-fee, launchpad, moves-currency, ownable, return-delta

Pools using FeeHookV3