DEX dataUniswap v4SlippageAPI guide

Uniswap v4 slippage & price impact, and why the v3 formula breaks and how to get real data via API

Uniswap v4 moved every pool into a single PoolManager and opened them up to hooks. The constant-product math that used to estimate slippage no longer maps to a single market. Here's why, and how to read real per-pool slippage and price impact straight from the chain.

At a glance
Uniswap v4 broke the assumption every slippage estimator relied on: that a token pair maps to one pool with one curve. v4 holds all pools inside a single PoolManager and lets hooks rewrite swap economics, so the same two tokens now span many markets, each with its own depth and price impact. The fix is to read slippage per PoolId, the way the protocol actually partitions state. Bitquery's DEXPoolSlippages API does exactly that, in real time, across every EVM chain.
1
PoolManager holds every v4 pool's state
Hooks configs → many pools per token pair
PoolId
The only identifier that isolates one market
Real-time
Per-pool slippage via DEXPoolSlippages

01 · The breakWhy v3 slippage math stops working on v4

For years, estimating slippage on Uniswap was a solved problem. A pair like WETH/USDC mapped to a single pool contract (v2) or a handful of fee-tier pools (v3). You pulled the reserves or the tick liquidity for that contract address, applied the constant-product or concentrated-liquidity formula, and out came a price-impact curve. Every aggregator, bot, and analytics dashboard leaned on that one-to-one relationship: one pair → one contract → one curve.

Uniswap v4 dissolved that relationship. There is no longer a pool contract to point at, and "the WETH/USDC pool" is no longer a single thing. If your slippage logic still assumes it is, it now returns a blended number that doesn't describe any market you can actually trade against.

What used to work, and why it now misleadsthe one-pair-one-curve assumption
1
Find the pool contract
v2/v3: a token pair resolved to a specific pool contract address you could read reserves from.
2
Apply the AMM formula
Constant-product (v2) or concentrated-tick math (v3) turned those reserves into a clean price-impact curve.
3
On v4, the address is shared
Every pool reports the same PoolManager address, so 'filter by the pair' silently merges many different markets into one wrong curve.
The math itself isn't wrong. The input is: on v4 there is no single contract whose reserves describe "the pair," so the formula is fed an average of pools you never intended to trade.

02 · The causeSingleton + hooks: one contract, many pools

Two design changes in v4 are responsible.

The singleton. In v2 and v3, each pool was its own deployed contract. In v4, almost all pool state lives inside one PoolManager contract at 0x000000000004444c5dc75cB358380D2e3dE08A90 on Ethereum mainnet. The protocol does not deploy a contract per pair. Instead, each logical pool is a row of state keyed by a deterministic identifier: the PoolId.

Hooks. PoolId is derived from the pool's static configuration: the two currencies, the fee tier, the tick spacing, and crucially the hooks contract. Hooks are v4's extension point: custom code invoked around swaps and liquidity changes that can apply dynamic fees or otherwise alter execution. Two pools with the same two tokens and the same fee still produce different PoolIds and separate liquidity curves if their hooks differ.

Why 'filter by the pair' over-reports liquidity on v4ETH/USDC · what each filter actually returns
Filter by pair / manager address
fee 500, no hooksmerged
fee 3000, no hooksmerged
fee 3000, dynamic-fee hookmerged
fee 3000, hook Bmerged
Filter by PoolId
The one market you tradeisolated
Everything else excluded0%
Filtering by token addresses or by the shared PoolManager address merges every fee tier and hook configuration into one curve. Only PoolId returns the depth of the single market you route through.

03 · The distinction

Price impact vs slippage: what you're actually measuring

These two terms get used interchangeably and shouldn't be:

  • Price impact is the price movement your own trade causes against the pool's liquidity. A $100k swap into a thin pool moves the price more than the same swap into a deep one. It's a deterministic function of trade size and pool depth.
  • Slippage is the gap between the price you expected when you submitted and the price you got at execution. It includes price impact plus anything that changed between quote and fill.

On v4, both depend on reading the right pool. A dynamic-fee hook can change the effective cost of the same swap from one block to the next, so a static formula over merged liquidity mis-estimates both numbers. You want the depth and price table of one PoolId, refreshed as the pool changes.

04 · The fix

