Access control hook on Base

Uniswap v4 Hook Contract 0x8ec89abdf6e921bd922935722256f18aeb434088 on Base · Access control

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

What it does

This hook runs custom logic before each swap and can adjust swap amounts through a return delta, but without verified source the exact effect on traders and liquidity providers, including which trades pay more or less, cannot be determined.

How it works step by step

  • Implements a beforeSwap hook that can return a custom delta, letting it override or supplement the pool's normal swap pricing for matched trades
  • Reads and writes several storage slots (slots 0 through 4) tracking uint256 and uint32 values, which likely hold reserves, prices or per-pool parameters
  • Exposes a view function at selector 0x39acb8a2 that reads the same storage slots
  • Exposes an unnamed nonpayable function at selector 0xeaa8f2c2 that takes two uint256 arguments and writes slots 0, 1 and 4, probably a configuration or price-update entry point
  • Function names could not be recovered because no verified source is available, so the exact purpose of each slot is inferred from access patterns only
Swap behaviour
beforeSwap is invoked on every swap in the pool and can return a delta that changes the amounts exchanged; the exact pricing logic cannot be determined from decoded bytecode alone.
Liquidity behaviour
No liquidity callbacks.
Fee behaviour
Uses the pool's static fee, unless the return delta mechanism effectively alters amounts; no fee-setting logic was identified in the decoded functions.
Owner & admin controls
No admin controls found in the decoded functions; the unnamed function at 0xeaa8f2c2 writes storage and may be restricted, but access checks could not be confirmed from bytecode.

Enabled Uniswap v4 callbacks

beforeSwap, beforeSwapReturnDelta

beforeSwap is enabled to run custom logic before each swap, and beforeSwapReturnDelta is enabled so the hook can return a delta that adjusts the swap amounts.

Security & trust assessment

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

Who controls it: If the unnamed setter at 0xeaa8f2c2 is restricted to a privileged key, that key could change the values used in beforeSwap and thereby the price or amounts that traders receive.

Risk to user funds: Because the hook can return a delta during swaps, it can influence how much users send and receive; it may hold or move pool funds through that mechanism, although the exact flow cannot be confirmed from bytecode.

Security findings

  • [high] Return delta can alter swap amounts: beforeSwapReturnDelta is enabled, so the hook can take or give currency on every swap by returning a delta. Without source, the size and direction of that delta cannot be bounded.
  • [medium] Unnamed state-writing entry point: Selector 0xeaa8f2c2 is nonpayable and writes storage slots 0, 1 and 4 with two uint256 arguments. If it lacks access control, anyone could change the values that drive swap pricing.
  • [medium] Source not verified: No verified source is available, so the logic, access control and any upgrade paths could not be reviewed directly.

Contract details

Verified source
No
Bytecode size
2,553 bytes
Upgradeable proxy
No
Detected patterns
return-delta

Pools using Access control hook