Custom pricing hook on Base

Uniswap v4 Hook Contract 0xc4df67d58fb02ecc2499fdacc4d1d71fea4fb8c8 on Base · Custom pricing

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

What it does

This hook fills USDC-pair swaps itself by issuing or redeeming issuer tokens at a NAV-based price, charges a capped but unverified dynamic fee that goes to the protocol, and keeps pool liquidity under owner control.

How it works step by step

  • Lets the owner register pools that pair a token issued by an external issuer contract against USDC, with a pricing curve the hook manages itself.
  • On swaps, the hook can fill trades itself (through return deltas) by issuing or unwinding issuer tokens at a NAV-based price, instead of using normal pool liquidity.
  • Blocks outside liquidity additions; the owner seeds and withdraws curve liquidity.
  • Charges a hook fee (capped by a hard-coded maximum whose value is not visible in bytecode), tracks protocol fees and curve fee claims, and sends them to a fee sink or treasury.
  • Adjusts the pool's dynamic LP fee, including a separate overflow fee setting.
Swap behaviour
Before a swap the hook can take over part or all of the trade with its own pricing (issue or unwind tokens via the issuer) and change the swap amounts. It enforces gas floors and price limits, so a swap can revert if there is too little gas or a limit is crossed. After the swap it does accounting and fee bookkeeping.
Liquidity behaviour
The add-liquidity check appears to reject outside LPs, so only the hook's own curve liquidity is used. Remove-liquidity callbacks are disabled, so any position that exists can always be withdrawn through the PoolManager.
Fee behaviour
A hook fee is capped by a built-in maximum, and the dynamic LP fee is set by the hook. The exact percentages cannot be read from bytecode. Fees build up as protocol fees and curve fee claims, which are paid out to a fee sink or treasury.
Owner & admin controls
The owner, under a two-step ownership transfer, can register pools, seed and withdraw curve liquidity, collect curve fees, and flush protocol fees. The exact fee caps and parameter bounds are not verifiable from bytecode.

Enabled Uniswap v4 callbacks

beforeInitialize, afterInitialize, beforeAddLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta

beforeInitialize: checks the pool is registered and the token pair matches; afterInitialize: sets up pool state; beforeAddLiquidity: blocks outside liquidity; beforeSwap: prices and fills the trade through the hook and sets the fee; afterSwap: updates accounting and fees; beforeSwapReturnDelta: lets the hook change swap amounts to fill trades itself.

Security & trust assessment

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

Who controls it: A single owner registers pools and controls the curve liquidity and fee collection. The issuer and treasury contracts it relies on are external dependencies.

Risk to user funds: The hook can change trader swap amounts through return deltas and takes a capped hook fee whose exact size cannot be read from bytecode. It cannot block LP withdrawals.

Security findings

  • [medium] Hook-priced swaps via return delta: The hook can change swap amounts and fill trades through an external issuer contract at a NAV-based price. The fairness of that pricing depends on the issuer contract and parameters that cannot be verified.
  • [low] Owner-controlled curve liquidity: Only the owner seeds and withdraws the hook's curve liquidity, so the depth available to traders is up to the owner.
  • [info] LP withdrawals unaffected: Remove-liquidity callbacks are disabled, so the hook can never block withdrawals.

Contract details

Verified source
No
Bytecode size
23,880 bytes
Upgradeable proxy
No
Detected patterns
dynamic-fee, erc20, fee-sharing, moves-currency, ownable, return-delta, self-unlock

Pools using Custom pricing hook