Fee sharing hook on Base
Uniswap v4 Hook Contract 0xa1dd6389bcb78bf5d822d207c05bbe8e3656a888 on Base · Fee sharing
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $0
- Pools using this hook
- 37
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 50
What it does
A Uniswap v4 hook that gates liquidity additions and applies an admin-configurable fee or fee-share on swaps, with accumulated tokens forwarded to a token jar.
How it works step by step
- Runs on pool initialization and records per-pool state in keyed mappings
- Gates liquidity additions through beforeAddLiquidity, with a LiquidityNotAllowed revert path
- Adjusts swap amounts on beforeSwap using a return delta and moves currency via take and settle
- Stores an admin-set uint24 fee-like parameter that influences swap pricing
- Accumulates tokens and forwards them to a token jar via pollTokenJar
- Exposes a quote function that simulates swap outcomes
- Swap behaviour
- beforeSwap is nonpayable and reads stored per-pool configuration and a uint24 fee parameter; beforeSwapReturnDelta is enabled, so the hook can take or settle currency and change the swap's net amounts, with quote(bool,int256,bytes32) exposed to estimate outcomes.
- Liquidity behaviour
- beforeAddLiquidity is implemented and returns a selector for liquidity addition, and a LiquidityNotAllowed error exists, suggesting liquidity additions may be restricted; beforeRemoveLiquidity and afterRemoveLiquidity are present as selectors, and afterAddLiquidity is present but the precise restriction logic cannot be determined.
- Fee behaviour
- A uint24 value stored at slot 0 offset 20 is written by an admin-only setter (c5cda8d2) and read during swap and quote paths, suggesting an admin-adjustable fee or fee share; the exact fee application and any protocol fee split cannot be confirmed from bytecode alone.
- Owner & admin controls
- An admin address (selector admin() is exposed) can call c5cda8d2 which writes a uint24 into storage slot 0 offset 20 (likely a fee parameter), and 3f7d1179 pollTokenJar() which moves accumulated tokens to the tokenJar address stored at slot 0. Admin key is not verified; exact parameter semantics cannot be confirmed without source.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeAddLiquidity, beforeSwap, beforeSwapReturnDelta
beforeInitialize: runs on pool initialization, writes pool state into mappings keyed by pool id and address. beforeAddLiquidity: gates liquidity additions, may revert with LiquidityNotAllowed. beforeSwap: reads per-pool configuration and fee parameters and can alter the swap through a return delta. beforeSwapReturnDelta: the hook can take or give currency during swaps, so it can move pool funds via take and settle calls.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, low confidence).
Who controls it: An admin key can change the stored uint24 parameter that influences swap pricing or fees, and can call pollTokenJar to redirect accumulated tokens to the configured token jar address. Upgradeability and timelocks cannot be confirmed from the input.
Risk to user funds: Because beforeSwapReturnDelta is enabled and the hook can call take and settle, it can hold or move pool currency during swaps. The admin-controlled parameter may change the amounts traders receive. Exact exposure cannot be quantified without verified source.
Security findings
- [medium] Hook moves currency during swaps: The hook has beforeSwapReturnDelta enabled and calls transfer, take and settle selectors, so it can take or supply currency during swaps and affect the amounts users receive.
- [medium] Admin can change a fee-like parameter: An admin-only setter (c5cda8d2) writes a uint24 parameter; the bounds it enforces are unknown from bytecode, so the admin could set an unfavourable value.
- [low] Token jar sweep function: pollTokenJar (3f7d1179) is an external state-changing function callable by the admin path to forward accumulated tokens to the token jar address.
- [info] Liquidity additions may be gated: The hook includes a LiquidityNotAllowed error and a beforeAddLiquidity callback, so liquidity provision may be restricted by the hook.
- [info] No upgrade path identified: Upgradeability and pause functions were not found in the selector list, but a proxy pattern cannot be ruled out from decoded bytecode.
Contract details
- Verified source
- No
- Bytecode size
- 11,638 bytes
- Upgradeable proxy
- No
- Detected patterns
- moves-currency, return-delta
Pools using Fee sharing hook
- VIRTUAL / WETH (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDC / cbBTC (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- WETH / cbBTC (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- WETH / USDC (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- BIO / WETH (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- WETH / USDT (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDC / USDT (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDC / AERO (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- EURC / USDC (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- WETH / EURC (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- EURC / USDC (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- RECALL / WETH (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- WETH / USDC (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- WETH / ZEN (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDC / cbBTC (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- WETH / AERO (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDC / cbBTC (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDC / CHECK (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- WETH / COMMON (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- BIO / USDC (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today