AnyHook on Base

Uniswap v4 Hook Contract 0x5b0a864213d49f23ed2a6635cc42b3b4fe7720cc on Base · Fee sharing · Verified contract

Volume (24h)
$0
Value locked (TVL)
$985
All-time volume
$106.65K
Pools using this hook
46
Swaps (24h)
0 (0 traders)
Total swaps
1,160

What it does

Charges a fixed 1% fee on token buys and sells against any pair token, splitting it 60% to the platform and 40% to the token creator, with a short anti-snipe window on early buys.

How it works step by step

  • Charges a constant 1% fee on the pair side of every qualifying swap, with no tiers.
  • Splits fees 60% platform and 40% creator, tracked per token and pair.
  • Takes fees as ERC-6909 claims minted to the hook, redeemed on a later swap.
  • Pays platform fees to the treasury and creator fees to the factory, falling back to owed balances if a transfer fails.
  • Blocks trades in the pool's launch block and caps early buys per origin address during a configurable window.
  • Allows the owner to adjust anti-snipe settings and the treasury and factory addresses.
Swap behaviour
On buys with exact input (pair in) and sells with exact output (pair out), a 1% fee is taken on the pair side via return deltas and recorded as ERC-6909 claims. Launch-block swaps pay no fee. Buys during the anti-snipe window are capped per origin address in USD using the launch quote. Exact-output buys and exact-input sells are rejected.
Liquidity behaviour
No liquidity callbacks.
Fee behaviour
Fixed 1% fee on the pair-side amount of every buy with exact input and every sell with exact output (FEE_BPS=100, constant). 0.60% goes to the platform and 0.40% to the token creator, accrued per pair and per token. No fee in the pool's launch block. Fees are taken as ERC-6909 claims and redeemed to the treasury or launcher on a later swap or pulled by anyone to the treasury.
Owner & admin controls
Owner (EOA set at deploy via tx.origin) can: set platform treasury, set factory, toggle and retune anti-snipe (enabled flag, block window, per-wallet USD cap), and transfer ownership. Fee rates are constants and cannot be changed. armDevBuy is restricted to the factory. No pausing or upgrade mechanism found.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize records the deployment block per pool for the launch-block fee exemption and anti-snipe window. beforeSwap mints fee claims, flushes earlier claims into real pair, and applies anti-snipe caps on buys. afterSwap mints fee claims for the unspecified side. beforeSwapReturnDelta and afterSwapReturnDelta let the hook take its 1% fee from swap deltas.

Security & trust assessment

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

Who controls it: The owner cannot change fee rates or move funds directly, but can redirect the platform treasury and factory address, change anti-snipe rules (including disabling them or setting a cap that blocks snipers), and transfer ownership to any address, including one that could reconfigure these settings.

Risk to user funds: The hook takes 1% of pair-side swap amounts via return deltas and holds fee claims and owed balances until they are redeemed to the treasury or launcher. It does not custody the traders' principal beyond the swap itself, but a privileged owner can redirect where accrued fees go and tune buy restrictions.

Security findings

  • [medium] Owner can redirect platform fee destination: The owner can change the treasury address, which receives platform fees on pullPlatformFees and flushClaims; a malicious change would redirect future platform fees.
  • [medium] Trusted factory is owner-settable: The owner is set to tx.origin at deployment and can set the factory address, which is trusted for creditCreatorFee, pairPrice and isKlikToken calls; a malicious factory could affect fee accounting and snipe caps.
  • [low] Anti-snipe parameters can block buys: Owner can set antiSnipeBlocks and maxSnipeUsdE8, and the cap relies on a stale pairPrice quote from the factory; a cap set to zero or an unreliable price can block early buys.
  • [info] Fee redemption is best-effort: Gas-limited transfers with an owed-balance fallback mean a blocked recipient cannot halt swaps, but flushClaims is skipped when gas is short, so claims can accumulate.
  • [info] Hook holds fee claims and pending balances: The hook holds ERC-6909 claims and pending pair balances for fees and takes its fee through return deltas, so it does hold pool-related funds until they are redeemed.

Contract details

Verified source
Yes (AnyHook)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
8,082 bytes
Upgradeable proxy
No
Detected patterns
mev-protection, moves-currency, ownable, return-delta, rewards

Pools using AnyHook