Likely custom pricing hook on Base

Uniswap v4 Hook Contract 0x3c98094e0cfd395ac908d3b292cff20c201a8888 on Base · Custom pricing

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

What it does

A Uniswap v4 hook with an owner-toggleable active flag that runs logic before swaps and liquidity additions, using return-delta permissions to adjust swap accounting; its precise purpose cannot be confirmed without source.

This read was written for the hook 0x348d…c888 on BNB Chain and reused here: the two share a code shape, so constants such as fees, owners and addresses can differ.

How it works step by step

  • Stores an owner address and an active flag in slot 0 of storage.
  • beforeSwap runs on every swap and can return a balance delta that alters swap accounting.
  • beforeAddLiquidity runs before LP deposits into the pool.
  • Exposes MAX_HOOK_FEE_BPS and TOTAL_BPS, indicating a basis-point fee scheme.
  • Owner can toggle the active flag via setActive and transfer ownership.
Swap behaviour
beforeSwap is nonpayable and returns a delta under beforeSwapReturnDelta permission, so it can modify swap accounting when the hook is active; afterSwap is also present as a selector but not an enabled permission.
Liquidity behaviour
beforeAddLiquidity is enabled and performs a check or action before liquidity is added; the callback body was not decoded, so specific behaviour is unknown. afterAddLiquidity and beforeRemoveLiquidity/afterRemoveLiquidity are present as selectors but not enabled as permissions.
Fee behaviour
Hook exposes MAX_HOOK_FEE_BPS and TOTAL_BPS getters, suggesting a hook-level fee mechanism, and beforeSwap uses return-delta permissions, but the exact fee computation cannot be determined from the decoded selectors alone.
Owner & admin controls
Owner (storage slot 0) can call setActive(bool) to toggle the hook on or off (bool packed at byte offset 20 of slot 0) and transferOwnership(address) to hand over control. No upgrade path or parameter setters were identified in the decoded selectors.

Enabled Uniswap v4 callbacks

beforeAddLiquidity, beforeSwap, beforeSwapReturnDelta

beforeAddLiquidity: runs logic before LP deposits, likely gating or accounting them. beforeSwap: runs logic before each swap, with return-delta permission allowing the hook to alter swap amounts or take a delta. beforeSwapReturnDelta: lets beforeSwap return a delta that adjusts the pool's swap accounting.

Security & trust assessment

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

Who controls it: The owner can switch the hook active state via setActive and can transfer ownership to any address; if the hook gates swaps or liquidity while active, the owner can effectively pause or censor pool interactions.

Risk to user funds: The hook can alter swap amounts through return deltas and can be switched on or off by the owner, so it may affect trader execution and LP outcomes, but no direct custody or token transfer function was identified from the decoded selectors.

Security findings

  • [medium] Return-delta permission on swaps: beforeSwapReturnDelta lets the hook modify swap accounting, so the hook can take or redirect part of swap amounts depending on its logic.
  • [medium] Owner can toggle hook active state: An owner-controlled setActive(bool) flag exists and is read during swaps, so the owner can toggle hook behaviour on live pools.
  • [low] Single-owner control without timelock: Single owner stored in slot 0 with ownership transfer; no timelock or multisig evidence in bytecode.
  • [info] Limited decoding depth: Callback bodies were not decoded in detail, so the exact fee and delta logic cannot be verified.

Contract details

Verified source
No
Bytecode size
5,186 bytes
Upgradeable proxy
No
Detected patterns
ownable, return-delta

Pools using Likely custom pricing hook