Utility hook on Ethereum

Uniswap v4 Hook Contract 0x85b648a64aed6307d5d5ce26e6ae086c17bde888 on Ethereum · Utility

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

What it does

A wrapper hook that lets traders swap between an underlying token and its fewToken wrapper at a fixed 1:1 rate inside a zero-fee Uniswap v4 pool.

This read was written for the hook 0x0fe9…2888 on Ethereum 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

  • Validates that a pool only pairs the underlying token with fewToken and has a zero fee at initialization
  • Wraps underlying tokens into fewToken on swaps going in one direction via fewToken.wrap
  • Unwraps fewToken back into underlying tokens on swaps in the other direction via fewToken.unwrap
  • Settles the swap amounts itself using beforeSwapReturnDelta, bypassing the normal AMM curve
  • Allows liquidity to be added to the pool without restriction
Swap behaviour
Each swap is a 1:1 wrap of the underlying token into fewToken or an unwrap back, executed inside beforeSwap with the hook taking the input and settling the output.
Liquidity behaviour
beforeAddLiquidity simply allows liquidity additions with no extra logic. No remove-liquidity or after-liquidity callbacks are enabled.
Fee behaviour
Pool must be initialized with fee 0 (beforeInitialize reverts otherwise). The hook returns a zero LP fee override of 0 and charges no fee; the swap is a 1:1 wrap or unwrap.
Owner & admin controls
No admin controls found. No owner, pause, upgrade or parameter-setting functions in the verified source; fewToken and underlying addresses are set once via immutable constructor arguments.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeAddLiquidity, beforeSwap, beforeSwapReturnDelta

beforeInitialize validates the pool pair and zero fee; beforeAddLiquidity allows liquidity provision; beforeSwap performs the 1:1 wrap or unwrap of the underlying token into fewToken via beforeSwapReturnDelta, so the hook takes and settles the swap amounts itself.

Security & trust assessment

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

Who controls it: No privileged role exists in the hook, so no single key can alter pool behaviour through the hook itself. Risk is instead concentrated in the external fewToken contract, whose wrap and unwrap logic the hook trusts blindly.

Risk to user funds: The hook temporarily holds underlying and fewToken during each swap and grants fewToken an unlimited allowance on the underlying token, so a flaw or malicious behaviour in fewToken could affect funds passing through the hook. The hook itself cannot freeze or redirect user funds because it has no admin functions.

Security findings

  • [info] Hook overrides swap accounting: beforeSwap uses beforeSwapReturnDelta to take input and settle output itself, so the hook fully determines the swap amounts for the pool.
  • [medium] Trust in external fewToken contract: Every swap is executed against fewToken.wrap/unwrap at a strict 1:1 ratio, and the hook only checks that the returned amount equals the input. If fewToken deviates from 1:1 the pool is priced wrongly, and if the external token is malicious it controls the outcome.
  • [medium] Infinite approval to fewToken: The constructor grants fewToken an unlimited allowance over the underlying token held by the hook. Any bug in fewToken could drain balances the hook holds.
  • [low] Fixed 1:1 pricing with no fee income: Liquidity added to the pool can only be the wrapper/underlying pair with zero fee, and swaps are one-for-one wraps, so the pool acts as a fixed-rate conversion venue rather than an AMM.
  • [info] Immutable with no admin: The hook is not upgradeable and has no owner, so user funds are not exposed to an admin key.

Contract details

Verified source
No
Bytecode size
6,552 bytes
Upgradeable proxy
No
Detected patterns
return-delta

Pools using Utility hook