Subgraph
The GYSR subgraph
GYSR has built and launched a subgraph which indexes a variety of information about our platform. This includes data about tokens (price, name, type, etc.), users (positions, activity, etc.), Pools (configuration, APR, TVL, etc.) and more.
You can experiment with queries and view entities on the subgraph's playground page:
Pool
An entity created for each Pool launched on the GYSR protocol
Token
An entity created for each token used as a staking or reward token in a GYSR Pool
User
An entity created for each wallet address that has interacted with a Pool
Position
An entity created for each position a user has in a Pool. This can be comprised of one or several stakes, as a user can have multiple stakes in one Pool.
Stake
An entity created for each stake a user has in a Pool
Platform
An entity created for aggregate stats on the GYSR protocol like
TVL
Transaction
An entity created for each transaction on a Pool, including
Stake
, Unstake
, and Claim
Funding
An entity created for each funding on a Pool
PoolDayData
An entity created as a "snapshot" of a Pool's stats on a given day
{
pools(first: 10, orderBy: tvl, orderDirection: desc) {
id
tvl
apr
stakingToken {
symbol
alias
}
rewardToken {
symbol
alias
}
}
}
Note: replace the
id
with the Pool you want to query{
pool(id: "0x6c1ffdecc6520571d2c41087726611938a9ae99f") {
fundings {
originalAmount
start
end
}
}
}
Note: replace
pool
id with the Pool you want to query{
transactions( where: { pool: "0x6c1ffdecc6520571d2c41087726611938a9ae99f"}) {
type
timestamp
amount
earnings
gysrSpent
}
}
This example gets snapshots from the week of 11/9/20 - 11/15/20 UTC
{
poolDayDatas(where: { poolAddress: "0x6c1ffdecc6520571d2c41087726611938a9ae99f", date_gte: 1604966400, date_lte: 1605484800}) {
date
totalStaked
totalGysrSpent
totalUsers
tvl
volume
}
}
Note: replace the
id
with the wallet address you want to query{
user(id: "") {
earned
positions {
pool {
id
}
shares
}
}
}
{
platform(id: "0x0000000000000000000000000000000000000000") {
tvl
users
operations
gysrSpent
pools
volume
}
}
Last modified 1yr ago