Skip to main content

Token

Entity to stores the metadata and token level metrics for a token present in any of the pools.

Schema

FieldTypederivedFromDescription
idID!Token Contract Address
symbolString!Token Symbol
nameString!Token Name
decimalsBigInt!No. of decimals in the token value
totalSupplyBigInt!Total supply of the token
volumeBigDecimal!Total token volume traded in swaps
volumeUSDBigDecimal!Total token value traded in swaps in USD
untrackedVolumeUSDBigDecimal!Total token value traded in USD, including pools with unreliable USD values
feesUSDBigDecimal!Amount of Fees taken from token swaps in derived in USD
txCountBigInt!No. of transactions across all pools that include this token
poolCountBigInt!No. of pools containing this token
totalValueLockedBigDecimal!Liquidity across all pools for the token
totalValueLockedUSDBigDecimal!Liquidity across all pools for the token in terms of USD value
totalValueLockedUSDUntrackedBigDecimal!Liquidity across all pools (including pools with unreliable USD values) for the token in terms of USD value
derivedETHBigDecimal!Price of token relative to ETH
whitelistPools[Pool!]!Pool entities which can can be used for reliable USD pricing of the token
tokenDayData[TokenDayData!]!@derivedFrom(field: "token")Link to daily stats for the token

Referencing Functions

FunctionNameCreateReadUpdateSave
sqrtPriceX96ToTokenPrices()
findEthPerToken()
getTrackedAmountUSD()
updateTokenDayData()
updateTokenHourData()
handleInitialize()
✅*
handleMint()
handleBurn()
handleSwap()
✅*
handlePoolCreated()
handleIncreaseLiquidity()
handleDecreaseLiquidity()
handleCollect()
populateToken()*
populateEmptyPools()*

* -> Different across chains