Custom pricing hook on Base

Uniswap v4 Hook Contract 0xe0af7e9a80acec91ed29a215fd1063a739a44ac0 on Base · Custom pricing

Volume (24h)
$0
Value locked (TVL)
$1.06
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 and after swaps and liquidity changes on pools that use it, and it appears to route funds through an external vault, but the exact fee and swap effects cannot be confirmed from the decoded bytecode.

How it works step by step

  • Hook permissions are beforeAddLiquidity, beforeRemoveLiquidity, beforeSwap and afterSwap, so it intercepts liquidity changes and swaps on pools that use it.
  • Dispatches a beforeSwap and afterSwap callback pair, with state reads and writes on several per-pool mappings (slots 0 through 6) during swaps.
  • Gates beforeAddLiquidity and beforeRemoveLiquidity, so liquidity changes pass through hook logic before the pool manager processes them.
  • Exposes a set of pool-keyed view and state functions (poolConfigs, getHookPermissions, poolManager) and a helper selector family that calls an ERC-4626-style vault (deposit, withdraw, redeem, previewRedeem) and ERC-20 approve/transferFrom, suggesting it wraps or routes liquidity into a yield vault.
  • Writes per-pool configuration in a state-changing function (selector 0x06d6fccf) that takes address, address, uint24, int24 and fee-like arguments, consistent with pool initialization or configuration.
  • Decoded bytecode alone does not establish the exact economic logic of the swap and liquidity hooks.
Swap behaviour
beforeSwap and afterSwap run on every swap in the pool, reading and writing per-pool state. Whether they change the amount paid or received cannot be determined from the decoded bytecode alone.
Liquidity behaviour
beforeAddLiquidity and beforeRemoveLiquidity run on every liquidity change and may route deposits and withdrawals through an external ERC-4626-style vault. Exact accounting cannot be determined without source.
Fee behaviour
Fee handling cannot be determined from the decoded bytecode. No explicit dynamic-fee or return-delta selectors were identified, so the pool's fee is probably used, but this is unconfirmed.
Owner & admin controls
No owner or admin selector was identified in the decoded functions. Whether a configuration function is access-controlled cannot be confirmed without source.

Enabled Uniswap v4 callbacks

beforeAddLiquidity, beforeRemoveLiquidity, beforeSwap, afterSwap

beforeAddLiquidity: gates or accounts for liquidity additions. beforeRemoveLiquidity: gates or accounts for liquidity removals. beforeSwap: runs pre-swap logic and reads per-pool state. afterSwap: runs post-swap logic and updates per-pool state.

Security & trust assessment

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

Who controls it: Cannot be determined without source. If a privileged key controls the per-pool configuration function, it could alter parameters that affect trade and liquidity behaviour.

Risk to user funds: The hook sits in the swap and liquidity path and appears to interact with ERC-4626-style vault and ERC-20 token transfers, so it may hold or move user or pool funds. The exact exposure cannot be verified from bytecode alone.

Security findings

  • [medium] Unverified source: No verified source is available, so the swap, liquidity and fee logic can only be inferred from selectors and storage access patterns.
  • [medium] External vault interaction: The bytecode contains deposit, withdraw, redeem and approve/transferFrom selectors, so the hook likely holds or moves pool funds through an external vault, which adds dependency and integration risk.
  • [medium] Public state-changing configuration: A nonpayable configuration function (0x06d6fccf) writes per-pool storage. Without a visible access check in the decoded output, it cannot be confirmed that it is restricted to an authorized party.
  • [info] Callbacks on every swap and liquidity change: beforeSwap, afterSwap, beforeAddLiquidity and beforeRemoveLiquidity all execute on every pool action, so any bug or revert in the hook can block trading and liquidity operations.

Contract details

Verified source
No
Bytecode size
16,647 bytes
Upgradeable proxy
No
Detected patterns
erc20

Pools using Custom pricing hook