uniswap-v4-expert

uniswap-v4-expert is an agent for Claude Code from ccashwell/evm-cortex. It costs 28 tokens per session (1,742 once invoked), scanned A, original, MIT.

An expert guide to Uniswap V4, a decentralized exchange protocol for trading and providing liquidity on blockchain networks. It covers the shared PoolManager, temporary balance tracking, hooks, position NFTs, fees, and production integrations.

In plain words
What is it for?
Use it to design or review V4 integrations involving pools, hooks, liquidity positions, custom accounting, fee systems, routers, and deployed contract addresses.
Why use it?
Uniswap V4 has several protocol-specific components that must work together, and mistakes in integration can cause incorrect swaps, liquidity changes, or fees.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter.

Good fit Use it to design or review V4 integrations involving pools, hooks, liquidity positions, custom accounting, fee systems, routers, and deployed contract addresses.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/ccashwell/evm-cortex/uniswap-v4-expert
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/ccashwell/evm-cortex

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for uniswap-v4-expert

README.md
[![agentmods](https://agentmods.dev/badge/agents/ccashwell/evm-cortex/uniswap-v4-expert.svg)](https://agentmods.dev/agents/ccashwell/evm-cortex/uniswap-v4-expert)
Your own site
<a href="https://agentmods.dev/agents/ccashwell/evm-cortex/uniswap-v4-expert"><img src="https://agentmods.dev/badge/agents/ccashwell/evm-cortex/uniswap-v4-expert.svg" alt="Measured on agentmods" height="20"></a>
Per session 28 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,742 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00028 $0.01742
Opus 5 $0.00014 $0.00871
Sonnet 5 $0.00006 $0.00348
Haiku 4.5 $0.00003 $0.00174

Measured 8d ago against content hash ec76329cabd2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

uniswap-v4-expert scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/uniswap-v4-expert.md · 151 lines

How it starts

The opening of the file, as written. The whole thing — 151 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Uniswap V4 Expert

You are the definitive authority on Uniswap V4 protocol architecture, integration patterns, and production deployment. You understand every aspect of the V4 system from the singleton PoolManager through flash accounting, the hook lifecycle, the PositionManager periphery, and the UniversalRouter. You write code that integrates with the real, deployed Uniswap V4 contracts.

Expertise

  • PoolManager singleton — all pool state in one contract, pool identification via PoolKey/PoolId
  • Flash accounting — EIP-1153 transient storage, delta tracking, settle/take pattern, unlock/unlockCallback flow
  • Hook system — all 14 permission flags, 10 callback functions, return-delta mechanics, address mining via CREATE2
  • PositionManager — ERC-721 position NFTs, modifyLiquidities entry point, 24 action codes, subscriber notifications
  • Currency type — address(0) for native ETH, no WETH wrapping required
  • Fee system — static fees (hundredths of bps), dynamic fees via LPFeeLibrary, OVERRIDE_FEE_FLAG, protocol fees
  • Custom accounting — hooks that modify swap/liquidity deltas, custom curves, hook-collected fees
  • Production deployments — addresses across 17+ chains, chain-specific verification
  • UniversalRouter — V4 swap routing, multi-protocol batching (V3+V4), permit2 integration

Production Deployment Addresses

Ethereum PoolManager:     0x000000000004444c5dc75cb358380d2e3de08a90
Ethereum UniversalRouter: 0x66a9893cC07D91D95644AEDD05D03f95e1dBA8Af

Deployed on: Ethereum, Unichain, Optimism, Base, Arbitrum One, Polygon, Blast, Zora, Worldchain, Ink, Soneium, Avalanche, BNB, Celo, Monad, MegaETH, Tempo.

CRITICAL: Addresses differ per chain. Always verify with cast code <address> --rpc-url <chain_rpc>.

Core Architecture

Singleton + Flash Accounting Flow

Caller → unlock(data) → PoolManager stores locker
  → unlockCallback(data) → caller performs operations:
    - swap()        → updates currency deltas
    - modifyLiquidity() → updates currency deltas
    - donate()      → updates currency deltas
    - take()        → transfers tokens OUT of PM, increases caller's debt
    - settle()      → caller transfers tokens IN, reduces caller's debt
    - mint()/burn() → ERC-6909 claim token operations
    - sync()        → sync PM balance with actual token balance
  → return to PM → verify all deltas == 0 → unlock complete

Read the full file on GitHub · 151 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 151 lines · 28 tokens per session scan A ec76329cabd2

Subscribe to this mod's changes

uniswap-v4-expert is an agent published in the GitHub repository ccashwell/evm-cortex (128 stars, last pushed yesterday), licensed MIT. It adds 28 tokens to every session and 1,742 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

mobile-engineer

React Native and Expo specialist for building Solana mobile dApps. Handles mobile wallet adapter integration, transaction signing UX, deep linking, and mobile-specific performance optimization. Use when: Building React Native or Expo mobile apps with Solana integration, implementing mobile wallet adapter flows…

solanabr/solana-ai-kit · 72 tokens

chainaware-token-launch-auditor

Audits a new token launch for launchpads by combining rug pull detection on the contract with fraud and behavioral analysis on the deployer wallet. Returns a composite Launch Safety Score, a APPROVED / CONDITIONAL / REJECTED listing verdict, a public-facing safety badge, and specific conditions the launchpad should…

ChainAware/behavioral-prediction-mcp · 247 tokens

stellar-contracts

Rust smart contracts on Soroban — storage patterns, auth, WASM compilation, testnet/mainnet deploys.

rylsherdamz-rgb/stellar-forge · 26 tokens

Blockchain Security Auditor

Expert smart contract security auditor specializing in vulnerability detection, formal verification, exploit analysis, and comprehensive audit report writing for DeFi protocols and blockchain applications.

criptogus/agent-evolve-network · 33 tokens

token-economics-designer

Token economics and tier design specialist. Use when designing pricing models, access tiers, or token distribution strategies.

Matt-Dionis/claude-code-configs · 28 tokens

agent-organizer

A highly advanced AI agent that functions as a master orchestrator for complex, multi-agent tasks. It analyzes project requirements, defines a team of specialized AI agents, and manages their collaborative workflow to achieve project goals. Use PROACTIVELY for comprehensive project analysis, strategic agent team…

qdhenry/Claude-Command-Suite · 66 tokens