IndexHook on Optimism
Uniswap v4 Hook Contract 0xb35297543d357ef62df204d8c3bd0e96038cf440 on Optimism · Dynamic fee · Verified contract
- Volume (24h)
- $2.67
- Value locked (TVL)
- $544
- All-time volume
- $892.13K
- Pools using this hook
- 24
- Swaps (24h)
- 8 (3 traders)
- Total swaps
- 51,079
What it does
A Uniswap v4 hook for IndexToken pools that restricts pool initialization to pre-approved pools, sets a 0.30% dynamic fee at start, and manages liquidity provider access and transfer exceptions for index tokens.
How it works step by step
- Allows pool initialization only for pools pre-approved by the owner or an index token (beforeInitialize).
- Sets the initial dynamic LP fee of 0.30% on pool initialization (afterInitialize).
- Grants limited-account exceptions in the index config for index token amounts moved in swaps (afterSwap).
- Enforces a liquidity provider allowlist on liquidity addition unless the sender is the index token itself (afterAddLiquidity).
- Lets a registered index config update the dynamic LP fee on allowed pools within protocol bounds (setDynamicLPFee).
- Swap behaviour
- After each swap on an allowed pool, the hook checks whether either token is an index token and, if so, grants limited-account exceptions in the index config for the swapped amounts; it does not alter swap pricing or returns.
- Liquidity behaviour
- After liquidity is added, the hook checks whether the sender is an allowed liquidity provider (either whitelisted or the index token itself) and grants limited-account exceptions in the index config for the moved index token amounts. Liquidity removal has no hook callback.
- Fee behaviour
- Sets an initial dynamic LP fee of 0.30% on pool initialization and allows the index config of a registered index token to update the dynamic LP fee on allowed pools, bounded by the protocol limits.
- Owner & admin controls
- Owner (set at construction via factory) can call allowPool and setAllowedLiquidityProvider to whitelist pools and liquidity providers. Factory can call registerIndex. Index tokens registered by the factory can call allowPools. Index config contracts can call setDynamicLPFee within the allowed pool. No pause or upgrade mechanism found in the hook itself; the hook is not a proxy.
Enabled Uniswap v4 callbacks
beforeInitialize, afterInitialize, afterAddLiquidity, afterSwap
beforeInitialize restricts pool initialization to pre-allowed pools; afterInitialize sets the initial dynamic fee; afterAddLiquidity enforces the liquidity provider allowlist and grants transfer exceptions to limited accounts; afterSwap grants limited-account exceptions for index token amounts moved during swaps.
Security & trust assessment
Risk level: low (verified source, high confidence).
Who controls it: The owner can whitelist any pool and any liquidity provider, which controls who may add liquidity to index pools. Index configs can set the dynamic LP fee on allowed pools within protocol limits. Factory-controlled registration determines which tokens the hook trusts.
Risk to user funds: The hook does not take or hold tokens and returns zero deltas. It can affect user transfers indirectly by granting or withholding limited-account exceptions in the index config, and by blocking liquidity provision from non-allowlisted accounts.
Security findings
- [info] No pause or emergency control in hook: The hook has no pause, fee-cap or emergency stop; dynamic fee updates are gated only by the index config contract, which is trusted because it is registered by the factory.
- [low] Owner-gated liquidity provision: The owner can whitelist liquidity providers via setAllowedLiquidityProvider, so non-whitelisted users attempting to add liquidity to index pools revert with LiquidityProviderNotAllowed.
- [info] Hardcoded exception sender: afterSwap uses a hardcoded address 0xDead as sender for exceptions, which is a deliberate design choice; the hook does not hold or custody user funds.
Contract details
- Verified source
- Yes (IndexHook)
- Compiler
- solc 0.8.30+commit.73712a01
- Bytecode size
- 7,144 bytes
- Upgradeable proxy
- No
- Detected patterns
- dynamic-fee
Pools using IndexHook
- USDC / ALX (Dynamic fee) — 24h volume $1.33, TVL $147, 4 swaps today
- WETH / ALX (Dynamic fee) — 24h volume $1.33, TVL $134, 4 swaps today
- FNX / ALX (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- WBTC / ALX (Dynamic fee) — 24h volume $0, TVL $142, 0 swaps today
- USDC / AFX (0.12% fee) — 24h volume $0, TVL $12, 0 swaps today
- WETH / AFX (0.08% fee) — 24h volume $0, TVL $11, 0 swaps today
- WETH / FLX (Dynamic fee) — 24h volume $0, TVL $4.28, 0 swaps today
- USDC / FLX (Dynamic fee) — 24h volume $0, TVL $5.94, 0 swaps today
- FMI / WETH (0.30% fee) — 24h volume $0, TVL $17, 0 swaps today
- WBTC / AFX (0.08% fee) — 24h volume $0, TVL $12, 0 swaps today
- WBTC / FLX (Dynamic fee) — 24h volume $0, TVL $5.17, 0 swaps today
- FNX / FLX (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- FMI / USDC (0.30% fee) — 24h volume $0, TVL $18, 0 swaps today
- FNX / AFX (0.07% fee) — 24h volume $0, TVL $0, 0 swaps today
- FMI / WBTC (0.30% fee) — 24h volume $0, TVL $18, 0 swaps today
- Findex Master Index / WETH (0.15% fee) — 24h volume $0, TVL $4.66, 0 swaps today
- USDC / Findex Master Index (0.15% fee) — 24h volume $0, TVL $5.40, 0 swaps today
- FMI / FNX (0.30% fee) — 24h volume $0, TVL $0, 0 swaps today
- Findex Master Index / FNX (0.10% fee) — 24h volume $0, TVL $0, 0 swaps today
- AAA / WETH (Dynamic fee) — 24h volume $0, TVL $0.87, 0 swaps today