ArtCoinsHookStaticFeeV2 on Ethereum

Uniswap v4 Hook Contract 0xa5ea9904f2cd572c638a1ef81463bdabea9d28cc on Ethereum · Dynamic fee · Verified contract

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

What it does

A Uniswap v4 hook for ArtCoins pools that applies a fixed fee per swap direction, enforces a short anti-sniper window with higher fees and blocked liquidity adds, and routes sniper-extra fees to an optional recipient.

How it works step by step

  • Sets a dynamic LP fee per swap direction from two static values (artCoinFee for buys, pairedFee for sells), each capped at 10%.
  • Blocks non-factory initialization paths and liquidity additions while the MEV module is active (first 15 minutes after pool creation).
  • Lets the bound MEV module raise the LP fee up to 99% during the launch window.
  • Skims an extra sniper fee from the input token on exact-input and exact-output swaps and accrues it for flush to a per-pool recipient on the next swap.
  • Claims accrued locker rewards and hook protocol fees to the locker and factory during swaps.
  • Optionally notifies an allowlisted pool extension in afterSwap, guarded by try/catch so failures do not revert the swap.
Swap behaviour
Each swap gets a dynamic LP fee based on direction (buy ArtCoins uses artCoinFee, sell uses pairedFee). During the first 15 minutes the MEV module can raise the fee and skim an extra input fee. Locker and protocol claims are flushed on the swap path, and a pool extension can be notified in afterSwap.
Liquidity behaviour
beforeAddLiquidity reverts with MevModuleEnabled while the MEV module is operational (first 15 minutes after pool creation). Removing liquidity is not hooked and no return delta is applied.
Fee behaviour
The LP fee is set per swap direction from two static values: artCoinFee when buying ArtCoins and pairedFee when selling, each capped at MAX_LP_FEE (10%). The MEV module can temporarily raise the fee up to 99% during the launch window. A sniper-extra fee (up to 99% ppm) is skimmed from the input currency and accrued for flush to a per-pool recipient, without changing the LP fee. protocolFee is zero because protocolFeeNumerator is zero.
Owner & admin controls
Token admin of the art coin (ArtCoinsToken.admin) can set per-pool extension (setPoolExtension, allowlist-gated), set sniper-fee recipient (setSniperFeeRecipient) and lock either slot permanently (lockPoolExtension, lockSniperFeeRecipient). Factory can call factorySetSniperFeeRecipient. Factory owner can set protocolFeeNumerator (capped at 50%, currently 0). The bound MEV module can raise the LP fee and signal sniper-extra fees. Owner-level pausing or upgrades not found; the hook is non-proxy and immutable constructor-wise.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeAddLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize blocks any initialization not routed through the hook's own initializePool functions. beforeAddLiquidity blocks liquidity adds during the MEV window. beforeSwap sets the dynamic fee, flushes accrued fees, claims locker and protocol fees, runs the MEV module and skims sniper-extra for exact-input swaps. afterSwap skims sniper-extra for exact-output swaps, runs the optional pool extension and returns an unspecified delta for protocol fee handling. beforeSwapReturnDelta and afterSwapReturnDelta allow the hook to take input or output amounts as fees.

Security & trust assessment

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

Who controls it: The token admin can swap the pool extension (which receives afterSwap calls with the swap delta), redirect sniper-extra fees to any address until the recipient is locked, and lock these settings permanently. Factory-level actors can set the sniper recipient at deployment. Because pools are not upgradeable proxies, the logic itself cannot be changed after deployment.

Risk to user funds: The hook holds claim balances in the pool manager (protocol fees and sniper-extra) but does not custody user principal. It can take up to 10% of a swap in static fees and up to 99% of input during the first 15 minutes via the MEV path, and it can block liquidity adds during that window. A replaced pool extension or a changed sniper recipient can redirect the sniper-extra skim until those slots are locked.

Security findings

  • [info] Return-delta fee capture: Hook uses beforeSwapReturnDelta and afterSwapReturnDelta to take a fee from user input or output by minting claim tokens to itself. These balances are either flushed to the factory or the sniper recipient later.
  • [medium] Replaceable pool extension until locked: setPoolExtension lets the token admin install any allowlisted extension, which is then invoked in afterSwap via try/catch. A malicious extension could not steal pool funds directly, but could consume gas or misreport data until the slot is locked.
  • [medium] Mutable sniper fee recipient: Sniper-extra fees are routed to sniperFeeRecipient, which the token admin can change until lockSniperFeeRecipient is called. Before locking, that address can direct up to 99% of launch-window swap input to an arbitrary destination.
  • [low] Accrued fees depend on a later swap to flush: Pool manager claim tokens minted to the hook are flushed to the factory or recipient in the next swap, so the hook depends on the factory and recipient addresses for correct payouts. Accrued balances that are never flushed (no subsequent swap) remain in the hook.
  • [info] Bounded fee parameters: Fee caps are enforced (MAX_LP_FEE 10% for static fees, 99% for MEV), and protocolFeeNumerator is capped at 50% and currently zero, limiting how much a privileged party can raise trader costs through the protocol path.

Contract details

Verified source
Yes (ArtCoinsHookStaticFeeV2)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
21,202 bytes
Upgradeable proxy
No
Detected patterns
access-control, dynamic-fee, mev-protection, return-delta

Pools using ArtCoinsHookStaticFeeV2