Dynamic fee hook on Base

Uniswap v4 Hook Contract 0xb915740a95c0fe8ce473bb9abda4806a91d04080 on Base · Dynamic fee

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

What it does

A Uniswap v4 hook that applies an admin-set dynamic swap fee to every swap in the pools it is attached to.

How it works step by step

  • Attaches to pools and runs logic in beforeSwap only.
  • Reads a uint24 fee from storage slot 0 at offset 20.
  • Returns that fee to the pool manager as the swap fee override.
  • Lets a single privileged address update the fee via updateFee(uint24).
  • Exposes the standard v4 callback surface, with the remaining callbacks not enabled by the hook address permissions.
Swap behaviour
beforeSwap runs before each swap and returns a fee value read from storage, which the pool uses for that swap.
Liquidity behaviour
No liquidity callbacks.
Fee behaviour
The hook overrides the swap fee through beforeSwap, which reads a uint24 fee value from storage (slot 0, offset 20) that the privileged updateFee function can change at any time.
Owner & admin controls
A single owner-like address stored in slot 0 can call updateFee(uint24), which writes the fee value packed at offset 20 of slot 0; no pause, upgrade or other admin functions were found.

Enabled Uniswap v4 callbacks

beforeSwap

beforeSwap is enabled and used to return a fee override read from storage; the other callbacks are present in the dispatcher but the permission flags indicate only beforeSwap is active.

Security & trust assessment

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

Who controls it: The privileged key can set the swap fee to any uint24 value on every pool using this hook, including values that make swaps prohibitively expensive or effectively free of fee revenue for LPs.

Risk to user funds: The hook does not appear to custody tokens or take return deltas, so it cannot directly move or hold pool funds; users' exposure is to the fee being set arbitrarily by the owner, which affects trade output.

Security findings

  • [medium] Owner-controlled swap fee: updateFee(uint24) writes the fee used in beforeSwap, so the key holder can change trading costs immediately and without a timelock.
  • [info] Unused callback selectors: Only beforeSwap is enabled by the hook address permission bits, so liquidity and donate paths are not hooked despite their selectors being present.
  • [info] Standard base hook pattern: The bytecode references a HookNotImplemented error, consistent with the standard base hook revert pattern for unimplemented callbacks.

Contract details

Verified source
No
Bytecode size
2,803 bytes
Upgradeable proxy
No
Detected patterns
dynamic-fee, self-unlock

Pools using Dynamic fee hook