Likely custom pricing hook on Celo

Uniswap v4 Hook Contract 0x07bdb53b9a9a4f7d6c0ba77c41485a0e9bf50088 on Celo · Custom pricing

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

What it does

A pausable Uniswap v4 hook that uses beforeSwap with a return delta, which lets it adjust swap amounts or take a cut of swaps through the pool manager; it also keeps an owner-managed registry of pools and per-pool fee settings.

This read was written for the hook 0x27fc…0088 on Ethereum and reused here: the two share a code shape, so constants such as fees, owners and addresses can differ.

How it works step by step

  • Runs logic before each swap via beforeSwap and can return a delta that changes the swap amounts settled by the pool manager
  • Keeps an on-chain registry of pools (pool count, allPools list, isPoolRegistered and pools mappings) keyed by pool id
  • Stores a per-pool fee value that the owner can set through setPoolFee(bytes32,uint24)
  • Has a pause flag checked during swaps, so the owner can halt swap processing
  • Exposes an execute(address,uint256,bytes) entry point and an unlockCallback, suggesting it can perform actions through the pool manager's unlock flow
  • Includes an owner-managed access list in storage that gates some operations
Swap behaviour
beforeSwap is callable and returns a delta, and it reverts or skips work when the hook is paused. The exact fee or amount calculation cannot be confirmed without source.
Liquidity behaviour
The add and remove liquidity hook functions are present as view-style selectors in the dispatch table, but the hook permissions do not enable those callbacks, so the pool manager will not call them.
Fee behaviour
The hook stores a per-pool fee through setPoolFee and may apply it through the before-swap return delta. The exact mechanism cannot be confirmed from decoded bytecode.
Owner & admin controls
Owner (storage slot 0) can call setOwner, setPaused, and setPoolFee, and can use execute for arbitrary calls. The owner can also manage an access-list mapping. No upgrade proxy pattern was identified.

Enabled Uniswap v4 callbacks

beforeSwap, beforeSwapReturnDelta

beforeSwap: runs the swap-time logic, including pause checks and registry-based behaviour. beforeSwapReturnDelta: allows the hook to alter the swap amounts and therefore take or redirect a portion of the swap flow.

Security & trust assessment

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

Who controls it: The owner key can pause swaps, change the fee for registered pools, transfer ownership, and make arbitrary calls via execute. A compromised or malicious owner could freeze trading or extract value.

Risk to user funds: The hook sits in the swap path and can alter settled amounts through its return delta, and the owner can pause or redirect operations. Whether it custodies tokens cannot be confirmed without source, but it can influence amounts taken from swappers.

Security findings

  • [medium] Owner can pause swaps: setPaused(bool) writes a flag that beforeSwap reads, so the owner can block swaps for this pool at will.
  • [high] Return delta grants control over swap amounts: beforeSwapReturnDelta is enabled, so the hook can change how much a swap settles. Without source, the exact amounts cannot be verified and a privileged key could take value from swappers.
  • [medium] Owner-controlled pool fee: setPoolFee(bytes32,uint24) lets the owner set a pool fee value that can be applied during swaps; the upper bound is unverified.
  • [high] Generic execute entry point: execute(address,uint256,bytes) lets the owner make arbitrary external calls with the hook's identity, which could move assets the hook holds or interact with other contracts.
  • [info] Source not verified: Analysis relies on decoded bytecode only, so the actual fee formula, the destination of any taken amounts, and the upgrade path cannot be confirmed.

Contract details

Verified source
No
Bytecode size
17,038 bytes
Upgradeable proxy
No
Detected patterns
pausable, return-delta

Pools using Likely custom pricing hook