MergeableV4Hook on Arc

Uniswap v4 Hook Contract 0xd6891230e0b39b567f31798226f181678eeaaaec on Arc · Fee sharing · Verified contract

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

What it does

Charges a fixed 1% fee in USDC on each swap of a MergeTech V4 pool and routes it to escrow, while locking liquidity so only the market can seed or fully withdraw it.

How it works step by step

  • Takes a fixed 1% fee in USDC on every swap, using beforeSwap and afterSwap return deltas.
  • Routes collected USDC fees to the migrator escrow via poolManager.take and creditSwapFee.
  • Restricts swaps to registered routers, quoters and the market itself, and requires zero LP fee.
  • Blocks all third-party liquidity additions and donations, allowing only market seeding.
  • Permits liquidity removal only as a coordinator-authorized full-range withdrawal during a merger.
  • Reverts partial fills so the quoted fee cannot be overcharged at a price limit.
Swap behaviour
Swaps are allowed only from permitted routers, quoters, or the market itself, and require zero LP fee. A 1% USDC fee is taken through beforeSwap and afterSwap return deltas, depending on which side is quote-specified, and sent to the migrator escrow. Partial fills revert so the fee cannot be overcharged.
Liquidity behaviour
Liquidity is locked. beforeAddLiquidity only permits the market itself and only before it is seeded, so no external LP can add. beforeRemoveLiquidity only permits the market to remove its full-range position during a coordinator-authorized merger withdrawal (operation 3, exact full-range ticks, exact liquidity). beforeDonate always reverts.
Fee behaviour
Charges a fixed 1% (FEE_BPS = 100) quote-currency fee on every swap where USDC is the specified currency, taken via beforeSwap return delta (exact-input sell: 1% of input; exact-output buy: 1% of input). For the afterSwap side it takes 1% of the gross USDC output or input via afterSwap return delta. The pool LP fee must be zero (key.fee == 0 and getSlot0 lpFee must be 0); any non-zero LP fee reverts. Fees are sent to the migrator escrow via poolManager.take and credited with creditSwapFee. Core protocol fees set by Uniswap are charged independently by PoolManager.
Owner & admin controls
No owner, pause, upgrade or fee-setter exists on the hook: HOOK_FLAGS, FEE_BPS, poolManager, migrator and quote are all immutable and constructor-set; the source states there is no owner/upgrade/fee setter. Market-level state transitions (freeze, restore, retire, activate, abandon, resetOracle, withdrawForMerge) are restricted to the MergeCoordinator, which is outside this hook's scope and governs the merger lifecycle.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeAddLiquidity, beforeRemoveLiquidity, beforeSwap, afterSwap, beforeDonate, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize: restricts pool initialization to the registered market address. beforeAddLiquidity: blocks all liquidity additions except the market's seeding. beforeRemoveLiquidity: allows only the coordinator-authorized full withdrawal of the market position. beforeSwap: gates swaps to allowed routers/quoters (or the market itself), enforces zero LP fee, and returns the 1% quote fee as a beforeSwap delta. afterSwap: takes the fee in USDC via poolManager.take, credits it to escrow, records the swap, and returns the afterSwap delta for non-quote-specified swaps. beforeDonate: always reverts. beforeSwapReturnDelta and afterSwapReturnDelta: enable the hook to return a fee delta that offsets its own debt, so USDC fees are taken from the trader.

Security & trust assessment

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

Who controls it: The hook itself has no privileged key. Its routing policy is immutable and the migrator/quote addresses are fixed at deployment. Power over the market lives in the coordinator and migrator (outside this hook): the coordinator can authorize the full withdrawal of the market position and reset the oracle, and the market contract's trading state depends on the token's merge state machine. Those roles should be reviewed separately.

Risk to user funds: The hook takes its 1% fee in USDC during swaps and holds no user principal itself; fees flow to the migrator escrow via poolManager.take. The hook can revert swaps that break its fee, LP-fee or routing rules, which can block trades, but cannot arbitrarily seize user balances. Pool principal is held by the PoolManager and moved by the market and coordinator during merger withdrawal, which is outside this hook and carries the main custody risk.

Security findings

  • [info] Fixed mandatory 1% trading fee: The hook can take a 1% fee from every swap on the market and route it to the migrator escrow, through both beforeSwap and afterSwap return deltas. The fee is fixed and immutable, so users cannot avoid it while trading through the permitted routers.
  • [info] Third-party liquidity provision disabled: Liquidity is intentionally locked: only the market can add liquidity before seeding, and only a coordinator-authorized full withdrawal can remove it. External LPs cannot provide liquidity, and beforeDonate always reverts.
  • [low] Swap access restricted by router allowlist: Swaps are gated to pinned, policy-registered routers and quoters, and to the market itself. Direct PoolManager or unregistered-router swaps on this pool revert, which limits who can trade and depends on the custody registry being correct.
  • [medium] Trading can be halted by the coordinator state machine: The hook has no pause or owner, but the market can be frozen or halted by the coordinator during preparation, and trading is disabled outside the Active token state (tradingEnabled). Traders cannot swap while the token is not Active, which depends on the coordinator's lifecycle.
  • [low] Immutable deployment with no upgrade path: Swap and liquidity transitions rely on immutable routing policy and a deployment-time address check, with no upgrade path. This reduces admin-key risk but means a bug or misconfigured registry address cannot be patched in place.

Contract details

Verified source
Yes (MergeableV4Hook)
Compiler
solc 0.8.28+commit.7893614a
Bytecode size
6,185 bytes
Upgradeable proxy
No
Detected patterns
moves-currency, return-delta

Pools using MergeableV4Hook