DopplerHookInitializer on Base
Uniswap v4 Hook Contract 0xbdf938149ac6a781f94faa0ed45e6a0e984c6544 on Base · Launchpad · Verified contract
- Volume (24h)
- $3.83M
- Value locked (TVL)
- $3.69M
- All-time volume
- $816.03M
- Pools using this hook
- 368,164
- Swaps (24h)
- 117,752 (1,453 traders)
- Total swaps
- 6.3M
What it does
A launchpad hook and initializer that seeds a new token's liquidity across multiple bonding-curve positions in a Uniswap v4 pool, optionally lets a plugged-in Doppler hook set a dynamic LP fee and take a swap fee, and routes locked-pool fees to beneficiaries until the pool graduates or migrates.
How it works step by step
- Acts as the Airlock's pool initializer: creates the pool with itself as hook, mints several liquidity positions from the Multicurve parameters, and returns leftover dust tokens to the Airlock.
- Only the hook itself can initialize pools (beforeInitialize requires sender == address(this)), so pools using it can only be created through the Airlock flow.
- If a Doppler hook is set, the pool uses a dynamic fee flag and the Doppler hook can update the LP fee, capped at 100,000 (10%).
- On swaps, an enabled Doppler hook can return a fee delta; the hook takes that currency from the PoolManager and settles it to the Doppler hook.
- Locked pools keep beneficiaries with shares; anyone can call collectFees to pull fees from the positions, and the caller is paid only if they are a beneficiary, MasterChef-style.
- The Airlock can exit liquidity from non-locked pools once the far tick is reached, and locked pools can graduate through the Doppler hook's onGraduation.
- Swap behaviour
- afterSwap looks up the pool's asset and Doppler hook. If a hook is set and has the ON_SWAP flag enabled by the Airlock owner, it calls onSwap and receives a fee currency and an int128 delta. If delta is positive, this contract takes that amount from the PoolManager, transfers it back to the PoolManager and settles it for the Doppler hook. The positive delta is returned as the afterSwap return delta, so the swapper's output is reduced by that amount. It then emits a Swap event. Without a Doppler hook, swaps are unchanged.
- Liquidity behaviour
- afterAddLiquidity and afterRemoveLiquidity only emit a ModifyLiquidity event and return a zero delta. Liquidity itself is minted, burned or collected by this contract through the PoolManager unlock callback during initialization, exitLiquidity and fee collection.
- Fee behaviour
- Without a Doppler hook the pool uses the static fee from the init data (up to 100%, per the struct comment). With a Doppler hook the pool is dynamic-fee, the initial fee is set at initialization, and the Doppler hook can later change it up to 10% while the pool is Locked. The Doppler hook can also take an additional swap fee through the afterSwap return delta, with no cap visible in this contract. Trading fees on locked pools are collected into this contract and paid to beneficiaries by share. At least the Airlock owner's minimum share (MIN_PROTOCOL_OWNER_SHARES) goes to the protocol. Beneficiaries can transfer their shares to a new address.
- Owner & admin controls
- The Airlock owner (airlock.owner()) calls setDopplerHookState to enable or disable Doppler hooks and set their flags (initialization, swap, graduation, dynamic fee). The asset's timelock, or an address it delegated through delegateAuthority, can call setDopplerHook on a Locked pool to swap the Doppler hook and its graduation calldata. Only the pool's current Doppler hook can call updateDynamicLPFee. Beneficiaries can reassign their own shares. The hook is not an upgradeable proxy in the shown source, and there is no pause function.
Enabled Uniswap v4 callbacks
beforeInitialize, afterAddLiquidity, afterRemoveLiquidity, afterSwap, afterSwapReturnDelta
beforeInitialize restricts pool creation to this contract. afterAddLiquidity and afterRemoveLiquidity emit ModifyLiquidity events. afterSwap runs the optional Doppler hook swap logic and emits Swap events. afterSwapReturnDelta lets the hook take a fee from the swap output on behalf of the Doppler hook.
Security & trust assessment
Risk level: medium (verified source, high confidence).
Who controls it: The Airlock owner can enable or disable Doppler hooks and their swap and graduation callbacks. The asset's timelock or its delegated authority can swap the Doppler hook of a locked pool. An approved Doppler hook can set the LP fee up to 10% and take additional swap output, which could raise trading costs for users.
Risk to user funds: Traders' funds are not held by the hook, but an enabled Doppler hook can take part of swap output through the return delta. The hook itself holds all seeded liquidity positions and accrued fees. Only the Airlock, through exitLiquidity, can withdraw non-locked liquidity after the far tick is reached. Locked pools cannot be exited and fees go to beneficiaries only. Graduation behaviour depends on the external Doppler hook's onGraduation, whose code is not included here.
Security findings
- [medium] Doppler hook can take swap output via return delta: afterSwap forwards the delta returned by the external Doppler hook's onSwap to the PoolManager as an afterSwap return delta, takes the funds and settles them to the Doppler hook. This contract applies no cap or sanity check on the amount, so swappers rely on the approved Doppler hook's logic.
- [medium] Doppler hook swappable on locked pools: setDopplerHook lets the timelock or its delegated authority replace the pool's Doppler hook after launch, as long as the new hook is enabled by the Airlock owner. This changes swap fee behaviour and the graduation logic of a live pool.
- [low] Airlock owner controls the Doppler hook allowlist: setDopplerHookState is restricted to airlock.owner(). It decides which Doppler hooks may be used and whether their onSwap and onGraduation callbacks run.
- [info] Dynamic LP fee bounded at 10%: updateDynamicLPFee reverts if the fee exceeds MAX_LP_FEE of 100,000 (10%) and works only for the pool's Doppler hook while the pool is Locked. However, the initial fee passed to initialize is not checked against that cap in the shown code.
- [info] Hook holds pool liquidity and unpaid fees: This contract owns all bonding-curve positions through the PoolManager and holds collected fees until beneficiaries claim them. Withdrawal paths are limited to the Airlock (exitLiquidity), fee collection and beneficiary release. A reentrancy guard protects collectFees and updateBeneficiary.
Contract details
- Verified source
- Yes (DopplerHookInitializer)
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Bytecode size
- 24,384 bytes
- Upgradeable proxy
- No
- Detected patterns
- dynamic-fee, launchpad, moves-currency, return-delta, self-unlock
Pools using DopplerHookInitializer
- WETH / USDP (0.30% fee) — 24h volume $105.61K, TVL $1.18, 18 swaps today
- WETH / USDP (0.30% fee) — 24h volume $99.03K, TVL $0.05, 28 swaps today
- WETH / USDP (0.30% fee) — 24h volume $98.89K, TVL $0.05, 27 swaps today
- USDP / WETH (0.30% fee) — 24h volume $98.85K, TVL $0.05, 11 swaps today
- USDP / WETH (0.30% fee) — 24h volume $98.79K, TVL $0.05, 10 swaps today
- WETH / USDP (0.30% fee) — 24h volume $96.03K, TVL $1.56, 19 swaps today
- WETH / USDP (0.30% fee) — 24h volume $83.76K, TVL $5.18, 299 swaps today
- WETH / USDP (0.30% fee) — 24h volume $79.17K, TVL $69.13K, 1,188 swaps today
- WETH / USDP (0.30% fee) — 24h volume $76.95K, TVL $6.40, 2,229 swaps today
- WETH / 1 (0.30% fee) — 24h volume $66.36K, TVL $1.79, 30 swaps today
- WETH / USDP (0.30% fee) — 24h volume $64.70K, TVL $1.96, 139 swaps today
- WETH / USDF (0.30% fee) — 24h volume $64.40K, TVL $0.04, 57 swaps today
- USDF / WETH (0.30% fee) — 24h volume $61.59K, TVL $1.90, 21 swaps today
- WETH / USDP (0.30% fee) — 24h volume $61.53K, TVL $61, 757 swaps today
- WETH / USDP (0.30% fee) — 24h volume $60.88K, TVL $56.49K, 599 swaps today
- WETH / XTO (0.30% fee) — 24h volume $60.54K, TVL $2.00, 499 swaps today
- WETH / USDP (0.30% fee) — 24h volume $60.37K, TVL $74, 1,142 swaps today
- FTR / WETH (0.30% fee) — 24h volume $58.43K, TVL $1.91, 205 swaps today
- WETH / USDF (0.30% fee) — 24h volume $57.97K, TVL $0.04, 59 swaps today
- USDF / WETH (0.30% fee) — 24h volume $57.94K, TVL $1.91, 98 swaps today