Skip to content

enviodev/uniswap-v4-indexer

Repository files navigation

Uniswap V4 Indexer

Discord

A public, open-source multichain Uniswap V4 indexer built with Envio HyperIndex. Powers v4.xyz, the hub for Uniswap V4 data and hooks analytics.

Open to contributions.

v4.xyz Dashboard

What This Indexes

This indexer tracks all key events from Uniswap V4 PoolManager and PositionManager contracts across multiple chains:

Events indexed:

  • Initialize - pool creation with fee, tick spacing, and hooks
  • Swap - all swaps with amounts, price, liquidity, and transaction details
  • ModifyLiquidity - liquidity additions and removals
  • Donate - donations to pools
  • Transfer / Approval - ERC-6909 token transfers and approvals

Chains: Ethereum, Optimism, Base, Arbitrum, Polygon, Blast, Zora, Avalanche, BNB Chain, Unichain, World Chain, Soneium, Ink, Linea, Celo

What's Indexed

The GraphQL API exposes pool statistics, swap history, liquidity positions, and ERC-6909 token data across all supported chains. You can use this to power analytics dashboards, trading interfaces, liquidity trackers, hook monitors, and cross-chain Uniswap V4 data aggregations.

Prerequisites

Quick Start

# Install dependencies
pnpm i

# Run locally (starts indexer + GraphQL API at http://localhost:8080)
pnpm envio dev

The Hasura console is available at http://localhost:8080 where you can explore and query indexed data using GraphQL.

Regenerate Files

If you modify config.yaml or schema.graphql:

pnpm codegen

RPC Configuration

RPC endpoints for each chain can be customized via environment variables prefixed with ENVIO_. See .env.example for the full list:

ENVIO_MAINNET_RPC_URL=https://your-mainnet-node
ENVIO_ARBITRUM_RPC_URL=https://your-arbitrum-node

Querying the Data

Once running, query the GraphQL API to explore pool and swap data:

{
  Pool(limit: 10, order_by: {volumeUSD: desc}) {
    id
    token0 { symbol }
    token1 { symbol }
    volumeUSD
    totalValueLockedUSD
  }
}

Built With

Documentation

Contributing

This indexer is open to contributions. Open an issue or pull request on GitHub.

Support

About

Fast Multichain Uniswap V4 Indexer - open to contributions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors