Likely custom pricing hook on Polygon

Uniswap v4 Hook Contract 0xbb95c2cddb162f43aa19b6b68ed6ea6dd6d0c8cc on Polygon · Custom pricing

Volume (24h)
$0
Value locked (TVL)
$0.22
All-time volume
$0.78
Pools using this hook
1
Swaps (24h)
0 (0 traders)
Total swaps
5

What it does

A Uniswap v4 hook that takes a fee on swaps and routes part of it to the owner, a dividend pool and a ticket-based prize draw for traders and LPs.

How it works step by step

  • Charges a fee on swaps (FEE_BPS) and splits it between owner, dividend and prize allocations
  • Tracks ticket balances per user (tickets mapping) and a TICKET_THRESHOLD for eligibility
  • Uses entropy and WIN_PAYOUT_BPS to pay out prizes from the prize pool
  • Accrues owner fees that the owner can withdraw via withdrawOwnerFees
  • Takes and settles currency with the pool manager through unlockCallback and sweepResidual
Swap behaviour
beforeSwap and afterSwap both run; return delta permissions are enabled, so the hook takes a fee share from swap amounts and tracks tickets, though exact logic is not verifiable without source.
Liquidity behaviour
beforeAddLiquidity is enabled and afterAddLiquidity/beforeRemoveLiquidity/afterRemoveLiquidity selectors are present in the dispatch table. Liquidity hooks appear to take part in a ticket/prize mechanism, but the exact logic is not determinable from the decoded input.
Fee behaviour
Decoded selectors include FEE_BPS, OWNER_BPS, DIVIDEND_BPS, PRIZE_BPS, BPS and poolFee, suggesting a fee is taken on swaps and split between owner, dividend, and prize pools. Exact fee direction and rates could not be confirmed without source.
Owner & admin controls
Owner (Ownable, slot 0) can renounce or transfer ownership and call withdrawOwnerFees() to withdraw accrued owner fees (ownerAccrued). No pause or upgrade mechanism was identified in the decoded selectors. Owner-only parameter changes were not confirmed without source.

Enabled Uniswap v4 callbacks

beforeAddLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeAddLiquidity: gates or records liquidity additions. beforeSwap: pre-swap logic, likely fee or ticket handling. afterSwap: post-swap accounting, likely fee accrual and prize tickets. beforeSwapReturnDelta and afterSwapReturnDelta: the hook can take or give currency deltas on swaps, meaning it can skim value from swaps.

Security & trust assessment

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

Who controls it: The owner can withdraw accrued owner fees and transfer or renounce ownership. Without source it cannot be confirmed whether the owner can alter fee rates or the prize split.

Risk to user funds: The hook holds and moves pool-related balances via take, settle and sync, and it takes a fee from swaps through return deltas, so user swap proceeds are directly affected. Whether funds can be blocked is not determinable from the input.

Security findings

  • [medium] Swap return deltas skim user value: The hook enables beforeSwapReturnDelta and afterSwapReturnDelta, so it can take a share of swap amounts directly from traders.
  • [medium] Owner-controlled fee withdrawal: The hook has ownable functions and withdrawOwnerFees, so the owner key can extract accrued fees; the fee split constants are not verifiable without source.
  • [low] Hook moves currency balances: Bytecode contains a sweepResidual function and a take/settle pattern through the pool manager, so the hook moves currency balances.
  • [medium] Entropy-based prize payouts: The hook implements a ticket and prize mechanism with entropy-based payouts, which depends on on-chain randomness that may be weak or manipulable.

Contract details

Verified source
No
Bytecode size
14,910 bytes
Upgradeable proxy
No
Detected patterns
moves-currency, ownable, return-delta, self-unlock

Pools using Likely custom pricing hook