Likely dynamic fee hook on Ethereum
Uniswap v4 Hook Contract 0xecb727ba6ab4bdda4e0a4588340e2eda12bac0c0 on Ethereum · Access control
- Volume (24h)
- $0
- Value locked (TVL)
- $0.22
- All-time volume
- $0.43
- Pools using this hook
- 1
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 45
What it does
A Uniswap v4 hook that runs custom logic before and after swaps in its pool, with an owner-controlled simulation flag, though its exact purpose cannot be confirmed without verified source.
How it works step by step
- Runs custom logic in beforeSwap, reading hook storage including a simulation-mode flag.
- Runs custom logic in afterSwap, writing to a per-id mapping and a counter-like slot.
- Exposes an owner-gated setSimulationMode flag that alters swap-path behaviour.
- Contains take and ERC20 transfer selectors, indicating it can move tokens.
- Stores a registry of pool or config ids and an isActive check, though their use is not fully decoded.
- Swap behaviour
- beforeSwap and afterSwap run on every swap; they read and write hook storage and may move currency, but the specific logic cannot be confirmed from decoded bytecode.
- Liquidity behaviour
- Liquidity-add and liquidity-remove hook entry points (beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity, afterRemoveLiquidity) are exposed as view functions and do not appear to mutate state; no liquidity-side logic was identified beyond that.
- Fee behaviour
- Uses the pool's static fee; no fee-setting selector was identified in the decoded functions.
- Owner & admin controls
- Owner (slot 0) can transfer ownership (transferOwnership) and toggle simulationMode via setSimulationMode(bool); simulationMode is read in beforeSwap and afterSwap paths, so the owner can change swap-path behaviour. No pausing or upgrade function was identified in the decoded selectors.
Enabled Uniswap v4 callbacks
beforeSwap, afterSwap
beforeSwap: custom logic runs before each swap and can touch hook storage (slots 2 and 4 are read there). afterSwap: custom logic runs after each swap and writes to a mapping and a counter-like storage slot, and it may move currency via the take/transfer selectors found in the bytecode.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, low confidence).
Who controls it: The owner key can transfer ownership to any address and can flip simulationMode, which changes the behaviour of swap callbacks. Whether that flip can block or alter user swaps depends on logic that cannot be fully confirmed without source.
Risk to user funds: The hook can invoke take and token transfer functions, so it may hold or move pool-related tokens; the precise conditions and whether it can block swaps cannot be determined from bytecode alone.
Security findings
- [medium] Owner-controlled swap-path flag: The owner can toggle simulationMode, a flag read inside the swap callback path, so the owner controls part of swap-time behaviour.
- [medium] Hook can move currency: The bytecode contains selectors for take, transfer and transferFrom, so the hook can move tokens; with no source the exact conditions are unverified.
- [low] Single-step ownership transfer: Ownership can be transferred in a single step with transferOwnership, with no two-step acceptance evident from the selectors.
- [info] Swap callbacks execute on every swap: The hook implements beforeSwap and afterSwap and is therefore called on every swap in its pool, so any bug in these paths affects trades directly.
Contract details
- Verified source
- No
- Bytecode size
- 9,994 bytes
- Upgradeable proxy
- No
- Detected patterns
- moves-currency, ownable
Pools using Likely dynamic fee hook
- USDC / WETH (0.30% fee) — 24h volume $0, TVL $0.22, 0 swaps today