PositionManager on Base
Uniswap v4 Hook Contract 0x588c683ecc450f8b2aadb13d7f63792b840425dc on Base · Launchpad · Verified contract
- Volume (24h)
- $37.57K
- Value locked (TVL)
- $1.12K
- All-time volume
- $134.22K
- Pools using this hook
- 2,696
- Swaps (24h)
- 778 (339 traders)
- Total swaps
- 4,781
What it does
Flaunch PositionManager hook that launches memecoins into Uniswap v4 pools, takes swap fees through return deltas, fills swaps from stored fee inventory, and distributes fees to creators, a bid wall, the treasury, the protocol and referrers.
How it works step by step
- flaunch() creates a memecoin and a creator NFT through the Flaunch contract, initializes the pool itself (direct initialization is blocked), seeds single-sided memecoin liquidity, and can fill a creator premine.
- Charges a swap fee on every swap through beforeSwap and afterSwap return deltas. The fee rate comes from an owner-set global or per-pool distribution, or from an optional external fee calculator.
- Before the Uniswap swap, an InternalSwapPool can fill the order from accumulated fee inventory, with the hook taking and settling the tokens itself.
- Accumulated paired-token fees above a threshold are split between the creator, a BidWall (a buy-side liquidity position), the treasury and the protocol, and are credited to FeeEscrow. Referrers are paid directly or through the ReferralEscrow.
- Records oracle observations on each swap, supports scheduled launches that block swaps until the launch time, and emits pool state events to a Notifier.
- Swap behaviour
- beforeSwap reverts with TokenNotFlaunched while a scheduled launch time has not passed. It then tries an internal fill from the InternalSwapPool, taking the paired token from the PoolManager and settling memecoin to it. It checks the BidWall for a stale position (which can reposition it), records the pre-swap tick in the oracle and stores the tick for afterSwap. afterSwap computes the swap fee, pays any referrer share, deposits the rest into the InternalSwapPool, and returns the fee as an unspecified delta. When the paired-token fee inventory reaches a threshold it distributes fees, calls the fee calculator's trackSwap if one is set, and emits swap and pool state events.
- Liquidity behaviour
- The hook has no restrictions on liquidity changes. afterAddLiquidity, afterRemoveLiquidity and afterDonate only emit pool state updates to the Notifier. The hook itself creates the initial single-sided position at launch and manages the BidWall position through unlock callbacks.
- Fee behaviour
- The pool's static LP fee is 0, and the hook charges its own swap fee via return deltas. The fee rate is set by a global or per-pool FeeDistribution or by an external fee calculator. The waterfall is swap fee, then referrer, then protocol (max 10%), then creator, then BidWall. Fees are held in the InternalSwapPool and, once above the minimum threshold, are allocated to FeeEscrow for the creator, treasury and protocol, or deposited into the BidWall. Native ETH pools forward fees as value, and ERC20-paired pools pull them through the escrow. If the creator NFT is burned, the creator's share goes to the BidWall or protocol.
- Owner & admin controls
- The owner (Solady Ownable, with two-step handover and renounce) can set the flaunch contract, the initial price contract, the fee calculator, the global and per-pool fee distributions, the protocol fee allocation (capped at 10%) and the referral escrow. Pool creators can set their pool's creator fee allocation. The owner is also the owner of the Notifier. I found no pause function and no proxy upgrade pattern in the visible code. The BidWall, InternalSwapPool, registry, fee calculator and other referenced contracts have admin controls that cannot be checked here.
Enabled Uniswap v4 callbacks
beforeInitialize, afterAddLiquidity, afterRemoveLiquidity, beforeSwap, afterSwap, afterDonate, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize always reverts so only the hook can initialize pools. beforeSwap enforces launch schedules, runs internal fills, checks the BidWall and records the oracle. afterSwap captures fees, distributes them, tracks swaps for the fee calculator and emits events. beforeSwapReturnDelta lets the hook return its internal fill and fee deltas. afterSwapReturnDelta lets the hook take the swap fee from the unspecified currency. afterAddLiquidity, afterRemoveLiquidity and afterDonate only emit state updates.
Security & trust assessment
Risk level: medium (verified source, medium confidence).
Who controls it: The owner can change fee rates and the fee calculator, swap in the initial price or flaunch contracts, redirect referral handling, and change protocol fee splits (protocol share capped at 10%). Misconfigured or malicious contracts set by the owner could cause swaps to revert or fees to be misdirected.
Risk to user funds: The hook can hold tokens and ETH temporarily (the full supply at launch, fee inventory, and the premine ETH refund) and moves them through the PoolManager, escrows and BidWall. Traders pay fees taken through return deltas. Distributed fees sit in FeeEscrow until recipients withdraw them. A failing external dependency such as the BidWall, oracle or fee calculator could block swaps. LP funds in the pool are not directly controlled by the hook, apart from the hook-owned initial position and the BidWall position.
Security findings
- [info] Hook takes swap fees via return deltas: beforeSwapReturnDelta and afterSwapReturnDelta are enabled and _afterSwap returns swapFee as the hook's unspecified delta, so the hook deducts the fee from every swap amount.
- [medium] Owner controls fee parameters and external contracts: The owner can change the global and per-pool fee distribution, the fee calculator, the initial price contract, the flaunch contract and the referral escrow. The visible code shows a protocol cap of 10%, but I could not see the validation limits on swapFee, so a high swap fee may be possible.
- [medium] Fee calculator and other external calls can affect swaps: Swaps call the InternalSwapPool, BidWall, oracle, fee exemptions, fee calculator and paired token code, and a revert in any of them would revert the swap. The source comments describe reentrancy through callback-capable tokens, and the code mitigates it by snapshotting the shared _beforeSwapTick slot.
- [low] Hook custodies funds during fee flow and flaunch: The hook holds the full token supply at launch, plus fee inventory and ETH during flaunch, and moves them through unlock callbacks, delegatecalls to FlaunchLibrary, and FeeEscrow and BidWall deposits. The rest of the source, including the libraries, was truncated and not reviewed.
- [info] Scheduled launches block public swaps: If flaunchAt is in the future, beforeSwap reverts with TokenNotFlaunched until that time. The premine is exempt because it is a self-swap that skips the hook callbacks.
Contract details
- Verified source
- Yes (PositionManager)
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Bytecode size
- 23,479 bytes
- Upgradeable proxy
- No
- Detected patterns
- dynamic-fee, erc6909-claims, launchpad, moves-currency, oracle, ownable, return-delta, self-unlock, tax
Pools using PositionManager
- ETH / REND (0.00% fee) — 24h volume $36.90K, TVL $230, 735 swaps today
- ETH / RGCAT (0.00% fee) — 24h volume $636, TVL $0.01, 19 swaps today
- ETH / REND (0.00% fee) — 24h volume $22, TVL $0.06, 2 swaps today
- ETH / TREN14 (0.00% fee) — 24h volume $6.22, TVL $0.90, 7 swaps today
- ETH / RSPWN (0.00% fee) — 24h volume $2.41, TVL $1.33, 1 swaps today
- ETH / GETREKT (0.00% fee) — 24h volume $1.99, TVL <$0.01, 2 swaps today
- ETH / RKG (0.00% fee) — 24h volume <$0.01, TVL $0, 1 swaps today
- ETH / BUNNY (0.00% fee) — 24h volume <$0.01, TVL $0, 1 swaps today
- ETH / GFLY (0.00% fee) — 24h volume <$0.01, TVL $0, 1 swaps today
- ETH / FLUNCH (0.00% fee) — 24h volume <$0.01, TVL $0, 1 swaps today
- ETH / DNA (0.00% fee) — 24h volume <$0.01, TVL $0, 1 swaps today
- ETH / RENDCAT (0.00% fee) — 24h volume <$0.01, TVL $0, 1 swaps today
- ETH / REND (0.00% fee) — 24h volume <$0.01, TVL $0, 1 swaps today
- AAPLc / IPODCAT (0.00% fee) — 24h volume <$0.01, TVL $0, 1 swaps today
- ARENA / cbZEC (0.00% fee) — 24h volume $0, TVL $0, 1 swaps today
- flETH / FEEL.CASH (0.00% fee) — 24h volume $0, TVL $0, 1 swaps today
- flETH / VEIL (0.00% fee) — 24h volume $0, TVL $0, 1 swaps today
- flETH / HOOK (0.00% fee) — 24h volume $0, TVL $0, 1 swaps today
- flETH / SACA (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- flETH / WALKASBOT (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today