Uniswap V3 Liquidity Distribution

Description

This dataset contains the liquidity distribution of all Uniswap V3 pools on Ethereum mainnet with TVL above $100k (as of the time of collection). Each file contains the snapshots of liquidity distribution in 1000 block intervals as well as the current ticks at the sampled blocks. Only 100 ticks above and below the current tick are stored. These datasets can be used to reproduce the liquidity charts from the Uniswap analytics page.

Additionally, there is a standalone utility dataset with all of the pools' details (such as the tokens within the pool, their decimals, or the fee charged by the pool).

Collection method

The initial list of top Uniswap V3 pools was fetched from the defillama API. Next, each pool's details were fetched with onchain calls to the appropriate smart contracts. The reconstruction of available liquidity over time was possible by listening to all the historical mint and burn events emitted by the pools. Finally, the raw event data was parsed into an easy-to-understand format.

Schema

Pools data

  • address: the address of the pool's smart contract

  • tick_spacing: tick spacing

  • token0: symbol of the first token in the pool

  • token1: symbol of the second token in the pool

  • decimals0: decimals of the first token in the pool

  • decimals1: decimals of the second token in the pool

  • fee: swap fee charged by the pool

  • token0_address: address of the first token

  • token1_address: address of the second token

  • chain: which chain the pool is deployed on (ethereum)

  • pool_type: what's the pool type (Uniswap V3)

Pool liquidity

  • block_number: block number of the snapshot

  • in_token: token to swap from

  • out_token: token to swap out to

  • price: price at a given tick (quoted in in_token/out_token)

  • amount: the amount of out_token available to be taken out of the tick

  • tick_id: tick id

Current ticks

  • current_tick: current tick of the pool

  • block_number: block number of the snapshot

Potential Use Cases

  • Liquidity Provision management

  • Price prediction

Use example

from giza_datasets import DatasetsLoader

# Usage example:
loader = DatasetsLoader()

liquidity_df = loader.load('uniswapv3-ethereum-usdc-weth-500-liquidity-snapshots')
ticks_df = loader.load('uniswapv3-ethereum-usdc-weth-500-current-ticks')
pools_info_df = loader.load('uniswapv3-ethereum-pools-info')

liquidity_df.head()
ticks_df.head()
pools_info_df.head()

Last updated