Dynamic fee hook on Ethereum
Uniswap v4 Hook Contract 0xfa489e2843a02fb55b61abf223e085ae6e4be0cc on Ethereum · Dynamic fee
- Volume (24h)
- $3.86K
- Value locked (TVL)
- $989
- All-time volume
- $324.33K
- Pools using this hook
- 1
- Swaps (24h)
- 79 (62 traders)
- Total swaps
- 1,792
What it does
A Uniswap v4 hook that charges configurable creator and platform fees on swaps and routes them to a fee vault and platform recipient, with a launch-style fee profile.
How it works step by step
- Charges separate creator buy and sell fees in basis points on swaps
- Takes a platform fee defined by PLATFORM_FEE_BPS and sends it to PLATFORM_RECIPIENT
- Routes remaining fees to a fee vault via recordFees and ERC6909 minting
- Applies a static LP fee (lpFee) to the pool
- Restricts initialization to a one-time initializer bound to the pool manager
- Swap behaviour
- beforeSwap and afterSwap run on every swap; the hook uses return deltas to take a fee from the trade and records the fee amounts through the fee vault accounting, with separate buy and sell fee rates.
- Liquidity behaviour
- beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity, afterRemoveLiquidity, beforeDonate and afterDonate are dispatched but appear to be view-level handlers; no state-changing liquidity logic was identified.
- Fee behaviour
- Fees are configured through creatorBuyFeeBps, creatorSellFeeBps, lpFee and PLATFORM_FEE_BPS; the hook uses quoteFees(uint256,bool,bool) and recordFees(uint256,uint256) to split fees between a fee vault and a platform recipient. Exact split logic is not recoverable without source.
- Owner & admin controls
- No owner or admin selectors found in the dispatch table (no owner(), setter, pause or upgrade functions); the contract exposes immutable-style view getters (creatorBuyFeeBps, creatorSellFeeBps, lpFee, feeVault, PLATFORM_RECIPIENT, module, token) and a one-time initializer guarded by a storage bool. Parameters appear fixed after initialization, though this cannot be fully confirmed without source.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize: runs one-time setup and validation of the pool. beforeSwap: computes swap-time fee or return delta logic for the trade. afterSwap: records fees and updates state after execution. beforeSwapReturnDelta: lets the hook take or give tokens during a swap, which allows it to skim fees. afterSwapReturnDelta: lets the hook settle an additional amount after the swap, enabling post-trade fee capture.
Security & trust assessment
Risk level: medium (decoded bytecode, low confidence).
Who controls it: No privileged admin key was found, so centralization risk appears limited, but the fee-related parameters and fee recipient addresses are fixed constants or immutable values that a deployer chose and users cannot change.
Risk to user funds: The hook can take tokens through return deltas during swaps and records fee claims through ERC6909 minting, so it can hold or redirect a portion of trade flows to the fee vault and platform recipient. Liquidity provider principal is not obviously held by the hook.
Security findings
- [medium] Return-delta fee capture on swaps: The hook holds return-delta permissions, so it can take a portion of each swap's input or output token before settlement, directly affecting traders' execution amounts.
- [low] Swaps can revert on specific conditions: Dispatch includes HookNotImplemented, NoTrade and InvalidDynamicFeeOverride errors, indicating swaps can be reverted under certain conditions.
- [info] ERC6909 claim tokens used for fee accounting: Dispatch includes the ERC6909 mint selector and a recordFees call, indicating the hook mints claim tokens against fees rather than transferring them directly.
- [info] No pause or upgrade path found: No owner, pause or upgrade selectors were found, so the contract appears non-upgradeable with no emergency stop.
Contract details
- Verified source
- No
- Bytecode size
- 8,365 bytes
- Upgradeable proxy
- No
- Detected patterns
- erc6909-claims, return-delta
Pools using Dynamic fee hook
- ETH / KEYLESS (0.00% fee) — 24h volume $3.86K, TVL $989, 79 swaps today