Custom pricing hook on Base
Uniswap v4 Hook Contract 0xd195937caecda5a05e7f7cb2f401f9004963e5c7 on Base · Custom pricing
- Volume (24h)
- $1.68K
- Value locked (TVL)
- $5.17K
- All-time volume
- $5.40K
- Pools using this hook
- 5
- Swaps (24h)
- 15 (7 traders)
- Total swaps
- 75
What it does
A proxied Uniswap v4 hook that takes a configurable share of pool fees or deltas from swaps and liquidity changes, routes part to a fee recipient, and leaves the remainder to LPs.
How it works step by step
- Registers pool configuration and keys in beforeInitialize.
- Runs beforeSwap and afterSwap logic to read or update per-pool fee state.
- Can take a portion of swap output via afterSwapReturnDelta.
- Tracks LP add and remove events in afterAddLiquidity and afterRemoveLiquidity and can take or credit tokens via return deltas.
- Splits collected fees between a fee recipient (feeRecipient) and LPs using lpShareBps.
- Is pausable and upgradeable through a proxy controlled by an admin.
- Swap behaviour
- beforeSwap and afterSwap callbacks run on every swap, reading pool configuration and possibly taking a portion of the output through afterSwapReturnDelta.
- Liquidity behaviour
- afterAddLiquidity and afterRemoveLiquidity callbacks record per-position data in mapping storage (uint256 keyed timestamps/amounts) and can return balance deltas, so the hook may take or credit tokens when LPs add or remove liquidity.
- Fee behaviour
- Fees appear to be read from a feeRecipient/lpShareBps configuration and possibly a dynamic fee stored with uint24 values; the exact fee formula cannot be determined without source. Fee-related selectors (lpShareBps, feeRecipient) suggest a share of hook-collected fees is routed to a recipient, with the remainder going to LPs.
- Owner & admin controls
- Proxy with upgradeTo(address) and an admin() getter, so the implementation can be swapped at will; setPaused(bool) toggles a pause flag; setFeeRecipient(address) changes where fees go; a selector (0xdcc565c8, bool) and setter 0x9b3b545f (uint24) plus 0x3bc0e2d7/0xfcdfba4e (address with uint248 values) indicate parameter and registry changes. Admin identity and whether it is multisig or EOA cannot be determined from the input.
Enabled Uniswap v4 callbacks
beforeInitialize, afterAddLiquidity, afterRemoveLiquidity, beforeSwap, afterSwap, afterSwapReturnDelta, afterAddLiquidityReturnDelta, afterRemoveLiquidityReturnDelta
beforeInitialize registers pool configuration and pool keys; beforeSwap and afterSwap read/update pool state and fee data around each swap; afterSwapReturnDelta lets the hook take a portion of swap output; afterAddLiquidityReturnDelta and afterRemoveLiquidityReturnDelta let the hook take or credit tokens on liquidity changes.
Security & trust assessment
Risk level: high (decoded bytecode, low confidence).
Who controls it: The admin can upgrade the implementation to arbitrary code, pause the hook, change the fee recipient and alter fee or registry parameters. A malicious or compromised admin could redirect hook-taken fees or pause swaps and liquidity actions.
Risk to user funds: The hook can take a portion of swap and liquidity token flows through return deltas, and an admin can upgrade the implementation or pause it, so user and LP funds routed through pools using this hook are exposed to admin-controlled logic.
Security findings
- [high] Upgradeable proxy controlled by admin: Proxy exposes upgradeTo and an admin getter, so the logic can be replaced by the admin at any time.
- [medium] Pausable hook can block pool activity: setPaused(bool) and paused() indicate the hook can halt callbacks, which can block swaps or liquidity actions on pools that use it.
- [medium] Hook moves currency via return deltas: Return-delta permissions let the hook take tokens from swaps and liquidity operations, so funds flow through hook accounting.
- [medium] Fee recipient is admin-changeable: setFeeRecipient can redirect hook-collected fee revenue to a new address chosen by the admin.
- [info] Analysis limited to decoded bytecode: Without verified source, storage behaviour and fee math are inferred from selectors only and may be incomplete.
Contract details
- Verified source
- No
- Bytecode size
- 221 bytes
- Upgradeable proxy
- Yes
- Detected patterns
- moves-currency, pausable, return-delta, upgradeable
Pools using Custom pricing hook
- ETH / NVDAc (Dynamic fee) — 24h volume $1.54K, TVL $1.94K, 13 swaps today
- ETH / AAPLc (Dynamic fee) — 24h volume $137, TVL $1.72K, 1 swaps today
- ETH / SNDKc (Dynamic fee) — 24h volume $0, TVL $0, 1 swaps today
- ETH / GOOGLc (Dynamic fee) — 24h volume $0, TVL $1.52K, 0 swaps today
- ETH / METAc (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today