Access control hook on Ethereum

Uniswap v4 Hook Contract 0x628133845e244bbf43c6fad3ebc596ebc5d728cc on Ethereum · Access control

Volume (24h)
$283.07K
Value locked (TVL)
$82.70K
All-time volume
$283.07K
Pools using this hook
1
Swaps (24h)
1,029 (289 traders)
Total swaps
1,029

What it does

A Uniswap v4 hook that applies a time-decaying tax on swaps, routing part of the tax to a tax vault and platform, with a versioned, admin-controlled configuration and gated liquidity additions.

How it works step by step

  • Applies a dynamic tax to swaps via beforeSwap and afterSwap return deltas
  • Routes collected tax to a tax vault and a platform share, flushed by flush and flushPlatform
  • Initializes and binds the hook to a specific pool through beforeInitialize and bound/initializer checks
  • Gates or inspects liquidity additions through beforeAddLiquidity
  • Keeps a versioned configuration history with rollback and versionAt/versionCount
Swap behaviour
beforeSwap and afterSwap are implemented and use return deltas, so the hook takes a dynamic tax from swap amounts and records accounting after each swap.
Liquidity behaviour
beforeAddLiquidity is implemented and can gate or condition liquidity additions; liquidity-related state (mind, bound, experiment, module) is referenced, but the precise gating logic is not determinable from the decoded bytecode.
Fee behaviour
Name-level selectors (TAX/tax vault, PLATFORM_PPM, OPENING_TOTAL_PPM, MAX_TOTAL_PPM, DECAY_SECONDS, PROTECTION_SECONDS, LP_FEE_PIPS, taxVault, platform flush) indicate a time-decaying tax that is split between a tax vault and a platform share, taken through return deltas on swaps; exact rates cannot be determined from the input.
Owner & admin controls
Bytecode shows an initializer/bind pattern (initializer(), bound(), AlreadyBound and UnauthorizedInitializer errors) and a developer() getter, plus rollback(uint256), flush(), flushPlatform(), and a pause-style check (paused() and IsPaused error are referenced externally). Storage slot 7 holds an address that is written by 0x0da9da20 (rollback), 0x920f5292 and a bool at offset 20 written by 0x88d4c2d8, and slot 8 is a dynamic address array written by 0x920f5292 with a versionCount/versionAt history; this indicates an owner or agent-gated versioning/upgrade mechanism. Exact authority checks cannot be fully confirmed without source.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeAddLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize: validates and records pool initialization (initializer/bound checks). beforeAddLiquidity: gates or inspects liquidity additions. beforeSwap: computes dynamic tax and may return a delta to take a fee. afterSwap: updates swap accounting and possibly flushes or records tax amounts. beforeSwapReturnDelta: lets the hook return a specific amount to take from the swap. afterSwapReturnDelta: lets the hook take an extra amount after the swap.

Security & trust assessment

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

Who controls it: A privileged agent or owner can roll back or rebind versions (rollback, versionAt, versionCount), flush tax balances to the platform or tax vault (flush, flushPlatform), and likely pause swaps via the pausable interface, all of which affect user swap outcomes and fee destination.

Risk to user funds: The hook can take a tax on swaps through return deltas and direct flushes to tax and platform vaults; it can also pause or roll back logic, so user funds in pools using this hook depend on the privileged key and the tax configuration.

Security findings

  • [high] Hook takes tokens via return deltas: The hook returns deltas in beforeSwap and afterSwap, so it can take tokens from swaps; the taken amount is set by its tax logic, which is not visible without source.
  • [medium] Versioned logic controlled by privileged key: Selectors for rollback and version history and an agent-gated setter indicate the hook logic can be changed or reverted by a privileged key, which may change fees or behaviour for existing pools.
  • [medium] Pausable swaps and liquidity: The pause-related selectors (paused, IsPaused) suggest swaps and possibly liquidity additions can be halted by an admin, blocking users.
  • [info] Fee parameters not confirmed: Tax and platform split parameters are set by constants and storage but exact values are not decodable here; the effective fee cannot be confirmed.

Contract details

Verified source
No
Bytecode size
8,695 bytes
Upgradeable proxy
No
Detected patterns
liquidity-management, pausable, return-delta, tax

Pools using Access control hook