Reading real per-pool slippage with DEXPoolSlippages

Bitquery indexes DEX pool state into a DEXPools cube, exposed through two schema entries: DEXPoolEvents (swaps, mints, burns) and DEXPoolSlippages (slippage and price-impact tables). The slippage stream simulates swaps through the pool's initialized ticks and returns, per pool:

  • MaxAmountIn is the largest amount you can swap in at a given tolerance
  • MinAmountOut is the guaranteed minimum output at that level
  • Price is the average execution price for that trade size
  • SlippageBasisPoints is the tolerance the row is computed for
  • both swap directions, AtoB and BtoA

Every row carries Pool.PoolId, so you isolate one v4 market instead of blending all of them. Run this query in the Bitquery IDE.

query LatestSlippageForOneV4Pool {
  EVM(network: eth) {
    DEXPoolSlippages(
      where: {
        Price: {
          Pool: {
            PoolId: {
              is: "0xdce6394339af00981949f5f3baf27e3610c76326a700af57e4b3e3ae4977f78d"
            }
          }
          Dex: { ProtocolName: { is: "uniswap_v4" } }
        }
      }
      orderBy: { descending: Block_Time }
      limit: { count: 10 }
    ) {
      Price {
        AtoB {
          Price
          MinAmountOut
          MaxAmountIn
        }
        BtoA {
          Price
          MinAmountOut
          MaxAmountIn
        }
        Pool {
          PoolId
          CurrencyA {
            Symbol
            SmartContract
          }
          CurrencyB {
            Symbol
            SmartContract
          }
        }
        Dex {
          ProtocolName
          ProtocolVersion
        }
        SlippageBasisPoints
      }
      Block {
        Time
        Number
      }
    }
  }
}

Swap the PoolId for the market you route through and you get its real price-impact table, not an average of every ETH/USDC configuration sharing the manager address.

05 · In practice

Slippage scales with trade size. Read the whole curve.

The reason per-pool accuracy matters: each slippage tolerance maps to a different maximum trade size, and price impact is non-linear. Pulling DEXPoolSlippages for this exact ETH/USDC v4 pool at block 25,350,531 (mid price ≈ 1,694 USDC/ETH) gives the real ladder for selling ETH into USDC:

Max ETH→USDC swap at each slippage tolerance: real pool dataETH → USDC · Uniswap v4 · block 25,350,531
0.1% tolerance213.7 ETH in · avg 1,688 USDC/ETH (−0.35%)
$0.36M
0.5% tolerance1,023.8 ETH in · avg 1,680 USDC/ETH (−0.84%)
$1.71M
1% tolerance2,042.2 ETH in · avg 1,669 USDC/ETH (−1.48%)
$3.40M
2% tolerance4,142.0 ETH in · avg 1,644 USDC/ETH (−2.97%)
$6.79M
5% tolerance10,655.5 ETH in · avg 1,587 USDC/ETH (−6.36%)
$16.86M
10% tolerance22,333.2 ETH in · avg 1,514 USDC/ETH (−10.65%)
$33.71M
Each row is one SlippageBasisPoints level from DEXPoolSlippages for PoolId 0xdce6394339af00981949f5f3baf27e3610c76326a700af57e4b3e3ae4977f78d. value is the MinAmountOut in USDC (the guaranteed proceeds); the average execution price drifts further below the 1,694 mid as the order grows. Loosening tolerance from 0.1% to 10% unlocks roughly 90× more size, and the reverse direction (USDC→ETH) comes back on the same row via BtoA. Read it per PoolId and you size orders against real depth instead of guessing a tolerance.

06 · LiveStream slippage as the pool changes

Because hooks and liquidity events move the curve, a static snapshot ages fast. The same cube streams in real time. Subscribe once and every swap or ModifyLiquidity event refreshes the slippage table across all Uniswap v4 pools. Open this subscription in the Bitquery IDE.

subscription RealtimeSlippage {
  EVM(network: eth) {
    DEXPoolSlippages(
      where: { Price: { Dex: { ProtocolName: { is: "uniswap_v4" } } } }
    ) {
      Price {
        AtoB {
          Price
          MinAmountOut
          MaxAmountIn
        }
        BtoA {
          Price
          MinAmountOut
          MaxAmountIn
        }
        Pool {
          PoolId
          SmartContract
        }
        Dex {
          ProtocolName
          ProtocolFamily
          ProtocolVersion
        }
        SlippageBasisPoints
      }
      Block {
        Time
        Number
      }
    }
  }
}

