Likely access control hook on Celo

Uniswap v4 Hook Contract 0x3d088125a90388aa2bb17566b51345d6f4a58040 on Celo · Access control

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

What it does

A Uniswap v4 hook with owner-controlled pausing that keeps an on-chain registry of liquidity positions and reacts after swaps, with the exact purpose not fully determinable without verified source.

This read was written for the hook 0x823d…0040 on Arbitrum 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

  • Enabled only for the afterSwap callback according to the address permission bits
  • Maintains a registry of positions keyed by token id, including registration flags, owners and tick values
  • Exposes owner-gated pause and unpause controls via Pausable
  • Exposes owner management functions via Ownable
  • Exposes position query functions such as getPosition and isPositionRegistered
Swap behaviour
afterSwap is enabled and executes after each swap in pools using this hook; the observable effect beyond bookkeeping is not determined from the decoded bytecode.
Liquidity behaviour
beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity and afterRemoveLiquidity are dispatched and the hook keeps per-position records (registration, owner, tick range) in storage; it appears to track liquidity positions by token id, but the exact accounting logic could not be fully determined from bytecode alone.
Fee behaviour
Uses the pool's static fee. No fee-setting function was identified in the decoded selectors.
Owner & admin controls
Owner (Ownable) can pause and unpause the hook via emergencyPause and unpause, transfer ownership, and renounce ownership. Owner-gated functions are present; no parameter setters were identified beyond these. Position registration is governed by the owner-gated and position-owner-gated flows.

Enabled Uniswap v4 callbacks

afterSwap

afterSwap is the only enabled hook permission from the address. The other liquidity, swap and initialize selectors are present in the dispatcher but are not enabled by the address permission bits, so they should not be invoked by the PoolManager.

Security & trust assessment

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

Who controls it: The owner can pause the hook, which would block the afterSwap callback path, and can transfer or renounce ownership. Ownership changes take effect immediately.

Risk to user funds: afterSwap only observes swap results as enabled by the permission bits; the hook is not shown to take or return deltas, so it is not expected to custody pool funds. A pause could block the afterSwap callback, which may stop swaps in the pool, but user funds are not shown to be moved or held by the hook. Confidence in this assessment is limited without verified source.

Security findings

  • [medium] Owner pause control: The owner can call emergencyPause, which halts hook execution through the Pausable mechanism (EnforcedPause and ExpectedPause errors are present).
  • [medium] Single owner key: Ownable access control is used with transferOwnership and renounceOwnership; a compromised owner key can take control of pause and position functions.
  • [low] Registry bookkeeping unverified: Position deregistration and registration use mapping and array storage; a mismatch between registry arrays and mappings could leave stale entries, but this could not be verified without source.
  • [info] Reentrancy guard present: Bytecode contains a reentrancy guard error, indicating a nonReentrant pattern on some functions.

Contract details

Verified source
No
Bytecode size
5,324 bytes
Upgradeable proxy
No
Detected patterns
ownable, pausable

Pools using Likely access control hook