Likely dynamic fee hook on Ethereum
Uniswap v4 Hook Contract 0xe4345ccdb948e57a8440016f2912170e9bcce080 on Ethereum · Dynamic fee
- Volume (24h)
- $280
- Value locked (TVL)
- $1.26
- All-time volume
- $280
- Pools using this hook
- 1
- Swaps (24h)
- 19 (3 traders)
- Total swaps
- 19
What it does
This hook sets a dynamic swap fee on each trade using stored fee settings, so the fee users pay depends on the hook's current fee state, though which trade directions pay more or less cannot be determined from the bytecode.
How it works step by step
- Only the beforeInitialize and beforeSwap callbacks are enabled, so the hook can gate pool initialization and set the swap fee before each swap.
- On beforeInitialize it validates the pool key against a stored PoolKey and records the pool id, marking the hook as initialized.
- Stores a fee configuration (a set of uint24 fee values packed into one storage slot) and a fee state (uint40 timestamp, address, uint24 values and a bool) that are read and updated during swaps.
- On beforeSwap it reads the fee configuration and fee state, computes a fee and returns it as an override fee for the pool, capped by a MAX_TOTAL_FEE_E6 constant.
- Exposes view functions (feeConfig, feeState, feeSnapshot, buyMoveConfig, getFee) so off-chain users can read the current fee parameters.
- Contains a buyMoveConfig storage area and a fee snapshot, suggesting the fee depends on swap direction or recent activity, but the exact formula cannot be determined from bytecode alone.
- Swap behaviour
- On each swap the hook runs beforeSwap, reads its stored fee configuration and fee state, and returns a dynamic fee override for the swap; which trade directions pay more or less cannot be determined from the decoded bytecode.
- Liquidity behaviour
- No liquidity callbacks.
- Fee behaviour
- Dynamic fee set by the hook in beforeSwap from stored fee configuration and fee state, bounded by MAX_TOTAL_FEE_E6; the fee is not taken or shared by the hook, it is applied as the swap fee.
- Owner & admin controls
- No admin controls found. No owner, pause, upgrade or parameter-setter selectors were decoded, but the initializer and initialize-related selectors suggest one-time setup that could not be fully checked.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeSwap
beforeInitialize validates and records the pool key and marks the hook initialized; beforeSwap computes and returns the dynamic swap fee.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, medium confidence).
Who controls it: No owner or admin selectors were decoded, so no obvious privileged key was found; the initialization path should be checked to confirm who may call it.
Risk to user funds: The hook does not appear to hold or move tokens via return deltas; it influences user funds only through the swap fee it returns in beforeSwap.
Security findings
- [medium] Unverified source: No verified source is available, so the fee formula and any hidden privileged paths cannot be fully audited from decoded bytecode alone.
- [medium] Dynamic fee in beforeSwap: The hook sets the swap fee on every swap, so an incorrect or manipulable fee state could change the fee users pay; the bound MAX_TOTAL_FEE_E6 limits the upper end.
- [info] One-time initialization: initializePool and the initializer selector indicate the hook is configured once through an initialization path that gates pool setup.
Contract details
- Verified source
- No
- Bytecode size
- 6,799 bytes
- Upgradeable proxy
- No
Pools using Likely dynamic fee hook
- ETH / TEST (Dynamic fee) — 24h volume $280, TVL $1.26, 19 swaps today