Skip to main content

Pool

Entity to store a pool's metadata, current & lifetime metrics and links to events and hourly/daily metrics and references to it's tick entities.

Schema

FieldTypederivedFromDescriptionField Missing
idID!Pool Contract Address
createdAtTimestampBigInt!BlockTime where the pool was created
createdAtBlockNumberBigInt!Block Number where the pool was created
token0Token!Token entity for token0
token1Token!Token entity for token1
feeTierBigInt!The percentage of token taken as fee in terms of basis points
liquidityBigInt!Liquidity in the currently active tick range
sqrtPriceBigInt!The current token pair price tracked in square root & Q96 format
feeGrowthGlobal0X128BigInt!The total fee in token0 per unit of liquidity collected by the poolarbitrum-one
feeGrowthGlobal1X128BigInt!The total fee in token1 per unit of liquidity collected by the poolarbitrum-one
token0PriceBigDecimal!Price of token0 in terms of token1
token1PriceBigDecimal!Price of token1 in terms of token0
tickBigIntThe current active tick
observationIndexBigInt!The current observation index (used to record historic prices)
volumeToken0BigDecimal!Total volume of token0 swapped in the pool
volumeToken1BigDecimal!Total volume of token1 swapped in the pool
volumeUSDBigDecimal!Total volume swapped in the pool in USD value
untrackedVolumeUSDBigDecimal!Total volume swapped in the pool (including values for unreliable USD pools) in USD value
feesUSDBigDecimal!Total fee collected in USD value
txCountBigInt!Total no. of transactions in the pool
collectedFeesToken0BigDecimal!Total amount of token0 fee collected
collectedFeesToken1BigDecimal!Total amount of token1 fee collected
collectedFeesUSDBigDecimal!Total amount of fee collected in USD value
totalValueLockedToken0BigDecimal!Total amount of token0 locked across all ticks in the pool
totalValueLockedToken1BigDecimal!Total amount of token1 locked across all ticks in the pool
totalValueLockedETHBigDecimal!Total value locked in the pool in ETH value
totalValueLockedUSDBigDecimal!Total value locked in the pool in USD value
totalValueLockedUSDUntrackedBigDecimal!Total value locked in the pool (including tokens with unreliable USD values) in USD value
liquidityProviderCountBigInt!Used for detecting new exchanges. (Currently not updated Anywhere)
poolHourData[PoolHourData!]!@derivedFrom(field: "pool")Hourly Snapshots of Pool's data
poolDayData[PoolDayData!]!@derivedFrom(field: "pool")Daily Snapshots of Pool's data
mints[Mint!]!@derivedFrom(field: "pool")Mint Events emitted from the Pool
burns[Burn!]!@derivedFrom(field: "pool")Burn Events emitted from the Pool
swaps[Swap!]!@derivedFrom(field: "pool")Swap Events emitted from the Pool
collects[Collect!]!@derivedFrom(field: "pool")Collect Events emitted from the Pool
ticks[Tick!]!@derivedFrom(field: "pool")Tick entities respresenting the Pool liquidity

Referencing Functions

FunctionNameCreateReadUpdateSave
handlePoolCreated()
updatePoolDayData()
updatePoolHourData()
getEthPriceInUSD()
findEthPerToken()
handleInitialize()
✅*
handleMint()
handleBurn()
handleSwap()
handleFlash()
populateEmptyPools()*

* -> Different across chains