Oracle hook on Arbitrum

Uniswap v4 Hook Contract 0xcf07f7c7e172e746346327ae4c505507240d2888 on Arbitrum · Oracle

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

What it does

This hook routes exact-input swaps from the trusted router into WOOFi's oracle pool at the oracle-quoted price with no fee, so traders receive the WooPPV2 output and liquidity providers cannot add liquidity through it.

This read was written for the hook 0x97dd…6888 on Arbitrum 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

  • Routes Uniswap v4 exact-input swaps into WOOFi's WooPPV2 oracle-based PMM through a single immutable WooPPV2 contract
  • Gates swaps so only one immutable trusted router address can call the pool through this hook
  • Prefunds WooPPV2 by taking the input token from the PoolManager, then settles the WooPPV2 output back to the PoolManager using return deltas
  • Registers pools at initialization only if WooPPV2 accepts the token pair and the PoolKey uses fee 0 and tick spacing 1
  • Charges a deploy-fixed vault fee of zero pips in the current deployment, with fee-exempt slot logic present but inactive
  • Blocks liquidity additions and rejects exact-output swaps and native currency
Swap behaviour
Only the trusted router may swap; exact-output and native-currency swaps revert. For each exact-input swap the hook takes the input currency from the PoolManager to WooPPV2, calls WooPPV2 swap, measures the output credited to the PoolManager and settles it, so the swapper receives the WooPPV2 quoted output. No vault fee is charged because feePips is constrained to 0 at construction.
Liquidity behaviour
beforeAddLiquidity always reverts with LiquidityNotAllowed, so no liquidity can be added through this hook. Removal is not gated by this hook. Pool reserves sit in the WooPPV2 contract, not in the hook.
Fee behaviour
The hook charges no fee: the constructor reverts unless feePips is 0, and the fee code path only takes a fee when feePips is non-zero. The PoolKey fee must be 0. Fee-exempt slots exist but have no effect when feePips is 0.
Owner & admin controls
No owner, pause, upgrade or parameter-setter functions were found in the ABI or source. The wooPP, trustedRouter, vault and fee settings are immutable. sweepDust is permissionless and only moves the hook's own leftover balance to the immutable vault while the PoolManager is locked.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeAddLiquidity, beforeSwap, beforeSwapReturnDelta

beforeInitialize registers and validates pool keys against WooPPV2; beforeSwap enforces the router allowlist and runs the WooPPV2 routing; beforeSwapReturnDelta lets the hook replace the core AMM swap with its own settlement; beforeAddLiquidity blocks liquidity provision.

Security & trust assessment

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

Who controls it: No privileged key is present in the source; all configuration is immutable and set at deployment, so no admin can change fees, pause swaps or upgrade the hook.

Risk to user funds: The hook holds no funds between swaps by design. During a swap it takes input from the PoolManager to WooPPV2 and settles output back to the PoolManager, and it could strand a balance only if a swap reverts midway, which is prevented by the atomic PoolManager unlock. Users' funds are exposed mainly to WooPPV2 behaviour and the router.

Security findings

  • [medium] Return-delta settlement moves pool funds: beforeSwapReturnDelta lets the hook take tokens from the PoolManager and settle outputs on its own; correctness depends on WooPPV2 honouring the swap amounts and on the balance-diff checks (ZeroOutput, OutputExceedsReported, SettleMismatch).
  • [medium] Trust in external WooPPV2 oracle contract: Pricing and output come entirely from the immutable WooPPV2 contract; oracle or pool manipulation there is passed directly to swappers and to liquidity in WooPPV2 rather than to this hook's own pool.
  • [low] Router-only swap gate: Only the immutable trustedRouter can swap through the hook, so users must go through that router; if that router is compromised or has a bug, all hook swaps are affected.
  • [low] Pair support depends on a try-query at init: Pool registration only checks that tryQuery does not revert for a 1-wei amount; a pair can be accepted yet behave poorly at real sizes.
  • [info] Permissionless dust sweep: sweepDust can be called by anyone but only forwards the hook's own balance to the immutable vault, while the PoolManager is locked.

Contract details

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

Pools using Oracle hook