AnyPositionManager on Base

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

Volume (24h)
$7.19K
Value locked (TVL)
$2.42K
All-time volume
$346.17K
Pools using this hook
14
Swaps (24h)
49 (40 traders)
Total swaps
2,533

What it does

A launchpad hook for Uniswap v4 that lets approved creators flaunch ERC20 memecoins paired against approved tokens, seeding a BidWall liquidity position and routing swap fees to creators, BidWall, treasury and protocol.

How it works step by step

  • Lets approved creators flaunch an existing or new ERC20 memecoin and creates a Uniswap v4 pool paired against an owner-approved token or native ETH.
  • Seeds a single-sided BidWall position and optionally fills a premine swap at launch.
  • Gates public swaps on a pool until a scheduled launch timestamp.
  • Captures a swap fee on each trade and deposits it into an internal swap pool for conversion into the paired token.
  • Distributes accumulated paired-token fees to creator, BidWall, treasury and protocol according to configured splits once a minimum threshold is reached.
  • Emits pool state, swap and fee events for indexers and UI consumers.
Swap behaviour
On each swap, beforeSwap first gates trading on any scheduled launch time, fills against the InternalSwapPool inventory when available, and checks BidWall staleness; afterSwap captures a fee via return delta, deposits it into the InternalSwapPool, distributes accumulated fees above a minimum threshold, and emits swap events.
Liquidity behaviour
afterAddLiquidity and afterRemoveLiquidity only emit state update events; no liquidity is moved by these callbacks. The BidWall, a separate contract, manages a single-sided protocol-owned sell position that it can reposition and close via unlock callbacks.
Fee behaviour
Swap fees are captured via afterSwap return delta and beforeSwap return delta on each swap; fees are split between BidWall, creator (via creator fee allocation), treasury and protocol according to owner-configured distribution, with a portion optionally paid as referrer fee. Pool fee is set to 0 at the Uniswap level; the hook takes its own fee.
Owner & admin controls
Owner (Ownable with two-step ownership handover) can set the flaunch contract, approve/unapprove memecoin creators, set the initial price calculator, set the fee calculator, set fee distribution splits and protocol fee allocation, set the referral escrow, and set per-pool fee distribution; owner can also transfer or renounce ownership. No pausing or upgrade mechanism was observed in the provided source, though the truncated source prevents full verification.

Enabled Uniswap v4 callbacks

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

beforeInitialize blocks direct pool initialization by third parties so only the hook can initialize its own pools; afterAddLiquidity and afterRemoveLiquidity emit pool state events; beforeSwap gates trading until a scheduled launch time, runs internal swaps against the InternalSwapPool inventory, and checks BidWall staleness; afterSwap captures and distributes fees and emits swap events; afterDonate emits a state event; beforeSwapReturnDelta and afterSwapReturnDelta let the hook take a share of swap amounts as fees.

Security & trust assessment

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

Who controls it: The owner can approve arbitrary creators to launch tokens, change the flaunch, initial price and fee calculator contracts, and change fee distribution splits including the protocol share, which could redirect fee flows or influence launch pricing for future pools.

Risk to user funds: The hook holds paired-token fee inventory and seeded liquidity, and the BidWall holds protocol-owned sell liquidity; the hook can move these funds to fee recipients and the BidWall on each swap, and owner-set parameters determine how the split is applied. Trader funds are routed through the hook's swap path, so a pause or misconfiguration of the internal swap pool could affect swaps.

Security findings

  • [medium] Owner-adjustable fee split and calculator: The hook takes its swap fee through beforeSwapReturnDelta and afterSwapReturnDelta, so a fee-distribution or calculator change by the owner directly changes what traders pay and where it goes.
  • [medium] Reentrancy surface via token callbacks: The hook can move pool-paired tokens to the BidWall, treasury and protocol recipient and calls token transfers to arbitrary imported ERC20 memecoins, so a malicious or callback-capable token can re-enter during fee distribution; the source documents a shared tick slot and mitigates it by snapshotting values.
  • [low] Single owner key: Ownership is controlled by a single owner key with a two-step handover; a compromise would allow changing fee recipients, distribution splits and calculators.
  • [info] Premine correctness depends on upstream behaviour: The contract relies on Uniswap v4 skipping hook callbacks for swaps issued by the hook itself to keep the premine path correct; the source explicitly flags this as an upstream assumption rather than something enforced here.

Contract details

Verified source
Yes (AnyPositionManager)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
24,489 bytes
Upgradeable proxy
No
Detected patterns
dynamic-fee, erc6909-claims, launchpad, moves-currency, oracle, ownable, return-delta, self-unlock, tax

Pools using AnyPositionManager