Dynamic fee hook on Ink
Uniswap v4 Hook Contract 0x6950eebd489483103733aa687a1a76c50696aa80 on Ink · Dynamic fee
- Volume (24h)
- $2.29K
- Value locked (TVL)
- $270
- All-time volume
- $22.63K
- Pools using this hook
- 5
- Swaps (24h)
- 26 (14 traders)
- Total swaps
- 315
What it does
A Uniswap v4 hook that applies a time-decaying, sniper-style dynamic fee to pools registered through a launchpad, so early buyers pay a higher fee that falls over a set duration.
How it works step by step
- Stores a per-pool fee configuration keyed by pool id via register
- Sets a launch time and sniper fee parameters for registered pools
- Computes a dynamic fee in beforeSwap based on configuration and elapsed time
- Exposes currentFees so the current fee for a pool can be queried
- Rejects calls for unknown pools and non-launchpad callers via custom errors
- Runs checks on pool initialization and liquidity add and remove
- Swap behaviour
- beforeSwap is called on every swap and returns a dynamic fee derived from the pool's stored config and elapsed time since launch, capped by a maximum fee.
- Liquidity behaviour
- beforeAddLiquidity and beforeRemoveLiquidity are enabled as callbacks and are view-only in the decoded selectors, so they appear to gate or validate liquidity changes rather than move funds.
- Fee behaviour
- Per-pool fee configuration is written via register(bytes32, config) and read through configs(bytes32) and currentFees(bytes32). The config fields and the MAX_FEE_BPS and MAX_SNIPER_FEE_BPS constants suggest a time-decaying sniper fee that starts high and falls toward a base fee over MAX_SNIPER_DURATION, with an upper cap, but the exact formula cannot be confirmed from bytecode alone.
- Owner & admin controls
- No admin controls found. The register function is open to any caller and stores per-pool configuration keyed by a pool id; no owner or pause selector was decoded.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeAddLiquidity, beforeRemoveLiquidity, beforeSwap
beforeInitialize registers or validates a pool at creation, beforeSwap computes the dynamic fee applied to each swap, beforeAddLiquidity and beforeRemoveLiquidity are present as checks around liquidity changes.
Security & trust assessment
Risk level: medium (decoded bytecode, medium confidence).
Who controls it: Registration appears permissionless, so anyone can call register with a config for a pool id. Whether this can overwrite an existing pool's config depends on logic not visible in the decoded selectors. The NotLaunchpad error suggests a launchpad address may be authorized to register pools.
Risk to user funds: The hook does not appear to custody or move tokens based on the decoded selectors. Its main influence on users is the swap fee it returns, which could be high for newly launched pools within the sniper window.
Security findings
- [medium] Registration access control unclear: The register selector is nonpayable and its decoded signature shows no access modifier, but a NotLaunchpad error is present in the bytecode, which suggests a launchpad gate. Confirm the check guards every write path.
- [medium] Fee set by registered config: Fee parameters such as the cap and sniper duration are set per pool through the config struct, so a misconfigured or malicious launchpad entry could set a very high fee for a pool.
- [info] No fund custody observed: The hook only stores configuration and returns fee data; the decoded selectors show no token transfer or return-delta logic, so it does not appear to hold user funds.
- [info] Pool allowlist behaviour: An UnknownPool error is present, indicating the hook rejects calls for pools that were not registered.
Contract details
- Verified source
- No
- Bytecode size
- 3,759 bytes
- Upgradeable proxy
- No
Pools using Dynamic fee hook
- ETH / GRUMBULUS (Dynamic fee) — 24h volume $2.23K, TVL $16, 23 swaps today
- ETH / STONKSPAD (Dynamic fee) — 24h volume $66, TVL $149, 3 swaps today
- ETH / BEIGEBOX (Dynamic fee) — 24h volume $0, TVL $96, 0 swaps today
- ETH / GREENBOUTON (Dynamic fee) — 24h volume $0, TVL $7.19, 0 swaps today
- ETH / STONKSPIG (Dynamic fee) — 24h volume $0, TVL $0.44, 0 swaps today