TickRangeHook on Soneium
Uniswap v4 Hook Contract 0xf023529cb21581d8460539781849b756f4698800 on Soneium · Access control · Verified contract
- Volume (24h)
- $12.66K
- Value locked (TVL)
- $2.41M
- All-time volume
- $26.64M
- Pools using this hook
- 1
- Swaps (24h)
- 504 (176 traders)
- Total swaps
- 1.3M
What it does
A Uniswap v4 hook that restricts liquidity additions to a configurable tick range, managed by role-based access control.
How it works step by step
- Enables only the beforeAddLiquidity callback, so it runs before a liquidity position is added to the pool.
- Checks the position's tick bounds against tickLowerBound and tickUpperBound stored in contract state.
- Reverts liquidity additions that fall outside the allowed tick range.
- Lets accounts holding MANAGER_ROLE update the allowed range through setTickRange.
- Uses OpenZeppelin-style role functions (grantRole, revokeRole, renounceRole, hasRole) for permissions.
- Swap behaviour
- No swap callbacks.
- Liquidity behaviour
- beforeAddLiquidity is the only liquidity callback enabled. It appears to check the requested liquidity position against the stored tick lower and upper bounds (tickLowerBound and tickUpperBound), and may revert positions outside that range. afterRemoveLiquidity and beforeRemoveLiquidity selectors exist in the dispatch table but the hook permissions only enable beforeAddLiquidity.
- Fee behaviour
- Uses the pool's static fee.
- Owner & admin controls
- Role-based access control with DEFAULT_ADMIN_ROLE and MANAGER_ROLE. Admins can grant and revoke roles via grantRole, revokeRole and renounceRole. setTickRange(int24,int24) lets a manager change the tick range bounds stored in storage slot 1, presumably gated by MANAGER_ROLE. No pause or upgrade mechanism was found.
Enabled Uniswap v4 callbacks
beforeAddLiquidity
beforeAddLiquidity is enabled and used to restrict which tick ranges liquidity providers may add to the pool, based on the configured bounds.
Security & trust assessment
Risk level: low (decoded bytecode, low confidence).
Who controls it: A holder of MANAGER_ROLE can change the allowed tick range at any time through setTickRange, which can block new liquidity additions or force positions into a narrow range. A DEFAULT_ADMIN_ROLE holder can grant or revoke MANAGER_ROLE.
Risk to user funds: The hook does not hold, move or take tokens from users or the pool according to the enabled permissions. It can only block new liquidity additions by reverting, so existing positions and swaps are not affected.
Security findings
- [medium] Admin can change tick bounds at will: setTickRange is a nonpayable function callable by a role holder that changes the bounds checked in beforeAddLiquidity, so a manager can unilaterally halt new liquidity additions.
- [low] Role-based control depends on admin key security: Access control is based on roles stored in a mapping at slot 0, so a compromised admin key could grant itself the manager role and alter the bounds.
- [info] No direct custody of user funds: The hook only enables beforeAddLiquidity and does not touch swaps or fees. It holds no tokens and takes no return deltas, based on the enabled permissions.
Contract details
- Verified source
- Yes (TickRangeHook)
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Bytecode size
- 4,939 bytes
- Upgradeable proxy
- No
Pools using TickRangeHook
- USDSC / USDC.e (0.00% fee) — 24h volume $12.66K, TVL $2.41M, 504 swaps today