Uniswap V3 Swaps

Explain Uniswap V3 single-hop and multi-hop swap execution and routing.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill explains Uniswap V3 swaps and routing to help users reason about swap outcomes.

Core Features & Use Cases

  • Single-hop swaps: understand routing through a single pool and the SwapRouter periphery.
  • Multi-hop routing: reason about cross-pool paths, swap callbacks, and liquidity changes across ticks.
  • Use Case: estimate output for a given input along a multi-pool path with fee tiers.

Quick Start

Use the Uniswap V3 Swaps skill to reason about a simple exactInput swap using a single pool, or to analyze a multi-hop path across two pools.

Frequently Asked Questions about Uniswap V3 Swaps

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

FAQPage Schema
How do Uniswap V3 swaps handle multi-hop routing across pools with different fee tiers?

Multi-hop swaps route through sequential pools, with the SwapRouter encoding the path and executing callbacks at each pool to transfer tokens and calculate liquidity changes across ticks. Fee tier selection affects slippage and execution price.

What's the difference between exactInput and exactOutput swap behavior in Uniswap V3?

exactInput specifies the token amount you send and outputs the minimum received after accounting for slippage. exactOutput reverses this: you specify the token amount you want and pay the maximum required, protecting against excessive input costs.

How do I estimate swap output along a multi-pool path with variable liquidity?

Trace the swap through each pool's tick structure, applying liquidity and price range dynamics at each step. The SwapRouter periphery handles callback mechanics automatically, but understanding tick transitions lets you reason about intermediate outputs and slippage accumulation.

Why does slippage protection matter when routing through multiple Uniswap V3 pools?

Multi-hop swaps compound slippage across pools and introduce callback delays where liquidity may shift between ticks. Setting minimum output thresholds prevents partial fills at unfavorable prices, especially during volatile market conditions.

Can I use a single pool for Uniswap V3 swaps, or do I need cross-pool routing?

Single-pool swaps work for direct token pairs and are simpler to reason about. Cross-pool routing becomes necessary when no direct pool exists for your token pair or when fee tier combinations offer better execution.

What role do callbacks play in Uniswap V3 swap execution?

Callbacks allow pools to request token transfers from the caller during swaps. The SwapRouter uses callbacks to abstract pool interactions, enabling atomic multi-hop execution and reducing transaction overhead compared to sequential approvals.