AnyPositionManager on Base

Uniswap v4 Hook Contract 0x8dc3b85e1dc1c846ebf3971179a751896842e5dc on Base · Launchpad · Verified contract

Volume (24h)
$0
Value locked (TVL)
$0
All-time volume
$13.08M
Pools using this hook
1,542
Swaps (24h)
127 (27 traders)
Total swaps
89,059

What it does

A Flaunch memecoin launch hook that takes swap fees, routes them to creators, a BidWall liquidity wall, treasury and protocol, and runs internal swap matching against accumulated fee tokens.

How it works step by step

  • Captures a swap fee on every swap and splits it between creator, BidWall, treasury and protocol recipients
  • Fills swaps from accumulated fee tokens through an internal swap pool before they reach the Uniswap pool
  • Deposits fees into a BidWall position and closes stale BidWall positions during swaps
  • Blocks direct external initialization of pools that use this hook
  • Emits pool state and swap events for indexers and frontends
  • Supports referral fees and per-sender fee exemptions
Swap behaviour
Before each swap the hook runs internal swap pool matching against accumulated fee tokens and checks BidWall staleness; after each swap it captures a fee as an unspecified delta and distributes accumulated fees when a threshold is reached.
Liquidity behaviour
Liquidity callbacks only emit state update events; this contract does not restrict liquidity additions or removals. Liquidity for the BidWall is managed through the BidWall contract, which can deposit fees into the pool and close stale positions.
Fee behaviour
Swap fees are captured via afterSwap and beforeSwap return deltas, using an optional fee calculator, and split between creator, BidWall, treasury and protocol recipients, with a referrer share taken first when a referrer is supplied. Fee exemptions can be granted per sender. Pool fee is 0 in the PoolKey; the hook takes its fee as an unspecified delta.
Owner & admin controls
Owner (Ownable with two-step handover) can approve memecoin creators via approveCreator, set the flaunch contract, initial price calculator, fee calculator, fee distribution and per-pool fee distribution, referral escrow, and the protocol fee distribution. Owner can change fee splits sent to creators, BidWall, treasury and protocol, which directly affects where swap fees go.

Enabled Uniswap v4 callbacks

beforeInitialize, afterAddLiquidity, afterRemoveLiquidity, beforeSwap, afterSwap, afterDonate, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize blocks direct pool initialization against this hook. afterAddLiquidity and afterRemoveLiquidity emit state updates. beforeSwap runs internal swap pool matching, schedule/premine gating and BidWall stale-position checks. afterSwap captures fees, distributes accumulated fees, tracks swaps for fee calculators and emits events. afterDonate emits events. beforeSwapReturnDelta and afterSwapReturnDelta let the hook take or give currency in swaps to collect fees and fill internal swaps.

Security & trust assessment

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

Who controls it: A compromised owner could approve arbitrary creators to flaunch tokens, swap in a malicious fee calculator or initial price contract, reroute fee distribution (e.g. send all fees to the protocol recipient or a chosen address), change the flaunch contract, or set a malicious referral escrow, potentially draining or redirecting swap fee revenue that is held by the hook.

Risk to user funds: The hook can hold and move fee balances through return deltas and internal swaps, and it settles tokens with the PoolManager. Users trade against pool liquidity; the hook can take a fee on each swap. The owner-controlled fee split and calculators determine where those fees go, but the analysis is based on the verified project source supplied, with the BidWall and escrow sources omitted from the input, so their behaviour is not fully confirmed.

Security findings

  • [medium] Owner controls fee routing and external calculators: The owner can replace the fee calculator, initial price contract and fee distribution parameters, which change how much of every swap fee goes to creators, BidWall, treasury and protocol. A malicious or compromised owner could redirect fees.
  • [medium] Dependence on external calculator and escrow contracts: The hook is ownable and uses delegated external calculator and escrow contracts; their behaviour is not verified within this analysis and fee swaps depend on them.
  • [info] Hook holds and moves pool fee balances: The hook takes swap fees and holds fee balances per pool before distribution, and it performs internal swaps against those balances. Balances are tracked in storage and settled through PoolManager deltas.
  • [info] Permissioned token creation: Creator approval is owner-controlled, so flaunching is permissioned rather than open to all callers.

Contract details

Verified source
Yes (AnyPositionManager)
Compiler
solc 0.8.27+commit.40a35a09
Bytecode size
20,390 bytes
Upgradeable proxy
No
Detected patterns
dynamic-fee, erc6909-claims, launchpad, moves-currency, ownable, return-delta, self-unlock, tax

Pools using AnyPositionManager