Skip to main content

Entities

Entities for the Exchange subgraph are all listed below.

Factory

FieldTypeDescription
idIDfactory address
volumeUSDBigDecimalall time volume across pairs stored as a derived amount of USD
volumeETHBigDecimalall time volume across pairs stored as a derived amount of ETH
untrackedVolumeUSDBigDecimalall time untracked volume across pairs stored as a derived amount of USD
liquidityUSDBigDecimalall time liquidity across pairs stored as a derived amount of USD
liquidityETHBigDecimalall time liquidity across pairs stored as a derived amount of ETH
txCountBigIntall time transaction count
tokenCountBigInttoken count
pairCountBigIntpair count
userCountBigIntuser count
pairs[Pairs]array of pair ids
tokens[Token]array of tokens
hourData[HourData]array of hour data
dayData[DayData]array of day data

Token

FieldTypeDescription
idIDtoken address
factoryFactoryfactory
symbolStringtoken symbol
nameStringtoken name
decimalsBigInttoken decimals
totalSupplyBigInttotal supply of token
volumeBigDecimalamount of token traded all time across all pairs
volumeUSDBigDecimalamount of token traded all time across all pairs stored as a derived amount of USD
untrackedVolumeUSDBigDecimalall time untracked volume across all pairs stored as a derived amount of USD
txCountBigIntall time transaction count of token across all pairs
liquidityBigDecimalamount of token provided as liquidity across all pairs
derivedETHBigDecimalETH per token
whitelistPairs[Pair]array of whitelisted pairs
hourData[TokenHourData]array of token hour data
dayData[TokenDayData]array of token day data
basePairs[Pair]array of base pairs
quotePairs[Pair]array of quote pairs
basePairsDayData[PairDayData]array of hour data
quotePairsDayData[PairDayData]array of day data

Pair

FieldTypeDescription
idIDpair address
factoryFactoryfactory
nameStringpair name
token0Tokenreference to token0 stored in pair contract
token1Tokenreference to token1 stored in pair contract
reserve0BigDecimalreserve of token0
reserve1BigDecimalreserve of token1
totalSupplyBigDecimaltotal supply of liquidity token distributed to liquidity providers
reserveETHBigDecimaltotal liquidity in pair stored as amount of ETH
reserveUSDBigDecimaltotal liquidity in pair stored as amount of USD
trackedReserveETHBigDecimalused for separating per pair reserves and global
token0PriceBigDecimaltoken0 per token1
token1PriceBigDecimaltoken1 per token0
volumeToken0BigDecimalamount of token0 swapped on this pair
volumeToken1BigDecimalamount of token1 swapped on this pair
volumeUSDBigDecimalall time volume on this pair stored as a derived amount of USD
untrackedVolumeUSDBigDecimalall time untracked volume on this pair stored as a derived amount of USD
txCountBigIntall time transaction count on this pair
liquidityProviderCountBigIntliquidity provider count for this pair
liquidityPositions[LiquidityPosition]array of liquidity positions
liquidityPositionSnapshots[LiquidityProvisionSnapshot]array of snapshots
dayData[PairDayData]pair day data
hourData[PairHourData]pair hour data
mints[Mint]array of mints for pair
burns[Burn]array of burns for pair
swaps[Swap]array of swaps for pair
timestampBigInttimestamp
blockBigIntblock contract was created at

User

A user entity is created for any unknown address that provides liquidity to a pool on Nevellus. It can be used to track active liquidity positions and all time value in USD of swaps performed by the user.

FieldTypeDescription
idIDuser address
liquidityPositions[LiquidityPosition]array of active liquidity positions

LiquidityPosition

FieldTypeDescription
idIDpair address
userUseruser reference
pairPairpair reference
liquidityTokenBalanceBigDecimalamount of liquidity token
snapshots[LiquidityPositionSnapshot]array of liquidity position snapshots
blockIntblock
timestampInttimestamp

LiquidityPositionSnapshot

FieldTypeDescription
idIDid
liquidityPositionLiquidityPositionliquidity position
timestampInttimestamp for quick historical lookups
blockIntblock number for quick historical lookups
userUseruser
pairPairpair
token0PriceUSDBigDecimaltoken0 price in USD
token1PriceUSDBigDecimaltoken1 price in USD
reserve0BigDecimalsnapshot of pair token0 reserves
reserve1BigDecimalsnapshot of pair token1 reserves
reserveUSDBigDecimalsnapshot of pair reserves in USD
liquidityTokenTotalSupplyBigDecimalsnapshot of pool's token supply
liquidityTokenBalanceBigDecimalsnapshot of user's pool token balance

Transaction

FieldTypeDescription
idIDtransaction hash
blockNumberBigIntblock transaction was mined
timestampBigInttimestamp transaction was created
mints[Mint]array of Mint events
burns[Burn]array of Burn events
swaps[Swap]array of Swap events

Mint

