AccessControlDynamicFeeHookV4 on Ethereum
Uniswap v4 Hook Contract 0xdbc61875df1b1c477aedf91708750765dcb6c8c4 on Ethereum · Access control · Verified contract
- Volume (24h)
- $76
- Value locked (TVL)
- $477
- All-time volume
- $3.26K
- Pools using this hook
- 2
- Swaps (24h)
- 6 (5 traders)
- Total swaps
- 229
What it does
A permissioned pool hook where admins set direction-specific LP fees and price bounds, and the owner can add an extra swap fee for itself, each fee ranging from 0% to 100%, so trades in a direction the admins price higher pay more, while LPs keep unrestricted withdrawals.
How it works step by step
- Only the owner and whitelisted addresses can add liquidity to pools using this hook.
- The owner or delegated fee managers set the LP fee separately for each swap direction, anywhere from 0% to 100%.
- Swaps that would push the pool price past an admin-set floor or ceiling are reverted.
- The owner can add an extra hook fee of 0% to 100% on each swap, taken from the swap's unspecified side and sent to the owner.
- LPs can always withdraw, because the hook never runs on liquidity removal.
- Swap behaviour
- Each swap pays a direction-specific LP fee set by the admins, and the swap reverts if it moves the price beyond the configured bound in its direction. If a hook fee is set, that share of the swap output (exact-input) or input (exact-output) is taken and sent to the owner.
- Liquidity behaviour
- Adding liquidity reverts unless the caller, directly or through a trusted router, is the owner or a whitelisted provider. Removal callbacks are disabled, so LPs can always withdraw freely.
- Fee behaviour
- The LP fee is set per direction by the owner or fee managers, from 0% to 100%, and goes to LPs. The optional hook fee (default 0%, owner-settable up to 100%) is charged on top and paid to the owner.
- Owner & admin controls
- The owner can set the hook fee (0-100%), manage LP whitelists, trusted routers and fee managers. The owner and fee managers can set directional LP fees (0-100%) and the price bounds, which can effectively halt trading.
Enabled Uniswap v4 callbacks
beforeAddLiquidity, beforeSwap, afterSwap, afterSwapReturnDelta
beforeAddLiquidity: restricts liquidity adds to the whitelist; beforeSwap: applies the directional dynamic LP fee; afterSwap: enforces price bounds and collects the hook fee; afterSwapReturnDelta: charges the hook fee to the swapper.
Security & trust assessment
Risk level: high (verified source, high confidence).
Who controls it: A single owner (with delegated fee managers) controls fees, price bounds and the LP whitelist. At worst they can charge swappers up to 100% or halt trading.
Risk to user funds: Swappers can lose 0% to 100% of a swap to LP and hook fees depending on admin settings, so traders should check current fees before swapping. LP principal cannot be locked or drained, since withdrawals bypass the hook.
Security findings
- [high] Uncapped hook fee to owner: The owner can set the hook fee up to 100% of the swap's unspecified amount, paid directly to the owner, which could take most or all of a swap's output.
- [medium] Uncapped LP fee and trading halt: Fee managers can set LP fees up to 100% per direction or tighten price bounds, which effectively freezes one or both swap directions.
- [info] Permissioned liquidity: Only whitelisted providers can add liquidity, but withdrawals are never hooked and cannot be blocked.
Contract details
- Verified source
- Yes (AccessControlDynamicFeeHookV4)
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Bytecode size
- 14,298 bytes
- Upgradeable proxy
- No
- Detected patterns
- dynamic-fee, moves-currency, ownable, return-delta
Pools using AccessControlDynamicFeeHookV4
- ETH / USDC (Dynamic fee) — 24h volume $76, TVL $477, 6 swaps today
- ETH / USDC (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today