Uniswap V3 Ticks

Compute and verify Uniswap V3 ticks from sqrt prices using TickMath.

Updated Jan 28, 2026
One-click install
npx skills add https://github.com/cyotee/uniswap-V3-skill --skill uniswap-v3-ticks
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Uniswap V3 Ticks
Source: https://github.com/cyotee/uniswap-V3-skill/tree/main/.opencode/skills/uniswap-v3-ticks
Command: npx skills add https://github.com/cyotee/uniswap-V3-skill --skill uniswap-v3-ticks

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps developers understand and reason about Uniswap V3 tick-based pricing, discretization, and how ticks drive price levels.

Core Features & Use Cases

  • Tick Math: Understand the relationship between ticks, price, and sqrtPriceX96.
  • TickBitmap & Crossing: Learn how the bitmap tracks initialized ticks and how crossing updates liquidity.
  • Practical Use Case: Validate tick computations for a given price and simulate tick crossing to update liquidity ranges.

Quick Start

Use the Uniswap V3 Ticks skill to compute the tick from a given sqrt price and verify the TickMath.getTickAtSqrtRatio function results.

Frequently Asked Questions about Uniswap V3 Ticks

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

FAQPage Schema
How do ticks work in Uniswap V3 price discretization?

Ticks in Uniswap V3 are discrete price levels that divide the price space logarithmically. Each tick corresponds to a specific sqrtPriceX96 value computed via TickMath, enabling concentrated liquidity providers to specify exact price ranges rather than continuous ranges.

How do I compute the tick from a given square root price?

Use the TickMath.getTickAtSqrtRatio function to calculate the tick value from a sqrtPriceX96 input. This function returns the nearest tick and is fundamental for validating price computations and simulating tick crossings in concentrated liquidity pools.

What is TickBitmap and how does it track initialized ticks?

TickBitmap is a data structure that efficiently stores which ticks have initialized liquidity using bitmap compression. It enables fast lookup of the next initialized tick when liquidity crosses a tick boundary, critical for updating active ranges.

How do I simulate tick crossing and liquidity updates?

Simulate crossing by identifying the next initialized tick using TickBitmap, computing the new sqrtPriceX96 at that tick via TickMath, and recalculating active liquidity for the new price range. Unit tests verify these state transitions across fee tiers.

What's the difference between ticks across Uniswap V3 fee tiers?

Tick spacing varies by fee tier: 0.01% uses 1-tick spacing, 0.05% uses 10-tick spacing, 0.30% uses 60-tick spacing, and 1% uses 200-tick spacing. Lower fee tiers allow finer price discretization but increase computational overhead and bitmap size.

Can I audit tick calculations in Solidity smart contracts?

Yes. Implement TickMath and TickBitmap logic in Solidity or validate against reference implementations via unit tests. Auditing verifies that sqrt ratio computations, tick rounding, and bitmap lookups match expected behavior for your concentrated liquidity design.