Skip to main content

Schema reference

The main entities across the BarkSwap subgraphs. Numeric values (BigInt / BigDecimal) are returned as strings to preserve precision. Each subgraph also auto-generates filter, ordering, and pagination arguments — see query conventions.

Core — barkswap/core​

Pool​

FieldTypeNotes
idIDPool address (lowercased).
feeBigIntCurrent dynamic fee.
deployerBytesPool deployer (zero for default).
token0, token1TokenThe pair (nested entity).
sqrtPriceBigIntCurrent sqrtPriceX96.
liquidityBigIntActive in-range liquidity.
tickBigIntCurrent tick.
tickSpacingBigIntTick granularity.
token0Price, token1PriceBigDecimalPrice of each token in terms of the other.
totalValueLockedUSDBigDecimal
volumeUSD, feesUSD, untrackedFeesUSDBigDecimal
poolDayData[PoolDayData]Daily history (derived).

Token​

FieldTypeNotes
idIDToken address.
symbol, nameString
decimalsBigInt
derivedMaticBigDecimalPrice in the native token. USD = derivedMatic × Bundle.maticPriceUSD.

Tick​

FieldTypeNotes
tickIdxBigInt
liquidityNet, liquidityGrossBigInt
price0, price1BigDecimal

Bundle​

FieldTypeNotes
idIDAlways "1".
maticPriceUSDBigDecimalNative-token USD price used to derive all USD values.

PoolDayData​

FieldTypeNotes
idID
dateIntUNIX day start.
volumeUSD, feesUSD, tvlUSDBigDecimalDaily aggregates.

Other analytics entities (PoolHourData, TokenDayData, Swap, Mint, Burn, …) follow the same conventions — introspect the endpoint for their full fields.

Farming — barkswap/farming (and barkswap/positions)​

EternalFarming​

FieldTypeNotes
idID
poolBytes
reward, bonusRewardBigInt
rewardRate, bonusRewardRateBigInt
rewardToken, bonusRewardTokenBytes
isDeactivatedBoolean
nonce, minRangeLengthBigInt
virtualPoolBytes

Deposit​

FieldTypeNotes
idIDPosition token id.
ownerBytes
poolBytes
liquidityBigInt
eternalFarmingBytesFarming the position is in (if any).

Gauges — barkswap/gauges​

Gauge​

FieldTypeNotes
idIDGauge address.
poolBytes
totalStakedBigIntTotal liquidity staked.
creatorBytes
internalBribe, externalBribeBytesBribe contracts for the gauge.
createdAtBlock, createdAtTimestampBigInt
deposits[GaugeDeposit]Derived.

GaugeDeposit​

FieldTypeNotes
idIDgaugeAddress-tokenId.
gaugeGaugeParent gauge (nested).
tokenIdBigIntStaked position NFT id.
depositRefStringReference to the core Deposit.id.
stakerBytes
liquidityBigInt
stakedAt, stakedAtBlockBigInt
unstakedAt, unstakedAtBlockBigIntnull while still staked.