Likely fee sharing hook on Unichain

Uniswap v4 Hook Contract 0x0050e651c7b8662f4e17c589b6387db8f7488503 on Unichain · Fee sharing

Volume (24h)
$0
Value locked (TVL)
$0
All-time volume
$4.88
Pools using this hook
1
Swaps (24h)
0 (0 traders)
Total swaps
42

What it does

Tracks and withholds a share of fees for liquidity positions when they add or remove liquidity, using return deltas to route those amounts.

How it works step by step

  • Records the block number of the last liquidity addition per pool and position key after each add
  • Updates withheld fee amounts per position after each liquidity removal
  • Returns balance deltas on add and remove liquidity so the hook takes or donates part of the flow
  • Uses take, settle, mint, burn and donate calls to move currency through the pool manager
  • Exposes views getWithheldFees and getLastAddedLiquidityBlock for reading the stored accounting
Swap behaviour
No swap callbacks.
Liquidity behaviour
After liquidity is added it records the block number of the last addition per pool and position key. After liquidity is removed it updates the withheld fee accounting for that position and can return a balance delta to the pool manager, and it uses ERC6909 claims, take, settle and donate calls to move currency.
Fee behaviour
Withheld fees are tracked per position in storage (int128 mapping) and written during liquidity removal; the hook does not alter swap fees, which follow the pool's configured fee.
Owner & admin controls
No admin controls found.

Enabled Uniswap v4 callbacks

afterAddLiquidity, afterRemoveLiquidity, afterAddLiquidityReturnDelta, afterRemoveLiquidityReturnDelta

afterAddLiquidity: records the last-added block and position data after deposits. afterRemoveLiquidity: updates withheld fee accounting after withdrawals. afterAddLiquidityReturnDelta and afterRemoveLiquidityReturnDelta: return balance deltas so the hook can take or donate a share of liquidity-change amounts.

Security & trust assessment

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

Who controls it: No owner or privileged key was identified in the decoded bytecode, so no admin can alter balances or parameters directly; the logic appears fully permissionless.

Risk to user funds: The hook can take and donate currency on liquidity add and remove through return deltas and ERC6909 claims, so a portion of LP principal flow may be diverted to withheld fees; it does not appear able to block swaps.

Security findings

  • [medium] Hook takes currency through return deltas: The hook uses return deltas and calls take, settle and donate, so it can take a portion of liquidity deposits and withdrawals from the position flow and redirect it into withheld fees.
  • [medium] Fee accounting only verifiable from bytecode: Withheld fees are stored in a per-position int128 mapping that can be updated on removal; accounting correctness depends on the unverified logic, which could not be read from source.
  • [info] Unverified source: Source is not verified, so exact formulas, rounding and edge cases are inferred from selectors and storage layout only.
  • [info] No upgrade or pause path observed: No upgradeability or pause mechanism was found in the dispatched selectors.

Contract details

Verified source
No
Bytecode size
8,464 bytes
Upgradeable proxy
No
Detected patterns
donates, erc6909-claims, moves-currency, return-delta

Pools using Likely fee sharing hook