Oracle hook on Base

Uniswap v4 Hook Contract 0xd72cd1d46ba05479583fbb561b558f133ba98088 on Base · Oracle

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

What it does

A Uniswap v4 hook that intercepts swaps with an oracle-priced, fee-taking mechanism, routing value to a treasury and interacting with Morpho Blue and Kyber routing for WETH-related liquidity.

How it works step by step

  • Runs a beforeSwap callback that reads token configuration and an oracle price for WETH/USD
  • Uses beforeSwapReturnDelta to adjust swap currency deltas, taking or returning value during the swap
  • Charges a basis-point fee (feeBps) and directs proceeds to a treasury address
  • Exposes a Morpho Blue flash loan callback for capital-efficient operations
  • References a Kyber router and the Uniswap v4 pool manager for execution paths
  • Tracks consumed quotes in a mapping to prevent quote replay
Swap behaviour
beforeSwap runs on every swap, reads oracle prices and token configuration, and can take a fee through return deltas before the swap completes.
Liquidity behaviour
No liquidity callbacks; the hook exposes liquidity-management style selectors and uses ERC20 transfers and balance checks, but the add/remove liquidity flow is not confirmed.
Fee behaviour
Fee is expressed in basis points via feeBps() and the treasury is set by owner; beforeSwap likely charges or routes a fee, but the exact fee formula cannot be confirmed without source.
Owner & admin controls
Owner-gated configuration via owner() and OnlyOwner revert; owner can set token configs (67f33bcc, f277cf85) and treasury/fee parameters, with no verified source to confirm the exact setters or any upgrade/pause mechanism.

Enabled Uniswap v4 callbacks

beforeSwap, beforeSwapReturnDelta

beforeSwap is used to run pre-swap logic that reads a Chainlink-style WETH/USD oracle feed and token configs; beforeSwapReturnDelta lets the hook take or give back currency deltas during a swap, enabling it to move funds.

Security & trust assessment

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

Who controls it: The owner can reconfigure token settings, treasury address and fee basis points, and can redirect where hook-collected value goes; a malicious or compromised owner could redirect fees or alter pricing parameters.

Risk to user funds: The hook can take and hold tokens through return deltas and ERC20 transfers to a treasury, so a portion of swap or pool value may be custodied or redirected by the hook; exact amounts depend on fee logic that cannot be fully verified from bytecode.

Security findings

  • [medium] Return-delta currency movement: beforeSwapReturnDelta is enabled, so the hook can take currency from swaps and account for it through return deltas, meaning it can custody or redirect a share of swap value.
  • [medium] Oracle dependence: The hook reads an oracle feed (WETH_USD_FEED) and emits StaleOraclePrice, so swap pricing depends on oracle freshness; a stale or manipulated feed could mis-price swaps.
  • [medium] Owner-controlled parameters: Owner-only setters (token config, treasury, fee) are present, with no visible timelock or multisig evidence in the bytecode, so an owner key compromise could change fee destination or rates.
  • [info] Flash loan callback: A Morpho Blue flash loan callback (onMorphoFlashLoan) is exposed and gated by OnlyMorphoBlue, indicating the hook can interact with flash-loaned capital during an operation.

Contract details

Verified source
No
Bytecode size
8,521 bytes
Upgradeable proxy
No
Detected patterns
erc20, liquidity-management, moves-currency, oracle, ownable, return-delta

Pools using Oracle hook