AdaptivePoolPolicyHookV1 on Ethereum
Uniswap v4 Hook Contract 0xfde6c74f995775bc1dc3549dce9a0a25032f48c4 on Ethereum · Dynamic fee · Verified contract
- Volume (24h)
- $1.65K
- Value locked (TVL)
- $36.47K
- All-time volume
- $218.79K
- Pools using this hook
- 1
- Swaps (24h)
- 13 (9 traders)
- Total swaps
- 734
What it does
placeholder
How it works step by step
- placeholder
- Swap behaviour
- placeholder
- Liquidity behaviour
- beforeAddLiquidity reverts unless publicLiquidityEnabled is true or the authenticated LP (via IMsgSender for allowed routers, or the direct sender) is the owner or an allowed provider. Removals are unrestricted.
- Fee behaviour
- Directional LP fees fee0For1 and fee1For0 (0 to 1,000,000 hundredths of a bip, i.e. up to 100%) are returned as overridden dynamic fees in beforeSwap, chosen by swap direction. Separately, an owner-set hookFee (default 0, up to 100%) is charged on the swap's unspecified amount in afterSwap and taken to the hook via poolManager.take, paid by the swapper on top of the LP fee.
- Owner & admin controls
- Owner (Ownable2Step, renounce disabled) can set hookFee up to 100%, toggle publicLiquidityEnabled, add or remove routers, add or remove policy managers, and claim all collected balances of any currency to any recipient. Owner and allowed policy managers can set directional LP fees up to MAX_FEE (100%) and price bounds via setPolicy, setDirectionalFeePolicy and setPriceBoundsPolicy; policy managers can also add and remove providers. Ownership transfer is two-step.
Enabled Uniswap v4 callbacks
beforeAddLiquidity, beforeSwap, afterSwap, afterSwapReturnDelta
beforeAddLiquidity restricts who may add liquidity to the owner and whitelisted providers when public liquidity is disabled. beforeSwap overrides the LP fee per swap direction. afterSwap enforces directional sqrtPrice bounds (reverting the swap if breached) and optionally takes the hook fee as an unspecified delta, enabling the hook to receive funds.
Security & trust assessment
Risk level: high (verified source, high confidence).
Who controls it: The owner or a policy manager can set either directional LP fee to 100%, which makes swaps in that direction consume the full input as fee and blocks price movement, effectively freezing one side of the pool. Price bounds can be set to block all swaps that move price outside a band. The owner can set hookFee to 100%, extracting the full unspecified output amount from swappers, and can claim all hook-held balances. Policy managers can add providers and change fees and bounds without owner consent.
Risk to user funds: Not stated.
Security findings
- [high] Owner can set hook fee to 100%: setDirectionalFeePolicy and setPolicy accept any fee up to MAX_FEE; the owner can set hookFee to 1,000,000 (100%) so the unspecified side of swaps is seized to the hook.
- [medium] Delegated policy managers can freeze or reprice swaps: Policy managers can set fees to MAX_FEE or tight price bounds, blocking swaps in a direction without any owner action; the delegated role has no timelock and only deadline checks.
- [medium] Owner can drain all hook-held balances: claimFees transfers the hook's entire balance of a currency to any recipient, including fees from all pools using this hook; there is no timelock or accounting separation.
- [medium] Trusted routers can spoof LP identity: Owner can add routers that are trusted to report the LP identity via IMsgSender; a malicious router could bypass the provider whitelist when public liquidity is disabled.
- [info] Single owner key, no timelock: Ownership is protected by Ownable2Step and renounceOwnership is disabled, reducing accidental loss of control, but the owner is a single key with no timelock.
Contract details
- Verified source
- Yes (AdaptivePoolPolicyHookV1)
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Bytecode size
- 16,262 bytes
- Upgradeable proxy
- No
- Detected patterns
- moves-currency, ownable, return-delta
Pools using AdaptivePoolPolicyHookV1
- ETH / USDC (Dynamic fee) — 24h volume $1.65K, TVL $36.47K, 13 swaps today