Likely custom pricing hook on Ethereum

Uniswap v4 Hook Contract 0xefe3aa7df4ebfc8c162ec957fdd617455d9d0088 on Ethereum · Custom pricing

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

What it does

A pausable hook that appears to route swaps in registered pools through Morpho lending markets, taking over swap execution via return deltas, under control of an owner who can set per-pool fees and execute arbitrary calls.

How it works step by step

  • Registers pools and tracks them in an array (allPools, getPoolCount) with isPoolRegistered and a per-pool mapping (pools(bytes32)).
  • Exposes Morpho-related items (morpho(), computeMarketId over a market tuple, isMarketInitialized, VIRTUAL_SHARES, VIRTUAL_ASSETS), which suggests pool liquidity or pricing is tied to Morpho markets.
  • Implements beforeSwap with return-delta permission, so the hook can fill or alter swaps itself instead of using the pool's normal AMM path.
  • Has an unlockCallback, so the hook interacts with the PoolManager (and likely Morpho) in unlocked contexts to move tokens.
  • Has an owner-set per-pool fee (setPoolFee) and an ORACLE_PRICE_SCALE constant, suggesting oracle-based pricing, though the oracle source is not identifiable from the input.
Swap behaviour
beforeSwap is the only enabled swap callback. It reads the pause flag, an address allowlist mapping (slot 4), a per-pool mapping and the owner slot, and it can return a delta that replaces or offsets the swap. When paused, swaps through the hook are likely blocked, though the exact revert path cannot be confirmed from the decoded bytecode.
Liquidity behaviour
No liquidity callbacks are enabled in the permissions. The add and remove liquidity functions are present only as interface stubs and are not active hook permissions.
Fee behaviour
The owner can set a per-pool fee through setPoolFee(bytes32,uint24) for registered pools. A separate uint24 default fee is stored and is settable by an unnamed nonpayable function (0xbefa61d5). How fees are collected or distributed cannot be determined from the bytecode.
Owner & admin controls
The owner (slot 0) can transfer ownership with setOwner, pause or unpause with setPaused, set per-pool fees with setPoolFee, and change a default fee through an unnamed function. An unnamed nonpayable function (0xbfd3da96) writes the address in slot 5. The owner also has execute(address,uint256,bytes), which looks like an arbitrary call function. A further unnamed function (0x8ec6cd0d, takes an address) may also be admin-gated, but this is unconfirmed.

Enabled Uniswap v4 callbacks

beforeSwap, beforeSwapReturnDelta

beforeSwap is used to intercept swaps and apply the hook's own pricing or routing logic. beforeSwapReturnDelta lets the hook return an amount that changes the swap's token accounting, so it can take or supply tokens during the swap.

Security & trust assessment

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

Who controls it: A single owner key can pause swaps, change fees, transfer ownership, change stored addresses and possibly run arbitrary calls through execute. This gives broad control over the hook's behaviour and any assets it holds.

Risk to user funds: The hook probably holds or moves funds, given the return-delta swaps, unlockCallback and Morpho references. Funds held by the hook could be exposed to the owner through execute, and a pause could block swaps. Exact custody and withdrawal paths are not determinable without source.

Security findings

  • [high] Arbitrary call function: execute(address,uint256,bytes) is exposed and nonpayable, and the owner slot is read by related functions. If it is owner-only, the owner can make the hook call any contract with any data, including moving tokens the hook holds or has approved.
  • [medium] Swap accounting via return delta: beforeSwapReturnDelta is enabled, so the hook can take or credit tokens during swaps. Incorrect or malicious logic here would directly affect the amounts traders receive.
  • [medium] Owner-controlled fees: setPoolFee takes a uint24 per pool with no visible cap in the decoded output. The owner might set very high fees, but this cannot be confirmed without the source.
  • [low] Pause can block swaps: setPaused writes a bool that beforeSwap reads, so the owner can likely halt swaps on pools using this hook.
  • [low] External dependencies on Morpho and an oracle: The hook references morpho(), weth() and an oracle price scale. Pricing and funds depend on these external systems, and their trust assumptions cannot be verified from the bytecode.

Contract details

Verified source
No
Bytecode size
21,990 bytes
Upgradeable proxy
No
Detected patterns
pausable, return-delta

Pools using Likely custom pricing hook