Oracle hook on Arc

Uniswap v4 Hook Contract 0x2ee20ec34bbcbc4b30ba61782ac002a7e242a0cc on Arc · Oracle

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

What it does

This hook uses swap return deltas and an external price feed to set per-tier pricing and fees, with accrued fees routed to a privileged fee wallet, but the exact trade direction and fee amounts cannot be confirmed from the decoded bytecode.

How it works step by step

  • Hook exposes beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta and afterSwapReturnDelta, so it can alter swap amounts and take currency via return deltas
  • Stores a pool binding (poolBound, poolId, poolKey) and a tier price table (tierPrice, tierFor, tierCount, MAX_TIERS) with epochs and fee-bps parameters
  • Contains a query/fulfill/settle lifecycle: queries are created (nextQueryId, queries), fulfilled with a bytes32 value, settled to an address, and refundable after expiry (QueryExpired/QueryNotExpired errors)
  • Uses an external ETH/USD price feed with a fallback price and a maximum feed age (ethUsdFeed, ethUsd, fallbackEthUsd, maxFeedAge, WrongPrice error)
  • Accumulates per-address claimable balances and a totalFees counter, with claim, withdrawFees and feeWallet handling
  • Restricts agents via an agentRegistry (UnknownAgent error) and uses a two-step feeWallet transfer (proposeFeeWallet, pendingFeeWallet, acceptFeeWallet)
Swap behaviour
beforeSwap and afterSwap are present and both swap return-delta flags are enabled, so the hook can adjust the swap delta and move currency during swaps; the exact pricing rule is not recoverable from the decoded bytecode.
Liquidity behaviour
beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity and afterRemoveLiquidity selectors are present as view functions, which suggests they are likely only view or non-blocking checks, but no state changes were confirmed for them.
Fee behaviour
Exposes feeBps, lpFee, MAX_FEE_BPS, BPS and reserveShareBps, so a hook-level fee is configured and partly routed to a fee wallet and reserve; the precise per-trade fee formula cannot be determined without source.
Owner & admin controls
A feeWallet role controls withdrawFees and fee-wallet rotation via a two-step propose/accept flow; there is also an agentRegistry gate and tier configuration, but the owner-only setter for pricing or fee parameters is not clearly identified from selectors alone.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize validates pool setup; beforeSwap and afterSwap run pricing and accounting logic; beforeSwapReturnDelta and afterSwapReturnDelta let the hook take or return currency deltas on swaps; the liquidity and donate callbacks appear to be view-only checks.

Security & trust assessment

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

Who controls it: The feeWallet and any registry or admin key can withdraw accrued fees, rotate the fee wallet and possibly alter tier or fee parameters, so a single privileged key carries significant influence over user-facing value.

Risk to user funds: The hook takes and returns currency through swap return deltas and holds fee and claimable balances, so it can move pool funds and block claims or withdrawals through its privileged and oracle-dependent paths.

Security findings

  • [high] Return-delta swap hook: beforeSwapReturnDelta and afterSwapReturnDelta are enabled, letting the hook alter swap amounts and move currency from the pool, so a faulty or malicious pricing path could drain value from LPs or traders.
  • [medium] Privileged fee wallet: feeWallet can call withdrawFees and fee-wallet rotation is gated by proposeFeeWallet/acceptFeeWallet; a compromised key could redirect accrued fees.
  • [medium] Oracle dependency: Pricing depends on an ETH/USD feed with a fallback value and maxFeedAge; stale or manipulated feed data could misprice swaps.
  • [info] Agent-gated query flow: Query creation, fulfillment and settlement are gated by agentRegistry and expiry checks, so correctness depends on the registry and the off-chain agents.
  • [info] No source verification: Analysis relies on decoded bytecode only; exact logic, owner setters and upgrade paths cannot be confirmed.

Contract details

Verified source
No
Bytecode size
14,071 bytes
Upgradeable proxy
No
Detected patterns
moves-currency, return-delta

Pools using Oracle hook