CornersHookStaticFee on Base

Uniswap v4 Hook Contract 0xa52ee9411402a4c44cc87948343c6ce50258a8cc on Base · Dynamic fee · Verified contract

Volume (24h)
$0
Value locked (TVL)
$44.24K
All-time volume
$39.80K
Pools using this hook
1,528
Swaps (24h)
0 (0 traders)
Total swaps
13,960

What it does

A Uniswap v4 hook for Corners pools that applies a fixed corners-side fee and paired-side fee to swaps, takes a 20% protocol cut, and blocks liquidity adds during an early MEV-protection window.

How it works step by step

  • Sets pool LP fee per swap direction from static corners and paired fees configured at initialization
  • Takes a protocol fee of 20 percent of the LP fee via pool manager claims and return deltas
  • Forwards accrued hook and LP fees to a configured locker contract on each swap
  • Runs an optional MEV module for up to 2 minutes after pool creation that can set fees and disable itself
  • Blocks liquidity additions during the MEV protection window
  • Restricts pool initialization to hook-controlled paths
Swap behaviour
On every swap the hook sets the LP fee based on swap direction (paired fee or corners fee), claims accrued fees to the locker, optionally runs the MEV module, and takes a protocol fee through before-swap or after-swap deltas depending on exact-input or exact-output direction.
Liquidity behaviour
Liquidity adds are blocked (MevModuleEnabled revert) while the MEV module is enabled and the pool is younger than 2 minutes. Otherwise liquidity adds pass through. No afterAddLiquidity or removal callbacks are enabled.
Fee behaviour
Each pool has a static corners fee and paired fee set at initialization (capped at 30%). On each swap the LP fee is set to the paired fee when swapping in the direction away from the corners token and to the corners fee otherwise, via updateDynamicLPFee. The protocol fee is 20% of the LP fee and is taken as a hook-minted claim on the pool manager, then forwarded to the LP locker for processing.
Owner & admin controls
Owner (Ownable, set to msg.sender at deployment) can renounce or transfer ownership. The owner has no direct fee setter in this contract; fees are set per pool at initialization via poolData (cornersFee and pairedFee, each capped at MAX_LP_FEE of 30%) and are immutable afterward. The factory can call initializePool, initializePoolOpen path is public, and initializeMevModule. The MEV module can call mevModuleSetFee to set arbitrary LP fees up to MAX_MEV_LP_FEE (100%) while enabled, for up to 2 minutes after pool creation. Protocol fee is derived from the LP fee (20%) and recalculated on each swap.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeAddLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize reverts to force pool creation through the factory-controlled paths. beforeAddLiquidity blocks adds during the MEV protection window. beforeSwap sets the dynamic LP fee, claims accrued hook and locker fees, runs the optional MEV module, and takes protocol fee via a return delta on exact-input paired-in or exact-output paired-out swaps. afterSwap takes protocol fee via an unspecified delta on the non-corners side. beforeSwapReturnDelta and afterSwapReturnDelta allow these fee deltas.

Security & trust assessment

Risk level: medium (verified source, high confidence).

Who controls it: Owner cannot change existing pool fees or pause swaps directly. Owner can renounce or transfer ownership, which has little effect on pool behavior. The factory and the MEV module hold the meaningful privileges: the MEV module can set LP fees up to 100% for pools in the first 2 minutes after creation and can disable itself. Users trading during that window could face very high fees if the MEV module is malicious.

Risk to user funds: The hook holds protocol fee claims within the pool manager and forwards them to the locker; it does not custody user principal. Users can be charged up to the set fee caps, and during the first 2 minutes an MEV module can set fees up to 100% or block liquidity adds. Swap reverts are possible if the locker processing fails.

Security findings

  • [medium] Privileged fee override by MEV module: The MEV module can call mevModuleSetFee with any fee up to MAX_MEV_LP_FEE (100%) for up to MAX_MEV_MODULE_DELAY (2 minutes) after pool creation.
  • [medium] Swap liveness depends on external LP locker: Swaps route LP fees and protocol fees through hook-minted pool manager balances, then burn and take them to the locker. Failure in the locker processing (processProtocolFees or collectRewardsWithoutUnlock) reverts the swap and could block trading.
  • [info] Owner role is limited: The contract is Ownable and renounceOwnership and transferOwnership are available. Ownership does not control pool funds or fees directly.
  • [info] Static fees capped at 30%: Pool fees set at initialization are capped at 30% (MAX_LP_FEE) and are not changeable afterward, outside the MEV module window.

Contract details

Verified source
Yes (CornersHookStaticFee)
Compiler
solc 0.8.28+commit.7893614a
Bytecode size
13,963 bytes
Upgradeable proxy
No
Detected patterns
dynamic-fee, mev-protection, ownable, return-delta

Pools using CornersHookStaticFee