MEV protection hook on Ethereum

Uniswap v4 Hook Contract 0xd3efcb655ef4d7ac9f8140fe4b7e833c46b728e0 on Ethereum · MEV protection

Volume (24h)
$61
Value locked (TVL)
$900
All-time volume
$192.97K
Pools using this hook
4
Swaps (24h)
1 (1 traders)
Total swaps
758

What it does

This unverified guard hook checks swaps, deposits and donations against admin-configured per-pool limits and may block trades that break them, but it charges no extra fees and LPs can always withdraw freely.

How it works step by step

  • Checks each pool against a registered 'guard' configuration before it can be initialized and used.
  • Before each swap, reads pool state and per-pool guard settings (budgets, limits) and can reject swaps that break the guard rules.
  • After each swap, updates guard tracking state such as usage budgets or timing windows.
  • Checks liquidity additions and donations against the pool's guard rules.
  • A guard admin and pool registrants can configure guard parameters such as time windows, a fee-like value and a flag.
Swap behaviour
Before and after each swap the hook checks and updates per-pool guard limits (likely budget or time-window based), and can revert swaps that exceed them. It cannot take tokens from swaps because return deltas are disabled.
Liquidity behaviour
Adding liquidity is checked by the hook and may be rejected under guard rules. Remove-liquidity callbacks are disabled, so LPs can always withdraw freely.
Fee behaviour
Uses the pool's fee as configured. A uint24 value can be set per pool, but its exact role and any caps cannot be confirmed from bytecode, and the hook cannot take fees itself through return deltas.
Owner & admin controls
A guard admin and pool registrants can set guard parameters per pool or address, including two time values, a uint24 value and a boolean. Some settings appear lockable (GuardLocked error). Exact bounds are unknown from bytecode.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeAddLiquidity, beforeSwap, afterSwap, beforeDonate

beforeInitialize: only allows registered or valid pools to start; beforeAddLiquidity: checks deposits against guard rules; beforeSwap: enforces guard limits before trades; afterSwap: updates guard tracking after trades; beforeDonate: checks donations.

Security & trust assessment

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

Who controls it: A guard admin and pool registrants control guard settings that can restrict swaps and deposits. They cannot touch LP principal or block withdrawals.

Risk to user funds: The hook cannot deduct tokens from swaps or liquidity and never runs on withdrawals, so LP principal cannot be locked or drained. The worst case is that swaps or deposits are blocked.

Security findings

  • [medium] Configurable swap gating: Admin-set guard parameters can cause swaps and liquidity additions to revert, which could effectively pause trading. Exact limits cannot be verified without source.
  • [info] LP withdrawals unrestricted: Remove-liquidity callbacks are disabled, so the hook can never block or charge LP withdrawals.
  • [info] No token deductions: Return deltas are disabled, and the hook does not appear to move tokens.

Contract details

Verified source
No
Bytecode size
6,467 bytes
Upgradeable proxy
No

Pools using MEV protection hook