v3 Entities

Schema reference for the Uniswap v3 subgraph entities and their fields.

Entities define the schema of the subgraph, and represent the data that can be queried. Below is a reference for all entities in the Uniswap v3 subgraph.

To explore the schema interactively, visit the Graph Explorer. The full schema is available in the v3-subgraph repository.

Core Entities

Factory

Stores aggregate information across the entire Uniswap v3 protocol. There is one Factory entity per deployment.

FieldTypeDescription
idIDFactory contract address
poolCountBigIntTotal pools created
txCountBigIntAll-time transaction count
totalVolumeUSDBigDecimalAll-time volume in derived USD
totalVolumeETHBigDecimalAll-time volume in derived ETH
totalFeesUSDBigDecimalAll-time swap fees in USD
totalFeesETHBigDecimalAll-time swap fees in ETH
untrackedVolumeUSDBigDecimalAll-time volume including less reliable USD values
totalValueLockedUSDBigDecimalTVL in derived USD
totalValueLockedETHBigDecimalTVL in derived ETH
totalValueLockedUSDUntrackedBigDecimalTVL in USD (untracked)
totalValueLockedETHUntrackedBigDecimalTVL in ETH (untracked)
ownerIDCurrent owner of the factory

Token

Stores aggregated information for a specific token across all v3 pools.

FieldTypeDescription
idBytesToken contract address
symbolStringToken symbol
nameStringToken name
decimalsBigIntToken decimals
totalSupplyBigIntToken total supply
volumeBigDecimalAll-time volume in token units
volumeUSDBigDecimalAll-time volume in derived USD
untrackedVolumeUSDBigDecimalAll-time volume including less reliable USD values
feesUSDBigDecimalAll-time fees in USD
txCountBigIntTransaction count across all pools containing this token
poolCountBigIntNumber of pools containing this token
totalValueLockedBigDecimalLiquidity across all pools in token units
totalValueLockedUSDBigDecimalLiquidity across all pools in derived USD
totalValueLockedUSDUntrackedBigDecimalTVL in USD (untracked)
derivedETHBigDecimalDerived price in ETH
whitelistPools[Pool]Pools used for USD pricing

Pool

Individual pool state. Each pool is deployed as a separate contract in v3, identified by its contract address.

FieldTypeDescription
idBytesPool contract address
createdAtTimestampBigIntPool creation timestamp
createdAtBlockNumberBigIntPool creation block number
token0TokenReference to token0
token1TokenReference to token1
feeTierBigIntFee amount
liquidityBigIntIn-range liquidity
sqrtPriceBigIntCurrent price tracker
token0PriceBigDecimaltoken0 per token1
token1PriceBigDecimaltoken1 per token0
tickBigIntCurrent tick
observationIndexBigIntCurrent observation index
volumeToken0BigDecimalAll-time token0 swapped
volumeToken1BigDecimalAll-time token1 swapped
volumeUSDBigDecimalAll-time USD swapped
untrackedVolumeUSDBigDecimalAll-time USD swapped (unfiltered)
feesUSDBigDecimalAll-time fees in USD
txCountBigIntAll-time transaction count
collectedFeesToken0BigDecimalAll-time collected fees in token0
collectedFeesToken1BigDecimalAll-time collected fees in token1
collectedFeesUSDBigDecimalAll-time collected fees in derived USD
totalValueLockedToken0BigDecimalTotal token0 across all ticks
totalValueLockedToken1BigDecimalTotal token1 across all ticks
totalValueLockedETHBigDecimalTVL in derived ETH
totalValueLockedUSDBigDecimalTVL in USD
totalValueLockedUSDUntrackedBigDecimalTVL in USD (untracked)
liquidityProviderCountBigIntNumber of unique LPs

Tick

Stores information about individual ticks within a pool.

FieldTypeDescription
idIDPool address + tick index
poolAddressBytesPool address
tickIdxBigIntTick index
poolPoolReference to pool
liquidityGrossBigIntTotal liquidity at this tick (as lower or upper)
liquidityNetBigIntNet liquidity change when tick is crossed
price0BigDecimalCalculated price of token0 at this tick
price1BigDecimalCalculated price of token1 at this tick
createdAtTimestampBigIntCreation timestamp
createdAtBlockNumberBigIntCreation block number

Event Entities

Swap

Individual swap events.

FieldTypeDescription
idIDTransaction hash + "#" + index in swaps array
transactionTransactionReference to transaction
timestampBigIntSwap timestamp
poolPoolPool swap occurred within
token0TokenReference to token0
token1TokenReference to token1
senderBytesSwap sender
recipientBytesSwap recipient
originBytesEOA that initiated the transaction
amount0BigDecimalDelta of token0 swapped
amount1BigDecimalDelta of token1 swapped
amountUSDBigDecimalDerived USD amount
sqrtPriceX96BigIntPool sqrt price after the swap (Q64.96)
tickBigIntPool tick after the swap
logIndexBigIntEvent log index

Mint

Tracks liquidity additions to a position.

