Fee sharing hook on Base

Uniswap v4 Hook Contract 0x2d0d55e8d4418ce6157cf31d9ffafb88117c0040 on Base · Fee sharing

Volume (24h)
$0
Value locked (TVL)
$10.02K
All-time volume
$3.35M
Pools using this hook
2,669
Swaps (24h)
0 (0 traders)
Total swaps
156,060

What it does

A Uniswap v4 hook that runs after each swap to take a fee or tax on the pool and send a share to a configured fee recipient, with the option to deploy tokens.

How it works step by step

  • Runs logic after every swap through the afterSwap callback
  • Computes a fee cut and tax percentage on swaps
  • Can collect accumulated fees and send them to a fee recipient
  • Tracks trigger frequency and per-address triggers
  • Exposes a gateway for external execution and deploys tokens through deployToken and predictToken
Swap behaviour
afterSwap runs after every swap and applies the fee or tax logic, which may collect fees and track trigger frequency.
Liquidity behaviour
Has afterAddLiquidity and afterRemoveLiquidity selectors and beforeAddLiquidity and beforeRemoveLiquidity views, but only afterSwap is enabled in the hook permissions, so these callbacks are not active.
Fee behaviour
The afterSwap callback reads a fee cut and tax percentage and can collect fees on swaps, routing a portion to a fee recipient (lpFeesCut and taxPercentage are exposed as view functions). Exact fee math cannot be confirmed without source.
Owner & admin controls
Owner (Ownable) can set the gateway address, fee recipient, trigger frequency, hook enabled flag and collect-fees-on-swap flag, transfer or renounce ownership, and call removeNative. Owner-only functions are inferred from selectors and storage reads, not from source.

Enabled Uniswap v4 callbacks

afterSwap

afterSwap: runs after each swap to trigger the swap-based fee or tax logic, token trigger tracking and possibly fee collection.

Security & trust assessment

Risk level: medium (decoded bytecode, low confidence).

Who controls it: The owner can change the fee recipient, the gateway contract, the enabled state of the hook and the trigger frequency, which affects how fees are taken from swaps. A compromised owner key could redirect fee flows or disable or re-route hook behaviour.

Risk to user funds: The hook can take a share of swap output or fees and send it to the configured fee recipient, and it can hold tokens during collection. It can also be disabled or re-routed by the owner. Pool liquidity itself is not directly controlled by the hook from the decoded surface.

Security findings

  • [medium] Post-swap logic on every trade: Only afterSwap is enabled in the hook permissions, so the hook can run logic after every swap in pools that use it.
  • [medium] Owner controls fee destination and gateway: Owner can set the fee recipient, gateway and hook enabled flag at any time, with no timelock visible in the bytecode.
  • [low] Holds token balances during fee collection: The contract includes ERC20-like selectors and a token deployment function, and it holds balances, so tokens may be held temporarily during fee collection.
  • [info] Unverified source: The contract is unverified, so the behaviour above is inferred from selectors and storage access rather than source code.

Contract details

Verified source
No
Bytecode size
17,770 bytes
Upgradeable proxy
No
Detected patterns
erc20, ownable

Pools using Fee sharing hook