Likely custom pricing hook on Unichain

Uniswap v4 Hook Contract 0x3818c378715673abe87bbfb1c72a10723fa0dacc on Unichain · Dynamic fee

Volume (24h)
$0.50
Value locked (TVL)
$176
All-time volume
$340
Pools using this hook
1
Swaps (24h)
1 (1 traders)
Total swaps
640

What it does

A pausable, owner-managed Uniswap v4 hook that adjusts swap fees and accrues a market share of pool activity for the owner to withdraw, with liquidity callbacks that may support fee reinvestment.

How it works step by step

  • Runs swap callbacks that compute and record a per-pool hook fee in ppm
  • Accrues fee balances per pool, viewable through pendingFees
  • Lets the owner set the hook fee per pool via setHookFeePpm
  • Takes a share of swap currency through before/after swap return deltas
  • Lets the owner withdraw accrued market shares via withdrawMarketShares
  • Supports owner pause that halts operations
Swap behaviour
beforeSwap and afterSwap are active, and the hook uses return deltas, so it can take a portion of swap flows and accrue fees per pool during swaps.
Liquidity behaviour
beforeAddLiquidity and beforeRemoveLiquidity callbacks are implemented, and afterAddLiquidity and afterRemoveLiquidity selectors exist in the dispatch table. A reinvest cooldown and minimum reinvest liquidity constant suggest the hook may reinvest accrued fees back into liquidity; this is inferred from constant names and cannot be confirmed from bytecode alone.
Fee behaviour
Hook maintains a per-pool hookFeePpm (storage mapping keyed by pool id) which the owner sets; pendingFees(bytes32) tracks accumulated fees; afterSwap appears to accrue fees from swaps and withdrawMarketShares lets the owner extract them. Exact fee split and dynamic fee logic cannot be fully confirmed without source.
Owner & admin controls
Owner (Ownable) can pause and unpause swaps and liquidity operations via pause(bool), set a per-pool hook fee in ppm via setHookFeePpm(bytes32,uint24), withdraw accumulated market shares via withdrawMarketShares(bytes32,address,uint256), and transfer or renounce ownership. Owner is a single key in storage slot 0.

Enabled Uniswap v4 callbacks

afterInitialize, beforeAddLiquidity, beforeRemoveLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

afterInitialize: pool setup and state recording. beforeAddLiquidity and beforeRemoveLiquidity: liquidity hooks, likely gating or accounting. beforeSwap and afterSwap: swap-time fee logic and accrual. beforeSwapReturnDelta and afterSwapReturnDelta: the hook can take a share of swap input or output through return deltas and moves currency via take and settle calls.

Security & trust assessment

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

Who controls it: The owner can pause the hook, halting swaps and/or liquidity operations, change the hook fee for any pool up to the uint24 limit, and withdraw accrued market shares. A compromised owner key could redirect accrued fees and disrupt trading.

Risk to user funds: The hook holds and moves pool currency through take/settle during swaps and holds accrued fee balances (pendingFees) that the owner can withdraw. Pausing can block swaps and liquidity actions. Funds exposure is moderate and depends on unverified logic.

Security findings

  • [medium] Owner-controlled pause and fee parameters: Owner can pause the hook via pause(bool) and can change hookFeePpm per pool; the owner key is a single address with no timelock visible in bytecode.
  • [medium] Return-delta currency movement: Hook uses beforeSwapReturnDelta and afterSwapReturnDelta and calls take and settle functions, so it can custody or move pool currency during swaps.
  • [medium] Owner can withdraw accrued market shares: withdrawMarketShares lets the owner withdraw accrued fee balances, which are user-generated value.
  • [info] No verified source: Contract is not verified, so behaviour is inferred from selectors and storage only.

Contract details

Verified source
No
Bytecode size
11,551 bytes
Upgradeable proxy
No
Detected patterns
moves-currency, ownable, pausable, return-delta

Pools using Likely custom pricing hook