Fee sharing hook on Ethereum

Uniswap v4 Hook Contract 0x11e7a9d7c0dbe78fca899708276791f70dad20cc on Ethereum · Fee sharing

Volume (24h)
$66
Value locked (TVL)
$7.13K
All-time volume
$2.37K
Pools using this hook
1
Swaps (24h)
1 (1 traders)
Total swaps
19

What it does

A Uniswap v4 hook that takes a protocol fee on swaps, splits part of it to a card treasury, and tracks native credits that can be claimed.

How it works step by step

  • Records the pool id on initialization.
  • Takes a fee in basis points (FEE_BPS) on swaps using return deltas.
  • Splits part of the collected fee to a card treasury (CARD_TREASURY_SHARE_BPS).
  • Tracks total fees collected and per-address native credits.
  • Lets an address claim its native credit through claimNative.
Swap behaviour
beforeSwap and afterSwap run on every swap, update fee and credit accounting, and use return deltas to take a fee from the swap amount.
Liquidity behaviour
beforeAddLiquidity, beforeRemoveLiquidity, afterAddLiquidity, afterRemoveLiquidity and the donate hooks are present as dispatched selectors, but they appear to be pass-through with no custom accounting identified from the decoded bytecode.
Fee behaviour
The hook exposes FEE_BPS and CARD_TREASURY_SHARE_BPS getters and a totalFeesCollected counter; it appears to take a protocol fee on swaps and split part of it to a card treasury, with the remainder tracked as native credits claimable by users or the treasury.
Owner & admin controls
No owner or admin setter selectors were decoded; the protocolTreasury and cardTreasury addresses and CARD_TREASURY_SHARE_BPS / FEE_BPS are exposed as view getters, and the hook appears to have immutable or init-time configuration. No pause, upgrade or owner functions were identified from the decoded selectors.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize records pool-related state into storage slot 0 (poolId). beforeSwap and afterSwap update fee and credit accounting storage and can return a delta (beforeSwapReturnDelta and afterSwapReturnDelta), which lets the hook take or give tokens during a swap. afterInitialize, liquidity and donate callbacks are dispatched but not clearly customised.

Security & trust assessment

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

Who controls it: No privileged setter was decoded, so the main centralization risk is the treasury address and fee split that are fixed at deployment; if they are mutable through an unseen path, the treasury could redirect fees.

Risk to user funds: The hook can take tokens from swaps through return deltas and holds accumulated native credits in contract storage that users can claim via claimNative, so funds are held by the hook contract until claimed.

Security findings

  • [medium] Return-delta fee capture on swaps: The hook has beforeSwapReturnDelta and afterSwapReturnDelta enabled and calls take(address,address,uint256) on the PoolManager, so it can move user or pool tokens during swaps.
  • [medium] Native credit accounting not verified: Storage slots 1 and 2 are written in swap callbacks and in claimNative, which suggests balance-based native credits that could be mis-accounted if not reconciled with the PoolManager.
  • [info] Source not verified: Without verified source, exact fee bounds, reentrancy protection and treasury mutability cannot be confirmed from bytecode alone.

Contract details

Verified source
No
Bytecode size
6,110 bytes
Upgradeable proxy
No
Detected patterns
moves-currency, return-delta

Pools using Fee sharing hook