FieldTypeDescription
idIDTransaction hash + "#" + index
transactionTransactionReference to transaction
timestampBigIntEvent timestamp
poolPoolPool the position is within
token0TokenReference to token0
token1TokenReference to token1
ownerBytesOwner of the position
senderBytesAddress that minted the liquidity
originBytesEOA that initiated the transaction
amountBigIntAmount of liquidity minted
amount0BigDecimalAmount of token0 provided
amount1BigDecimalAmount of token1 provided
amountUSDBigDecimalDerived USD amount
tickLowerBigIntLower tick of the position
tickUpperBigIntUpper tick of the position
logIndexBigIntEvent log index

Burn

Tracks liquidity removals from a position.

FieldTypeDescription
idIDTransaction hash + "#" + index
transactionTransactionReference to transaction
poolPoolPool the position is within
token0TokenReference to token0
token1TokenReference to token1
timestampBigIntEvent timestamp
ownerBytesOwner of the position
originBytesEOA that initiated the transaction
amountBigIntAmount of liquidity burned
amount0BigDecimalAmount of token0 removed
amount1BigDecimalAmount of token1 removed
amountUSDBigDecimalDerived USD amount
tickLowerBigIntLower tick of the position
tickUpperBigIntUpper tick of the position
logIndexBigIntEvent log index

Collect

Tracks fee collection events on a position.

FieldTypeDescription
idIDTransaction hash + "#" + index
transactionTransactionReference to transaction
timestampBigIntEvent timestamp
poolPoolPool the collect occurred within
ownerBytesOwner of the position
amount0BigDecimalAmount of token0 collected
amount1BigDecimalAmount of token1 collected
amountUSDBigDecimalDerived USD amount
tickLowerBigIntLower tick of the position
tickUpperBigIntUpper tick of the position
logIndexBigIntEvent log index

Flash

Tracks flash loan events.

FieldTypeDescription
idIDTransaction hash + "-" + index
transactionTransactionReference to transaction
timestampBigIntEvent timestamp
poolPoolPool the flash occurred within
senderBytesFlash sender
recipientBytesFlash recipient
amount0BigDecimalAmount of token0 flashed
amount1BigDecimalAmount of token1 flashed
amountUSDBigDecimalDerived USD amount
amount0PaidBigDecimalAmount of token0 paid as fee
amount1PaidBigDecimalAmount of token1 paid as fee
logIndexBigIntEvent log index

Transaction

Stores Ethereum transaction data with references to all v3 events within it.

FieldTypeDescription
idIDTransaction hash
blockNumberBigIntBlock number
timestampBigIntConfirmation timestamp
gasUsedBigIntGas used
gasPriceBigIntGas price
mints[Mint]Derived mint events
burns[Burn]Derived burn events
swaps[Swap]Derived swap events
flashed[Flash]Derived flash events
collects[Collect]Derived collect events

Time-series Entities

UniswapDayData

Protocol-wide daily aggregated data.

FieldTypeDescription
idIDTimestamp rounded to day (timestamp / 86400)
dateIntUnix timestamp for start of day
volumeETHBigDecimalDaily volume in derived ETH
volumeUSDBigDecimalDaily volume in derived USD
volumeUSDUntrackedBigDecimalDaily volume in USD (untracked)
feesUSDBigDecimalDaily fees in USD
txCountBigIntDaily transaction count
tvlUSDBigDecimalTVL in USD at end of day

PoolDayData

Daily aggregated data per pool.

FieldTypeDescription
idIDTimestamp rounded to day
dateIntUnix timestamp for start of day
poolPoolReference to pool
liquidityBigIntIn-range liquidity at end of period
sqrtPriceBigIntPrice tracker at end of period
token0PriceBigDecimaltoken0 price derived from sqrtPrice
token1PriceBigDecimaltoken1 price derived from sqrtPrice
tickBigIntTick at end of period
tvlUSDBigDecimalTVL in USD at end of period
volumeToken0BigDecimalDaily volume in token0
volumeToken1BigDecimalDaily volume in token1
volumeUSDBigDecimalDaily volume in USD
feesUSDBigDecimalDaily fees in USD
txCountBigIntDaily transaction count
openBigDecimalOpening price of token0
highBigDecimalHigh price of token0
lowBigDecimalLow price of token0
closeBigDecimalClosing price of token0

PoolHourData

Hourly aggregated data per pool. Same fields as PoolDayData but with periodStartUnix instead of date.

TokenDayData

Daily aggregated data per token.

FieldTypeDescription
idIDToken address + day index
dateIntUnix timestamp for start of day
tokenTokenReference to token
volumeBigDecimalDaily volume in token units
volumeUSDBigDecimalDaily volume in derived USD
untrackedVolumeUSDBigDecimalDaily volume in USD (untracked)
totalValueLockedBigDecimalLiquidity in token units
totalValueLockedUSDBigDecimalLiquidity in derived USD
priceUSDBigDecimalPrice in USD at end of period
feesUSDBigDecimalDaily fees in USD
openBigDecimalOpening price in USD
highBigDecimalHigh price in USD
lowBigDecimalLow price in USD
closeBigDecimalClosing price in USD

TokenHourData

Hourly aggregated data per token. Same fields as TokenDayData but with periodStartUnix instead of date.

Utility Entities

Bundle

Global store of derived ETH price in USD, used for USD value derivations throughout the subgraph.

FieldTypeDescription
idIDConstant "1"
ethPriceUSDBigDecimalDerived price of ETH in USD based on stablecoin pools