The same data is available over Kafka streams for high-throughput pipelines, and across EVM chains. Change network to base, bsc, arbitrum, matic, and the rest.

07 · Read backwardThe full picture, end to end

One pair fans out across the singleton, and only PoolId narrows it backETH/USDC · v4 state model
Token pair in
ETH / USDC
one pair, one trading intent
0x000000000004444c5dc75cB358380D2e3dE08A90
PoolManager · singleton
Fans out into
many pools
fee tiers × hooks → many PoolIds
1
manager contract holds every pool
N
PoolIds per token pair
PoolId
isolates the one market you trade
DEXPoolSlippages
real per-pool price-impact curve
A token pair flows into the singleton PoolManager, where it fans out into many pools across fee tiers and hooks. Filtering by pair or manager address collapses them into one wrong curve; filtering by PoolId returns the real per-pool slippage of the single market you trade.

08 · Who needs this

Where accurate v4 slippage actually pays off

Tier 1Aggregators & execution / routing infra
Per-pool slippage is the routing input. v4's hook fragmentation makes "which pool gives best execution" harder, so PoolId-level price tables are the answer, consumed in real time at volume.
Tier 2Trading firms, MEV & arb desks
Sizing orders, routing, and detecting toxic flow all need realized price impact per pool. Dynamic-fee hooks make slippage non-obvious, so it can no longer be derived from a constant-product formula.
Tier 3Quant funds & market makers
Backtesting and live execution-quality monitoring need historical slippage curves by pool and size, where archival depth beats a self-run v4 indexer.
Tier 4Analytics, risk & LP tools
Picks-and-shovels platforms that want to show price impact and pool health without indexing v4's singleton + hooks themselves.
What made this possible

One API for real per-pool v4 slippage

The DEXPoolSlippages cube simulates swaps through each pool's ticks and returns MaxAmountIn, MinAmountOut, and average execution price at every tolerance level. Each row is keyed by PoolId so v4's singleton never blends markets. Access it over GraphQL query, real-time subscription, and Kafka, across every major EVM chain.

DEXPoolSlippagesPoolId isolationuniswap_v4 filterAtoB / BtoA price impactSlippageBasisPoints ladderKafka streams

09 · Start hereDocs & queries

DocsEVM DEX Slippage & Price Impact API
The DEXPoolSlippages reference, with real-time and per-pool queries for Uniswap v2, v3 and v4: docs.bitquery.io/docs/blockchain/Ethereum/dextrades/ethereum-slippage-api.
DocsUniswap v4 Pool Liquidity (PoolId)
Why pair-only filtering is insufficient on v4 and how to isolate one market with PoolId: docs.bitquery.io/docs/blockchain/Ethereum/dextrades/uniswap-v4-liquidity-api.
DocsUniswap v4 Trades API
Per-swap v4 trade data with trader, token and market context: docs.bitquery.io/docs/blockchain/Ethereum/dextrades/uniswap-v4-api.
DocsDEXPools cube + Slippage FAQ
How the price tables are built, plus a developer FAQ on calculating necessary slippage before a swap: DEXPools cube · Slippage FAQ.

Get real Uniswap v4 slippage, per pool, in real time

Stop estimating v4 slippage from a formula that assumes one pool per pair. Read the real price-impact table for the exact PoolId you route through, over query, subscription, or Kafka, across every EVM chain.

Legal disclaimer

This article is provided for informational and educational purposes only. Code samples reflect Bitquery's GraphQL schema as of the date indicated and may change; consult the linked documentation for the current API.

Numeric examples of slippage and price impact (trade-size curves, execution prices, percentage figures) are illustrative and intended to explain how price impact scales with trade size against pool depth. They are not quotes, financial advice, or a guarantee of execution at any price. Always read live data for the specific PoolId you intend to trade.

References to Uniswap v4 architecture (PoolManager address, PoolId derivation, hooks) describe the protocol's public design. 'Uniswap' and other product names are the property of their respective owners; this content is independent and not affiliated with or endorsed by Uniswap Labs.