Custom pricing hook on Polygon

Uniswap v4 Hook Contract 0x2fc13d1f3a2a45c714713989413c092ad8caaac0 on Polygon · Custom pricing

Volume (24h)
$1.46K
Value locked (TVL)
$12.15K
All-time volume
$284.55K
Pools using this hook
2
Swaps (24h)
35 (7 traders)
Total swaps
2,069

What it does

A Uniswap v4 hook on Polygon that restricts pool initialization, liquidity changes and swaps for a specific token set, including a BST sell check, under role-based admin control.

How it works step by step

  • Validates pool initialization against an allowlist of quote tokens and the official tick spacing.
  • Gates adding and removing liquidity through before and after liquidity callbacks.
  • Applies sell restrictions on swaps through beforeSwap and afterSwap using a sell controller.
  • Tracks a swap nonce in storage on each swap.
  • Is an upgradeable ERC1967 proxy governed by role-based access control.
Swap behaviour
beforeSwap and afterSwap callbacks check sell conditions (canSell/isBSTSell) against a sell controller and track a swap nonce; trades may be restricted or reverted depending on these checks.
Liquidity behaviour
beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity and afterRemoveLiquidity callbacks are implemented, so liquidity operations are gated or accounted by the hook; specific restrictions could not be determined.
Fee behaviour
Exposes OFFICIAL_FEE() and OFFICIAL_TICK_SPACING() constants and a BST sell check (isBSTSell), suggesting fees or sell restrictions are applied for a specific token pair; exact fee computation cannot be determined from the bytecode.
Owner & admin controls
Role-based access control (ADMIN_ROLE, DEFAULT_ADMIN_ROLE, LIQUIDITY_MANAGER_ROLE) via grantRole/revokeRole/renounceRole; setAllowedQuoteToken and setSellController are admin-gated setters; upgradeToAndCall lets an authorized upgrader replace the implementation.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeAddLiquidity, beforeRemoveLiquidity, beforeSwap, afterSwap

beforeInitialize validates pool setup against allowed quote tokens and tick spacing; beforeAddLiquidity and beforeRemoveLiquidity gate liquidity changes; beforeSwap and afterSwap enforce sell logic and track a swap nonce; afterInitialize, afterAddLiquidity, afterRemoveLiquidity and donate hooks are present in the dispatcher.

Security & trust assessment

Risk level: medium (decoded bytecode, low confidence).

Who controls it: Holders of ADMIN_ROLE or DEFAULT_ADMIN_ROLE can grant roles, change the allowed quote tokens and sell controller, and upgrade the implementation, potentially altering swap and liquidity behaviour for all users.

Risk to user funds: The hook can gate swaps and liquidity operations and could revert them, but the bytecode does not show it directly taking custody of pool tokens; upgradeability means this could change.

Security findings

  • [high] Upgradeable proxy: The hook is an ERC1967 upgradeable proxy whose implementation can be replaced by an authorized upgrader, so its logic is not fixed.
  • [medium] Admin-controlled sell and pool restrictions: A privileged role can call setSellController and setAllowedQuoteToken, which change which pools and sells are accepted by beforeSwap and beforeInitialize.
  • [medium] Swaps can be blocked by hook logic: beforeSwap and afterSwap are enabled and can revert or restrict trades on the pool, so a misconfigured or malicious controller could block swaps.
  • [info] Unverified source: Source is unavailable and the analysis relies on selectors and storage reads; the exact economic behaviour is inferred.

Contract details

Verified source
No
Bytecode size
130 bytes
Upgradeable proxy
Yes
Detected patterns
upgradeable

Pools using Custom pricing hook