OAALaunchHook
BaseOAALaunchHook is a Uniswap v4 hook on Base. Brand new: its first pool went live today. Still in use: 16 trades in the last week, and 1 new pool this week.
- Contract name
- OAALaunchHook
How this hook works
Liquidity managerA liquidity manager hook. It changes its fee over time, manages its own liquidity and trades on its own.
Fee changes over time
Instead of a fixed fee, it sets the fee itself and changes it over time, for example starting high at launch and coming down. The fee goes to liquidity providers; the hook keeps nothing for itself.
The code that does this (beforeSwap):function beforeSwap(address, PoolKey calldata, SwapParams calldata params, bytes calldata) external onlyPoolManager returns (bytes4, BeforeSwapDelta, uint24) { if (block.number <= launchBlock) revert TradingOpensNextBlock(); if (block.timestamp >= uint256(launchTime) + WINDOW) { return (IHooks.beforeSwap.selector, BeforeSwapDeltaLibrary.ZERO_DELTA, 0); } if (params.zeroForOne && block.timestamp < uint256(launchTime) + LIMIT_WINDOW) { if (lastBuyBlock[tx.origin] == block.number) revert OneBuyPerBlock(); lastBuyBlock[tx.origin] = block.number; } return (IHooks.beforeSwap.selector, BeforeSwapDeltaLibrary.ZERO_DELTA, currentFee() | LPFeeLibrary.OVERRIDE_FEE_FLAG); }Manages its own liquidity
It adds and removes liquidity itself, so it can own part or all of the pool.
The code that does this (unlockCallback):function unlockCallback(bytes calldata data) external onlyPoolManager returns (bytes memory) { (uint8 mode, uint256 ethIn, uint256 minOut) = abi.decode(data, (uint8, uint256, uint256)); PoolKey memory key = _key; if (mode == 0) { uint256 owe1; for (uint256 i = 0; i < 3; i++) { int24 lo = _ticks[i + 1]; int24 hi = _ticks[i]; uint128 liquidity = LiquidityAmounts.getLiquidityForAmount1( TickMath.getSqrtPriceAtTick(lo), TickMath.getSqrtPriceAtTick(hi), _amounts[i] ); (BalanceDelta added,) = poolManager.modifyLiquidity( key, ModifyLiquidityParams({tickLower: lo, tickUpper: hi, liquidityDelta: int256(uint256(liquidity)), salt: 0}), "" ); require(added.amount0() == 0, "one-sided"); owe1 += uint256(int256(-added.amount1())); } poolManager.sync(key.currency1); require(IERC20Minimal(oaa).transfer(address(poolManager), owe1), "pay"); poolManager.settle(); uint256 got; if (ethIn > 0) { BalanceDelta d = poolManager.swap( key, SwapParams({zeroForOne: true, amountSpecified: -int256(ethIn), sqrtPriceLimitX96: TickMath.MIN_SQRT_PRICE + 1}), "" ); uint256 paid = uint256(int256(-d.amount0())); got = uint256(int256(d.amount1())); if (got < minOut) revert SlippageTooHigh(); poolManager.settle{value: paid}(); // …Trades on its own
It makes trades itself, for example to convert the fees it collected.
The code that does this (unlockCallback):function unlockCallback(bytes calldata data) external onlyPoolManager returns (bytes memory) { (uint8 mode, uint256 ethIn, uint256 minOut) = abi.decode(data, (uint8, uint256, uint256)); PoolKey memory key = _key; if (mode == 0) { uint256 owe1; for (uint256 i = 0; i < 3; i++) { int24 lo = _ticks[i + 1]; int24 hi = _ticks[i]; uint128 liquidity = LiquidityAmounts.getLiquidityForAmount1( TickMath.getSqrtPriceAtTick(lo), TickMath.getSqrtPriceAtTick(hi), _amounts[i] ); (BalanceDelta added,) = poolManager.modifyLiquidity( key, ModifyLiquidityParams({tickLower: lo, tickUpper: hi, liquidityDelta: int256(uint256(liquidity)), salt: 0}), "" ); require(added.amount0() == 0, "one-sided"); owe1 += uint256(int256(-added.amount1())); } poolManager.sync(key.currency1); require(IERC20Minimal(oaa).transfer(address(poolManager), owe1), "pay"); poolManager.settle(); uint256 got; if (ethIn > 0) { BalanceDelta d = poolManager.swap( key, SwapParams({zeroForOne: true, amountSpecified: -int256(ethIn), sqrtPriceLimitX96: TickMath.MIN_SQRT_PRICE + 1}), "" ); uint256 paid = uint256(int256(-d.amount0())); got = uint256(int256(d.amount1())); if (got < minOut) revert SlippageTooHigh(); poolManager.settle{value: paid}(); // …Limits on trading
It limits trading, for example a max buy or wallet size or a wait between trades, to stop bots grabbing the supply before real traders.
The code that does this (afterSwap):function afterSwap(address, PoolKey calldata, SwapParams calldata params, BalanceDelta delta, bytes calldata) external onlyPoolManager returns (bytes4, int128) { if (params.zeroForOne && block.timestamp < uint256(launchTime) + LIMIT_WINDOW) { int128 out = delta.amount1(); if (out > 0 && uint256(int256(out)) > MAX_BUY) revert MaxBuyPerTrade(); } return (IHooks.afterSwap.selector, 0); }Only the hook creates its pools
Nobody can create a pool with this hook directly. Pools are only created through the hook’s own code.
Anyone can trigger payouts
Anyone can collect the fees it has built up, so nobody has to wait on the hook developer.
The code that does this (collectFees):function collectFees() external returns (uint256 eth, uint256 oaaFees) { if (!launched) revert NotLaunched(); bytes memory r = poolManager.unlock(abi.encode(uint8(1), uint256(0), uint256(0))); (eth, oaaFees) = abi.decode(r, (uint256, uint256)); emit FeesCollected(eth, oaaFees); }
Who controls it: The pool creator can change when trading opens. The code cannot be changed.
Based on the hook’s published code.What do these labels mean?
Safety report
Before you build on it. Automated checks, not an auditWhat it can do
Its code executes inside each trade in pools that use it.
Pools using it let the hook choose the swap fee instead of a fixed tier.
It runs when a pool is created, often to lock in that pool’s settings.
Hook history
- Launched a new token 1 time
Counted from what the hook recorded on-chain across all its pools, for every action in its published code, plus token transfers in and out of it.