DepegFeeHook on Arc

Uniswap v4 Hook Contract 0xa6ca4c17a0a25e33b25242282c1efea1322960cc on Arc · Launchpad · Verified contract

Volume (24h)
$0
Value locked (TVL)
$8.74K
All-time volume
$31.78K
Pools using this hook
3
Swaps (24h)
0 (0 traders)
Total swaps
289

What it does

Adds a 0.75% hook fee on top of the pool's 0.25% LP fee for Depeg token launches, routes the hook fee to the token's creator and the platform treasury, and compounds accumulated LP fees into permanently locked liquidity.

How it works step by step

  • Charges a 0.75% hook fee on top of the 0.25% native LP fee, for a total 1% trader fee on Depeg pools
  • Accrues the hook fee as ERC-6909 claims and realises it to USDC via collectFees
  • Forwards realised fees to DepegFeeVault, which credits creators per their payee split and the treasury
  • Sweeps LP position fees with compound(), pays the caller 1%, and deploys a permanently locked full-range position
  • Caps each compound deploy at 25 bps of pool liquidity and allows one deploy per block
  • Restricts pool creation to the adapter and enforces native currency0, tick spacing 200 and fee 2500
Swap behaviour
beforeSwap and afterSwap charge a 0.75% hook fee on the input of exact-in buys and the output of exact-out sells, minting it as ERC-6909 claims and accruing it in USDC for the creator and treasury. The fee is taken on the unpriced leg, and partial fills revert.
Liquidity behaviour
addLaunchLiquidity (adapter-only) places a launch position. compound() collects LP fees from two positions, pairs them and deploys a permanently locked full-range position, capped at 25 bps of pool liquidity per deploy and at most once per block. There is no liquidity removal path, so liquidity cannot be withdrawn by the hook.
Fee behaviour
A 0.75% hook fee (FEE 7500 of 1e6) is charged on top of the pool's native 0.25% LP fee, giving 1% total to traders. The hook fee is taken in USDC via ERC-6909 claims and accrued to the payout leg; collectFees forwards it to the DepegFeeVault, which splits it between creator payees (creatorBps default 8667, i.e. about 0.65% of the gross) and the treasury. Fees on LP positions are swept by compound(), which pays the caller 1% of collected USDC.
Owner & admin controls
Treasury (set once at deploy, two-step transfer) can add factories and fee sources and change creatorBps within a floor of 6667 to 10000 on the vault. The hook has no owner or pause; setAdapter is one-time, callable only by the authority, and there is no upgrade path. Creator payee splits are fixed at registration and cannot be edited.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize: restricts pool creation to the adapter and enforces native currency0, tick spacing 200 and fee 2500. beforeSwap: charges the hook fee on the input of exact-in buys or the specified output of exact-out sells and mints the claim. afterSwap: charges the fee on the unpriced leg, reverts on partial fills, and mints the claim. beforeSwapReturnDelta and afterSwapReturnDelta: let the hook take a delta from swaps, which is how the fee is collected.

Security & trust assessment

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

Who controls it: The treasury cannot touch pool liquidity or user funds in the hook directly. It can route future fee flows by adding fee sources and factories, and set creatorBps between 66.67% and 100% of the hook fee, so it can shift value from creators to the platform. A compromised treasury key could redirect future fee accruals to a new treasury only through the two-step transfer; claims already credited are not affected.

Risk to user funds: The hook holds ERC-6909 claims on USDC and native currency between swaps and compounds, and it moves funds to the vault (collectFees) and into locked liquidity (compound). Swap-time fee logic reverts on partial fills rather than silently mis-charging. Users' LP principal is not withdrawable by the hook, so exposure is mainly the fee and reward flows and the treasury's ability to change how they are split.

Security findings

  • [info] No pause or mutable fee in the hook: The hook has no pause and no owner-controlled fee parameters; FEE, POOL_FEE, LIQ_CAP_BPS and CALLER_BPS are constants. Swap behaviour is fixed by immutable code.
  • [low] Sandwich exposure on compound: compound() is permissionless and pays the caller 1% of collected USDC; the per-block deploy limit and LIQ_CAP_BPS (25 bps) limit how much a sandwich can extract, but MEV around compound remains possible.
  • [medium] Treasury can reroute creator share: creatorBps can be raised up to 10000 by the treasury, moving the full hook fee to the platform, and the treasury can add new fee sources and factories that can call creditFees.
  • [low] Trusted fee sources and factories: creditFees and collectFees rely on a trusted fee source set; a malicious factory or fee source added by the treasury could credit arbitrary balances to tokens it controls.
  • [info] Creator payouts are immutable after launch: Creator identity and payee splits are set once at launch via setCreator or setCreatorSplit and cannot be changed, so a compromised creator key cannot redirect future earnings.

Contract details

Verified source
Yes (DepegFeeHook)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
16,326 bytes
Upgradeable proxy
No
Detected patterns
erc6909-claims, launchpad, liquidity-management, moves-currency, return-delta, self-unlock

Pools using DepegFeeHook