Fee sharing hook on Ethereum

Uniswap v4 Hook Contract 0xd118a2dbc728eb5e57b1b31a62576f6e4090c888 on Ethereum · Fee sharing

Volume (24h)
$58
Value locked (TVL)
$0.02
All-time volume
$58
Pools using this hook
1
Swaps (24h)
8 (3 traders)
Total swaps
8

What it does

A Uniswap v4 hook that manages its own liquidity position and accrues fees for a designated recipient, rebalancing through the pool manager and adjusting swaps via return deltas.

How it works step by step

  • Holds and manages a liquidity position it tracks by pool id, ticks and sqrt prices (lpInfo, hookLiquidity, tickLower, tickUpper).
  • Self-unlocks the pool manager and rebalances its position through unlockCallback with take and transfer calls.
  • Accrues fees in storage (accruedFees) which can be claimed (claimFees) and directed to a fee recipient.
  • Gates liquidity additions via beforeAddLiquidity.
  • Uses beforeSwap with return deltas to adjust swap accounting.
Swap behaviour
beforeSwap is enabled and can return a delta, letting the hook take or supply currency during swaps; swap effects depend on logic not visible without source.
Liquidity behaviour
beforeAddLiquidity is enabled and gates liquidity additions; beforeRemoveLiquidity and afterRemoveLiquidity selectors also exist in the dispatch table but are not enabled in the hook permissions, and the hook manages a liquidity position (lpPoolId, lpInfo, hookLiquidity, tickLower, tickUpper, sqrtLower, sqrtUpper) that it self-unlocks to rebalance through the pool manager.
Fee behaviour
Accrues fees in storage (accruedFees, claimFees) and exposes a feeRecipient, indicating a fee-sharing or fee-collection model; exact fee rate or split cannot be determined from bytecode alone.
Owner & admin controls
Owner-gated via Ownable: transferOwnership and renounceOwnership are present; the owner can change the fee recipient (slot 0 address is written by owner functions) and can renounce ownership. Parameter changes are not confirmed without source.

Enabled Uniswap v4 callbacks

beforeAddLiquidity, beforeSwap, beforeSwapReturnDelta

beforeAddLiquidity: runs a check before liquidity is added, likely to restrict or account for deposits. beforeSwap: runs before swaps and can modify swap amounts. beforeSwapReturnDelta: lets the hook return a delta so it can take or supply currency during swaps, which is the main source of user-funds exposure.

Security & trust assessment

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

Who controls it: The owner key controls the fee recipient and ownership transfer; a compromised owner could redirect accrued fees by changing the recipient or transfer control to another address.

Risk to user funds: The hook holds a managed liquidity position and accrued fees and moves currency through return deltas and pool manager unlocks, so funds in the hook and the pool can be affected by its logic and by the owner's ability to change the fee recipient.

Security findings

  • [medium] Hook moves currency via return deltas: beforeSwapReturnDelta lets the hook take or supply tokens during swaps, so it can move currency beyond the standard pool flow.
  • [medium] Self-unlock and currency movement: The hook self-unlocks the pool manager (unlock/unlockCallback) and calls take/transfer/transferFrom to rebalance a managed position, so it holds and moves pool funds.
  • [medium] Owner-controlled fee recipient: Ownable pattern with transferOwnership and renounceOwnership; the owner can change the fee recipient and is a single point of control.
  • [info] Rebalance timing gates: Custom errors such as AlreadyRebalanced and TooEarly indicate rebalancing is rate-limited; the exact logic is not verifiable without source.

Contract details

Verified source
No
Bytecode size
15,454 bytes
Upgradeable proxy
No
Detected patterns
erc20, fee-sharing, liquidity-management, moves-currency, ownable, return-delta, self-unlock

Pools using Fee sharing hook