okx-v4-pool-launcher

Deploys Uniswap V4 hooks, initializes pools, and mints LP positions via onchainos wallet contract calls.

Updated Apr 5, 2026
One-click install
npx skills add https://github.com/Nith567/xlayer-skills-arena --skill okx-v4-pool-launcher-nith567
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: okx-v4-pool-launcher
Source: https://github.com/Nith567/xlayer-skills-arena/tree/main/okx-v4-pool-launcher
Command: npx skills add https://github.com/Nith567/xlayer-skills-arena --skill okx-v4-pool-launcher-nith567

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Launching a Uniswap V4 pool requires three separate on-chain transactions — deploying a hook with correct CREATE2 permission flags, initializing the pool through PoolManager, and minting a liquidity position through PositionManager — each with intricate calldata encoding that is easy to get wrong. This Skill orchestrates the entire flow without requiring a private key, using the OKX onchainos wallet for signing. ## Core Features & Use Cases - 3-Step Pool Launch: Deploys a hook via CREATE2 factory with salt mining for permission flags, initializes the pool with computed sqrtPriceX96, and mints an LP NFT position via PositionManager. - Volatility-Based Range Calculation: Fetches 30-day kline data from OKX to compute weekly volatility and derive tick ranges, with presets for tight, medium, wide, and single-sided ETH/USDC positions. - Custom V4 Calldata Encoding: Handles V4-specific encoding quirks such as the 0x180 hookData offset, native ETH settlement via msg.value, and SWEEP actions, with an error reference table from live deployments. - Use Case: A user says "launch ETH/USDC V4 pool on Base with 0.001 ETH" and the skill parses parameters, shows a gas-estimated plan, executes all three transactions, and returns the hook address, pool ID, and LP NFT ID with explorer links. ## Quick Start Ask the agent to launch an ETH/USDC Uniswap V4 pool on Base with 0.001 ETH and a medium range.

Frequently Asked Questions about okx-v4-pool-launcher

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I deploy a Uniswap V4 pool with a hook?▼

Deploying a V4 pool with a hook takes three steps: deploy the hook via a CREATE2 factory with a salt mined so the address encodes the permission flags, initialize the pool through PoolManager with a computed sqrtPriceX96, then mint an LP position through PositionManager. This skill executes all three via onchainos wallet contract-call.

How to calculate tick ranges for a Uniswap V4 liquidity position?▼

Tick ranges are derived from 30-day price kline data: compute daily returns, derive weekly volatility, and multiply by a preset factor (0.5 tight, 1.5 medium, 3.0 wide). Convert prices to ticks with tick = log(price × 10^(dec1−dec0)) / log(1.0001), rounded to the fee tier's tick spacing.

Can I create a Uniswap V4 pool without a private key?▼

Yes. All transactions are signed through the OKX onchainos agentic wallet using the wallet contract-call command, so no raw private key is handled. Native ETH is sent as msg.value via the --amt flag for settlement instead of wrapping.

Why does Uniswap V4 hook deployment fail with HookAddressNotValid?▼

HookAddressNotValid occurs when the deployed hook address has zero permission bits set in its lower 14 bits. Fix it by mining a CREATE2 salt until the resulting address matches the required flags, such as 0x1000 for afterInitialize.

What causes SliceOutOfBounds when minting a V4 position?▼

SliceOutOfBounds happens when the hookData offset in MINT_POSITION calldata uses the standard ABI offset instead of V4's custom layout. Set the hookData pointer to 0x180 and include a SWEEP action to return unused ETH.