TickRangeHook on Ethereum

Uniswap v4 Hook Contract 0xde400595199e6dae55a1bcb742b3eb249af00800 on Ethereum · Access control · Verified contract

Volume (24h)
$482
Value locked (TVL)
$100
All-time volume
$38.47K
Pools using this hook
1
Swaps (24h)
46 (41 traders)
Total swaps
2,900

What it does

Restricts new liquidity positions on a Uniswap v4 pool to a configurable tick range set by a manager role.

How it works step by step

  • Hooks beforeAddLiquidity and rejects any position whose tickLower is below tickLowerBound or tickUpper is above tickUpperBound
  • Reverts with InvalidTickRange when a position falls outside the allowed range
  • Stores tickLowerBound and tickUpperBound, set in the constructor and updatable via setTickRange
  • Uses OpenZeppelin AccessControl with DEFAULT_ADMIN_ROLE for role management and MANAGER_ROLE for range changes
  • Does not hold tokens, take fees, or modify deltas
Swap behaviour
No swap callbacks.
Liquidity behaviour
beforeAddLiquidity reverts with InvalidTickRange if the requested tickLower is below tickLowerBound or tickUpper is above tickUpperBound, so liquidity can only be added inside the configured range; liquidity removal is not hooked.
Fee behaviour
Uses the pool's static fee.
Owner & admin controls
DEFAULT_ADMIN_ROLE holder can grant and revoke roles (including MANAGER_ROLE); MANAGER_ROLE holder can call setTickRange to change the allowed tick range at any time; no pause or upgrade mechanism found.

Enabled Uniswap v4 callbacks

beforeAddLiquidity

beforeAddLiquidity is the only enabled callback; it enforces the tick range bounds on new liquidity positions.

Security & trust assessment

Risk level: low (verified source, high confidence).

Who controls it: A MANAGER_ROLE holder can change tickLowerBound and tickUpperBound at any time, which can retroactively make new liquidity additions revert or allow positions outside the originally intended range; the DEFAULT_ADMIN_ROLE holder can grant themselves or others the manager role.

Risk to user funds: The hook never holds or moves tokens and has no return-delta permissions; it can only revert liquidity additions. Existing positions are unaffected, but a manager can block new deposits by narrowing the range.

Security findings

  • [medium] Manager can change allowed range instantly: setTickRange is gated by onlyRole(MANAGER_ROLE) and takes effect immediately for all future liquidity additions, with no timelock or bounds check beyond lower < upper.
  • [info] Role-based centralization: The admin can grant MANAGER_ROLE to any address, so privileged control rests on the admin key.
  • [info] Swaps not restricted by hook: The hook does not implement swap callbacks, so swaps are not restricted to the tick range despite the constructor docs mentioning token swaps.

Contract details

Verified source
Yes (TickRangeHook)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
5,500 bytes
Upgradeable proxy
No
Detected patterns
ownable

Pools using TickRangeHook