FieldTypeDescription
idIDtransaction hash, a hyphen and the index in the transaction mint array, concatenated
transactionTransactionreference to transaction
timestampBigInttimestamp mint was created
pairPairreference to pair
toBytesaddress of recipient
liquidityBigDecimalamount of liquidity tokens minted
senderBytesaddress of initiator
amount0BigDecimalamount of token0
amount1BigDecimalamount of token1
logIndexBigIntindex in the transaction event that was emitted
amountUSDBigDecimalvalue of token0 and token1 in USD
feeToBytesaddress of fee recipient
feeLiquidityBigDecimalamount of liquidity sent to fee recipient

Burn

FieldTypeDescription
idIDtransaction hash, a hyphen and the index in the transaction burn array, concatenated
transactionTransactionreference to transaction
timestampBigInttimestamp burn was created
pairPairreference to pair
toBytesaddress of recipient
liquidityBigDecimalamount of liquidity tokens burned
senderBytesaddress of initiator
amount0BigDecimalamount of token0 burned
amount1BigDecimalamount of token1 burned
logIndexBigIntindex in the transaction event that was emitted
amountUSDBigDecimalvalue of token0 and token1 in USD
completeBooleanfalse in ETH case
feeToBytesaddress of fee recipient
feeLiquidityBigDecimalamount of liquidity sent to fee recipient

Swap

FieldTypeDescription
idIDtransaction hash, a hyphen and the index in the transaction burn array, concatenated
transactionTransactionreference to transaction
timestampBigInttimestamp swap was created
pairPairreference to pair
senderBytesaddress of initiator
amount0InBigDecimalamount of token0 to swap
amount1InBigDecimalamount of token1 to swap
amount0OutBigDecimalamount of token0 received
amount1OutBigDecimalamount of token1 received
toBytesaddress of recipient
logIndexBigIntindex in the transaction event that was emitted
amountUSDBigDecimalvalue of token0 and token1 in USD

Bundle

FieldTypeDescription
idIDtransaction hash, a hyphen and the index in the transaction burn array, concatenated
ethPriceBigDecimalprice of ETH in USD

DayData

Combined pair data aggregated daily.

FieldTypeDescription
idIDunix timestamp for the start of the day / 86400
factoryFactoryfactory
dateIntunix timestamp for the start of the day
volumeETHBigDecimalvolume across all pairs stored as a derived amount of ETH
volumeUSDBigDecimalvolume across all pairs stored as a derived amount of USD
untrackedVolumeBigDecimaluntracked volume across all pairs
liquidityETHBigDecimaltotal liquidity across all pairs stored as a derived amount of ETH
liquidityUSDBigDecimaltotal liquidity across all pairs stored as a derived amount of USD
txCountBigInttotal number of transactions

HourData

FieldTypeDescription
idIDunix timestamp for the start of hour
factoryFactoryfactory
dateIntunix timestamp for the start of the day
volumeETHBigDecimalvolume across all pairs stored as a derived amount of ETH
volumeUSDBigDecimalvolume across all pairs stored as a derived amount of USD
untrackedVolumeBigDecimaluntracked volume across all pairs
liquidityETHBigDecimaltotal liquidity across all pairs stored as a derived amount of ETH
liquidityUSDBigDecimaltotal liquidity across all pairs stored as a derived amount of USD
txCountBigInttotal number of transactions

PairDayData

Pair data aggreated daily.

FieldTypeDescription
idIDpair address concatenated with day id (unix timestamp for the start of the day / 86400)
dateIntunix timestamp for the start of the day
pairAddressBytespair address
token0Tokentoken0 reference
token1Tokentoken1 reference
reserveUSDBigDecimalreserve of token0 and token1 as the derived amount of USD
volumeToken0BigDecimalamount of token0 swapped
volumeToken1BigDecimalamount of token1 swapped
volumeUSDBigDecimalvolume of pairs as the derived amount of USD
txCountBigIntamount of transactions on pair

TokenDayData

Token data across related pairs aggregated daily.

FieldTypeDescription
idIDpair address concatenated with day id (unix timestamp for the start of the day / 86400)
dateIntunix timestamp for the start of the day
tokenTokentoken reference
volumeBigDecimalamount of token swapped across related pairs
volumeETHBigDecimalamount of token swapped across related pairs stored as a derived amount of ETH
volumeUSDBigDecimalamount of token swapped across related pairs stored as a derived amount of USD
txCountBigIntamount of transactions with this token across related pairs
liquidityBigDecimalamount of tokens deposited across related pairs
liquidityETHBigDecimalamount of tokens deposited across related pairs stored as ETH
liquidityUSDBigDecimalamount of tokens deposited across related pairs stored as USD
priceUSDBigInttoken price in USD

TokenHourData

FieldTypeDescription
idIDhour start timestamp concatenated with date
dateIntunix timestamp for the start of the hour
tokenTokentoken reference
volumeBigDecimalamount of token swapped across related pairs
volumeETHBigDecimalamount of token swapped across related pairs stored as a derived amount of ETH
volumeUSDBigDecimalamount of token swapped across related pairs stored as a derived amount of USD
txCountBigIntamount of transactions with this token across related pairs
liquidityBigDecimalamount of tokens deposited across related pairs
liquidityETHBigDecimalamount of tokens deposited across related pairs stored as ETH
liquidityUSDBigDecimalamount of tokens deposited across related pairs stored as USD
priceUSDBigInttoken price in USD