Likely dynamic fee hook on Base

Uniswap v4 Hook Contract 0x51238c1b3e31e264824a48492da32609e8560080 on Base · Dynamic fee

Volume (24h)
$5.67
Value locked (TVL)
$55
All-time volume
$147
Pools using this hook
3
Swaps (24h)
14 (11 traders)
Total swaps
241

What it does

A Uniswap v4 hook that runs custom logic before each swap, most likely to set a dynamic or adjusted fee, with owner-adjustable parameters.

How it works step by step

  • Runs custom logic in beforeSwap, the only enabled hook permission
  • Reads two uint24 values packed in storage slot 0 that are set by selector 0xece956bc
  • Reads a uint256 parameter from storage slot 1 that is set by selector 0x8b14c9d4
  • Stores an owner address in slot 2 used for admin checks
  • Returns the standard hook selectors for other callbacks without state changes
Swap behaviour
beforeSwap (selector 0x575e24b4) runs before every swap and reads owner-configured storage values in slots 0 and 1, so swap-time behaviour depends on those parameters.
Liquidity behaviour
Before and after add and remove liquidity callbacks exist as selectors but are view functions that appear to return the expected selector without state changes. No liquidity-dependent state writes were identified.
Fee behaviour
Storage slot 0 holds two uint24 values that are written by selector 0xece956bc and read during swaps, consistent with a fee or threshold parameter set by an admin. The swap-time logic that uses them cannot be fully confirmed from bytecode alone.
Owner & admin controls
Owner-gated functions are present (owner() selector 0x8da5cb5b and a storage slot holding an address). Selector 0xece956bc (uint24,uint24) and 0x8b14c9d4 (uint256) are nonpayable and write to storage slots 0 and 1, which suggests the owner can set fee-related parameters. Exact access checks cannot be confirmed without source.

Enabled Uniswap v4 callbacks

beforeSwap

beforeSwap is the only enabled permission; it is used to run custom logic before each swap, likely to compute a dynamic fee or apply a swap-level adjustment.

Security & trust assessment

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

Who controls it: The owner may be able to change parameters stored in slots 0 and 1 that influence swap execution, potentially changing fees or swap behaviour for all users of the pool.

Risk to user funds: The hook only has beforeSwap enabled and no return-delta permissions are shown, so it should not directly take or hold pool tokens. It could affect execution prices or block swaps through its parameters if the logic reverts or applies an extreme fee, but this is inferred and not confirmed.

Security findings

  • [medium] Admin-settable swap parameters: Selector 0xece956bc (uint24,uint24) is nonpayable and writes to storage slot 0, indicating an admin-settable parameter that affects beforeSwap.
  • [low] Mutable numeric parameter used in swaps: Selector 0x8b14c9d4 (uint256) is nonpayable and writes to storage slot 1, which is read by beforeSwap, so an authorized caller can change a numeric parameter used during swaps.
  • [info] Unverified source: No verified source is available, so the exact access control on setter functions and any upgrade mechanism cannot be confirmed.

Contract details

Verified source
No
Bytecode size
4,163 bytes
Upgradeable proxy
No
Detected patterns
ownable

Pools using Likely dynamic fee hook