aggregator-hook-creator

Route Uniswap V4 trades through external DEX liquidity via Solidity hooks.

223|34|Updated Jan 30, 2026
One-click install
npx skills add https://github.com/Uniswap/uniswap-ai --skill aggregator-hook-creator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: aggregator-hook-creator
Source: https://github.com/Uniswap/uniswap-ai/tree/main/packages/plugins/uniswap-hooks/skills/aggregator-hook-creator
Command: npx skills add https://github.com/Uniswap/uniswap-ai --skill aggregator-hook-creator

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Uniswap V4 routing is typically limited to on-chain liquidity, which can lead to suboptimal execution in illiquid markets. Aggregator Hook Integration enables including external DEX liquidity sources (Curve, Balancer, Aerodrome, etc.) into Uniswap V4 routing to improve execution quality and access broader liquidity.

Core Features & Use Cases

  • Multi-protocol routing: Route trades via external liquidity sources and compare prices to choose the best path.
  • Fallback & split routing: Fall back to external liquidity when V4 pools lack depth, or split orders across venues for better execution.
  • Security-conscious design: Use pre-approved external calls, input validation, and safe external-call patterns.

Quick Start

Encode external routing actions via hookData to integrate Curve, Balancer, or Aerodrome liquidity and attach the hook to a Uniswap V4 pool.

Frequently Asked Questions about aggregator-hook-creator

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

FAQPage Schema
How do I integrate external DEX liquidity into Uniswap V4 routing?

To integrate external DEX liquidity into Uniswap V4 routing, you use Aggregator Hooks. These hooks route trades through external protocols like Curve, Balancer, and Aerodrome by encoding routing actions via hookData and attaching the hook to a V4 pool.

Can I split trades across Uniswap V4 and other DEXs for better execution?

Yes, you can split trades across Uniswap V4 and other DEXs. Aggregator Hooks enable split routing across multiple liquidity venues and provide fallback routing when V4 pools lack sufficient depth, improving overall execution quality.

What is a Uniswap V4 Aggregator Hook and when do I need one?

A Uniswap V4 Aggregator Hook is a Solidity-based architecture that routes trades through external liquidity sources. You need this hook when multi-protocol price comparison is required or when native V4 liquidity is insufficient for optimal execution.

How do I encode external routing actions in Uniswap V4 hookData?

You encode external routing actions in Uniswap V4 hookData by defining the specific parameters for protocols like Curve, Balancer, or Aerodrome. This data-encoded hookData is then used to instruct the Solidity-based hook on how to execute multi-protocol routing.

What security patterns are needed for Uniswap V4 hooks making external calls?

Security patterns for Uniswap V4 hooks making external calls require pre-approved external calls, strict input validation, and safe external-call patterns. These safety-conscious designs protect the Solidity-based hook architecture during multi-protocol routing.

Does Uniswap V4 aggregator routing work with Curve and Balancer pools?

Yes, Uniswap V4 aggregator routing works with Curve and Balancer pools. The Aggregator Hook Integration specifically supports routing trades through these external liquidity sources to access broader liquidity and improve execution in illiquid markets.