Dynamic fee hook on Unichain
Uniswap v4 Hook Contract 0x1673ce5f7f5e39c7f32657189db3c3cffebe0088 on Unichain · Dynamic fee
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $0
- Pools using this hook
- 8
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 0
What it does
A pool-level hook that intercepts swaps before execution to apply a per-pool fee override set by the owner, with an owner-controlled pause switch that can block swaps.
This read was written for the hook 0x3e2e…c088 on Ethereum and reused here: the two share a code shape, so constants such as fees, owners and addresses can differ.
How it works step by step
- Stores a fee value per pool in a mapping keyed by pool id, written by setPoolFee(bytes32,uint24).
- Runs logic in beforeSwap that reads the pool's stored fee and returns a fee override or a swap return delta to the pool manager.
- Includes a paused flag set by setPaused(bool) that gates swap-related logic.
- Keeps an owner address with setOwner(address) and an execute(address,uint256,bytes) function that can perform arbitrary calls.
- Maintains a list of pool ids (allPools, getPoolCount) and a DEFAULT_TICK_SPACING constant, indicating it tracks which pools it manages.
- Exposes standard Uniswap v4 hook callbacks for liquidity, donate and initialize, which appear to be stubs or pass-through views.
- Swap behaviour
- beforeSwap is the active callback: it reads the pool's configured fee and the paused state, and returns a fee override and a before-swap return delta that can alter the amounts exchanged. Swaps are expected to revert or be affected when the hook is paused.
- Liquidity behaviour
- beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity and afterRemoveLiquidity are present as selectors but no state-changing liquidity logic was identified from the decoded input; treat as pass-through.
- Fee behaviour
- The hook sets a per-pool fee through setPoolFee(bytes32,uint24) and applies it during beforeSwap, overriding the pool's static fee for hooked pools. The exact fee math and any cap were not determinable from bytecode alone.
- Owner & admin controls
- The owner (storage slot 0) can change the owner address, pause or unpause the hook, set the fee for any pool, and call execute to make arbitrary external calls on behalf of the hook. No timelock or multisig evidence was found.
Enabled Uniswap v4 callbacks
beforeSwap, beforeSwapReturnDelta
beforeSwap: applies the custom fee and pause check on every swap. beforeSwapReturnDelta: allows the hook to return a delta that changes the amounts settled in the swap, so it can take or give tokens within a swap.
Security & trust assessment
Risk level: high, estimated (decoded bytecode, low confidence).
Who controls it: A single owner key controls fees on every pool it manages, can pause all swaps, can transfer ownership, and can execute arbitrary calls through execute. Compromise of that key could drain value or freeze trading.
Risk to user funds: The hook can alter swap amounts through return deltas and can hold or move tokens via execute; users trading in hooked pools are exposed to fee manipulation and pause-based freezes, and any tokens the hook holds are at risk via execute.
Security findings
- [high] Owner can set arbitrary per-pool fees: setPoolFee(bytes32,uint24) writes a fee into storage that beforeSwap reads, with no visible cap in the decoded input. A malicious or compromised owner could set a very high fee on a pool and extract value from swappers.
- [medium] Pause can block swaps: setPaused(bool) toggles a flag read in the swap path, so the owner can halt swaps on all hooked pools at will.
- [high] Generic execute function: execute(address,uint256,bytes) lets the owner make arbitrary calls with arbitrary value from the hook contract; this is a broad privileged capability that could move any assets the hook holds.
- [medium] Return delta can move pool funds: beforeSwapReturnDelta permits the hook to alter swap settlement amounts, so the hook can take or give tokens during swaps; the exact logic could not be verified without source.
- [info] Unverified source: No verified source is available, so behaviour is inferred from selectors and storage access only.
Contract details
- Verified source
- No
- Bytecode size
- 16,903 bytes
- Upgradeable proxy
- No
- Detected patterns
- pausable, return-delta
Pools using Dynamic fee hook
- ETH / steakETH (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- Re7USDT0 / USD₮0 (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDC / pUSDC (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / Re7WETH (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / K3WETH (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDC / gtusdcc (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / gtwethc (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- gtusdt0c / USD₮0 (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today