Fee sharing hook on Ethereum
Uniswap v4 Hook Contract 0x2c29dad5128f04aa2e3855bb28501f5f6ad660cc on Ethereum · Fee sharing
- Volume (24h)
- $1.86K
- Value locked (TVL)
- $281
- All-time volume
- $15.16K
- Pools using this hook
- 10
- Swaps (24h)
- 7 (3 traders)
- Total swaps
- 107
What it does
A Uniswap v4 hook that takes a tag-based fee on swaps and tracks accrued and earned amounts for registered tags, settling the currency through the pool manager.
How it works step by step
- Registers pool keys and maps tags to token addresses on setup
- Computes a swap-time fee expressed in pips with a capped maximum
- Takes currency from the pool through take and settles via pay during a self-initiated unlock
- Tracks accrued and earned balances per tag for fee distribution
- Passes liquidity add and remove callbacks through without changing amounts
- Swap behaviour
- beforeSwap and afterSwap run on every swap; the hook takes or adjusts a fee-related currency delta via return-delta permissions and records accrued amounts keyed by tag.
- Liquidity behaviour
- Before and after add and remove liquidity callbacks are dispatched, but the hook does not appear to modify liquidity amounts; they are present as permission-driven pass-throughs.
- Fee behaviour
- Hook returns a fee-related delta in beforeSwap and afterSwap, and the presence of FEE_PIPS, PIPS and MAX_FEE_TAG selectors plus a FeeAboveLimit error suggests a dynamic or taxed fee that is capped, with accrued and earned balances tracked per tag. Exact fee formula cannot be determined without source.
- Owner & admin controls
- No admin controls found. No owner, pause or upgrade selectors are dispatched; initialize(address,address) and register(...) are one-time or permissionless setup functions as far as the bytecode shows.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize: pool-setup checks or registration on pool creation. beforeSwap: computes a swap-time fee or delta. afterSwap: records accrued amounts after the swap. beforeSwapReturnDelta: lets the hook take or give currency during the swap. afterSwapReturnDelta: lets the hook take a post-swap currency delta.
Security & trust assessment
Risk level: medium (decoded bytecode, low confidence).
Who controls it: No privileged owner key is evident, so centralization risk appears limited, but initialize and register set stored addresses and tag mappings that a deployer or first caller may control.
Risk to user funds: The hook can take and pay currency through return deltas and the take/pay/unlock flow, so swap amounts and any accrued balances it manages are under its control. Exact conditions cannot be confirmed without source.
Security findings
- [medium] Hook takes currency via return deltas: Hook has beforeSwapReturnDelta and afterSwapReturnDelta enabled and the bytecode contains take and unlock selectors, so it can move pool currency to itself during swaps.
- [medium] Initialization sets key addresses: Decoded initialize(address,address) writes storage slots 1 and 2 and the poolManager/claims getters are present; an unprotected initialize could be front-run to set wrong addresses if it is not guarded by the initializer flag.
- [info] Self-unlock pattern: The hook calls unlock and implements unlockCallback with a ReentrancyGuard error, so it can re-enter the pool manager to settle its own deltas.
- [info] Fee cap present: A FeeAboveLimit error and MAX_FEE_TAG suggest a fee cap exists, which limits the maximum fee a user can be charged.
Contract details
- Verified source
- No
- Bytecode size
- 4,915 bytes
- Upgradeable proxy
- No
- Detected patterns
- moves-currency, return-delta, self-unlock
Pools using Fee sharing hook
- ETH / BORKLEY (0.00% fee) — 24h volume $1.86K, TVL $0, 7 swaps today
- ETH / QUIRKINS (0.00% fee) — 24h volume $0, TVL $257, 0 swaps today
- ETH / PILOT (0.00% fee) — 24h volume $0, TVL $24, 0 swaps today
- ETH / GRAK (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / CREATE (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / VITALIK (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / GROK (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / River (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / GREL (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / GRAK (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today