MEV protection hook on Base

Uniswap v4 Hook Contract 0x7053defd9d9f5cefeea9049247f3ff749a1128cc on Base · MEV protection

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

What it does

This hook runs a gated single pool with order-book and JIT liquidity integration: it charges an unverified protocol fee on swaps through return deltas, and governance can restrict or disable trading, while LPs can always withdraw freely.

How it works step by step

  • Controls a single pool, set up by a fixed initializer address, with a fixed pool fee and tick spacing.
  • Checks swaps before they run and can reject them when swapping is disabled; it also checks permissions through an external permissions adapter or allowlist.
  • Works with an order book and a just-in-time liquidity router, tracking per-block starting price and a price band, which suggests protection against same-block price manipulation.
  • Can take a protocol fee from swaps using swap return deltas and holds it for later collection to a fixed fee recipient.
  • Has a governance role with a two-step handover that can set or rotate the order book, configure the JIT router and band, and toggle wrapper allowlists.
Swap behaviour
Before each swap the hook checks whether swapping is enabled and whether the caller is allowed, and it may adjust swap amounts through return deltas. After the swap it records price and tick data and may route liquidity through its JIT router. The exact fee and limits cannot be confirmed from bytecode.
Liquidity behaviour
Adding liquidity is checked by the hook and may be restricted to approved LP owners or routers. Remove-liquidity callbacks are disabled, so the hook never runs on withdrawals and cannot block LPs from withdrawing.
Fee behaviour
The hook charges a protocol fee set by a hard-coded value (PROTOCOL_FEE_BPS) on top of a fixed pool fee. The fee is collected through swap deltas and sent to a fixed fee recipient through collectFees. The exact percentages are not readable from the bytecode.
Owner & admin controls
Governance, with a two-step transfer, can change the order book (with a pending/delay step), set the JIT router, tick and band width, toggle allowed wrappers, and apparently trigger shutdown or disable swaps. Caps on these settings cannot be verified from bytecode.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeAddLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize: restricts pool creation to the expected pool and initializer; beforeAddLiquidity: gates who can add liquidity; beforeSwap: checks swap gating and can modify amounts; afterSwap: updates tick and band tracking and can settle fees or JIT liquidity; beforeSwapReturnDelta/afterSwapReturnDelta: lets the hook adjust swap input or output amounts.

Security & trust assessment

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

Who controls it: A governance address controls the order book, JIT router, band settings and wrapper allowlist, and can effectively pause swaps. It cannot block LP withdrawals.

Risk to user funds: Swap amounts can be adjusted by return deltas for protocol fees and JIT settlement; the exact fee range is unverified. LP principal cannot be locked by the hook because withdrawal callbacks are disabled.

Security findings

  • [medium] Swaps can be disabled or gated: The hook checks swappingEnabled and an isAllowed permission lookup, so governance or linked contracts can stop or restrict trading.
  • [medium] Active swap return deltas in unverified code: The hook can change swap amounts and take currency from the pool manager. The fee size is a constant that cannot be confirmed without source.
  • [info] LP withdrawals unrestricted: Remove-liquidity callbacks are disabled in the address bits, so LPs can always withdraw.

Contract details

Verified source
No
Bytecode size
16,212 bytes
Upgradeable proxy
No
Detected patterns
access-control, fee-sharing, mev-protection, moves-currency, return-delta, self-unlock

Pools using MEV protection hook