okx-v4-deposit

Mints Uniswap V4 liquidity positions via onchainos wallet contract-call with tick range calculation.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Adding liquidity to a Uniswap V4 pool requires manual tick math, token approvals, ETH wrapping, and low-level calldata encoding for PositionManager. This Skill automates the entire deposit flow into a single transaction driven by a natural language request. ## Core Features & Use Cases - Automated Tick Range Calculation: Computes tight, medium, wide, or single-sided price ranges from 30-day volatility klines and converts them to valid ticks for the pool's tick spacing. - Single-Transaction MINT_POSITION Encoding: Builds PositionManager modifyLiquidities calldata with WRAP, MINT_POSITION, SETTLE_PAIR, and SWEEP actions, including USDC permit2 approval and native ETH handling. - Multi-Chain Support: Works on Base, Ethereum, and Arbitrum with preconfigured PoolManager and PositionManager addresses, plus a deployed XLayerHook ETH/USDC pool on Base. - Use Case: A user says "add LP with 0.0003 ETH to the ETH/USDC V4 pool on Base" and receives a minted LP NFT position with its token ID, range, and in-range status. ## Quick Start Ask the agent to deposit 0.0003 ETH into the ETH/USDC Uniswap V4 pool on Base with a medium range.

Frequently Asked Questions about okx-v4-deposit

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

FAQPage Schema
How do I add liquidity to a Uniswap V4 pool?▼

Provide a token pair, chain, deposit amount, and range preference in natural language. The skill fetches the current price, calculates ticks from 30-day volatility, encodes MINT_POSITION calldata, and executes the deposit via onchainos wallet contract-call in one transaction.

How to make a single-sided ETH deposit into Uniswap V4?▼

Set the tick range entirely above the current price so only ETH is deposited and no USDC approval is needed. The position acts like a limit order, converting ETH to USDC as price rises while earning the 0.30% fee tier.

Which chains does Uniswap V4 liquidity deposit support?▼

The skill supports Base, Ethereum, and Arbitrum with preconfigured PoolManager and PositionManager contract addresses for each chain. Base is the default and includes a deployed XLayerHook ETH/USDC pool.

Why does my V4 deposit fail with insufficient balance?▼

The pre-flight check requires the deposit amount plus roughly 0.00003 ETH for gas on Base. If the wallet balance is below this threshold, the skill stops and reports the required amount and funding address before executing.

How is the tick range calculated for a V4 LP position?▼

The skill fetches 30-day daily klines, computes daily and weekly volatility, then applies presets: tight at 0.5x, medium at 1.5x, and wide at 3x weekly volatility. Prices are converted to ticks rounded to the pool's tick spacing of 60.