MindHook on Ethereum
Uniswap v4 Hook Contract 0x94db5c3c7c5d5984ecd11c066b2f61d44353e880 on Ethereum · Dynamic fee · Verified contract
- Volume (24h)
- $988
- Value locked (TVL)
- $0
- All-time volume
- $988
- Pools using this hook
- 1
- Swaps (24h)
- 8 (8 traders)
- Total swaps
- 8
What it does
Buys in the first ten minutes after launch pay a fee falling from 50% to the 1% base, while sells and later buys pay the 1% base fee, and all fees go to the factory's liquidity position.
How it works step by step
- Restricts pool initialization and liquidity provision to a single factory address, so only the factory's position earns swap fees
- Requires pools to use the dynamic fee flag at initialization and records the launch timestamp and an initial price anchor per pool
- Overrides the LP fee on every swap: buys (zeroForOne, ETH in) pay a fee that decays linearly from 50% to the base fee over ten minutes after launch, sells and later buys pay the base fee
- Records each pool's sqrt price at the first swap of every block to serve as a same-block reference price for external price-impact checks
- Lets the factory's launcher dev buy pay the base fee by passing a one-byte hookData flag, accepted only when the sender is the factory
- Swap behaviour
- On every swap the hook refreshes the block price anchor if it is stale, then sets an overriding LP fee. Buys (zeroForOne, ETH paid in) pay a fee that starts at 50% on launch and falls linearly to the base fee over 10 minutes; after that buys pay the base fee. Sells pay the base fee at all times. The factory's dev buy with hookData of length 1 pays the base fee. The hook takes no balance delta.
- Liquidity behaviour
- Only the factory can add liquidity (beforeAddLiquidity reverts for any other sender). No liquidity removal callbacks are enabled.
- Fee behaviour
- The base fee is 1% by default, owner-settable up to a hard cap of 2%. Buy fees during the first 10 minutes after a pool's launch decay from 50% down to the base fee. All fees are returned to the pool as LP fees and accrue to the factory's position.
- Owner & admin controls
- The owner (Ownable2Step, so transfers need acceptance) can bind the factory once via setFactory and set the base fee via setBaseFee up to 2%. The owner can renounce ownership or transfer it. No pausing or upgrade mechanism is visible in the decoded interface.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeAddLiquidity, beforeSwap
beforeInitialize: validates the factory as initializer, requires a dynamic fee, and records launch time and price anchor. beforeAddLiquidity: restricts liquidity addition to the factory. beforeSwap: refreshes the per-block price anchor and returns the overriding dynamic LP fee.
Security & trust assessment
Risk level: medium (verified source, high confidence).
Who controls it: The owner can change the base fee within 0 to 2% for all pools and can choose the factory, which controls which pools exist and who may add liquidity. The owner can also renounce, which would freeze these parameters.
Risk to user funds: The hook never holds tokens, returns no deltas, and does not move currency; it only sets the LP fee and gates initialization and liquidity addition. Traders' funds are not held or blocked by the hook, but a paused or misconfigured factory path could prevent pool creation or liquidity provision.
Security findings
- [medium] Owner can bind the factory once: setFactory is one-shot but unguarded before first call; whoever holds ownership chooses which address can initialize pools and add liquidity, so the owner key controls the entire pool admission path.
- [low] Owner can raise base fee up to 2%: setBaseFee accepts values up to MAX_BASE_FEE (20,000 = 2%), changing the fee on all swaps for every pool on this hook; the cap limits but does not remove this lever.
- [low] Dev buy bypass via hookData: Any swap whose sender equals the factory and whose hookData has length 1 pays the base fee instead of the snipe fee; correctness depends on the factory only forwarding such calls for legitimate launch buys.
- [info] Snipe fee is paid to LPs, not refunded: The 50% initial buy fee is an LP fee retained in the pool, so it benefits the factory's position rather than the trader's counterparty.
- [info] Price anchor is set from current slot0: The anchor is taken from the first swap of each block, so it reflects pre-swap state within that block and is not manipulable by a same-block trade that occurs before the first swap.
Contract details
- Verified source
- Yes (MindHook)
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Bytecode size
- 4,099 bytes
- Upgradeable proxy
- No
- Detected patterns
- dynamic-fee, launchpad, ownable
Pools using MindHook
- ETH / EGO (Dynamic fee) — 24h volume $988, TVL $0, 8 swaps today