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 find the subgraph source code here.
You can experiment with queries and view entities on the subgraph's playground page:
Entities
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
PoolStakingToken
An entity created for each staking token association with a specific Pool
PoolRewardToken
An entity created for each reward token association with a specific 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
ConfigurationParameter
An entity created for each parameter set in the global Configuration
contract
Fee
An entity to track each token collected as a protocol fee
Examples
Get top 10 Pools with highest TVL
Get fundings for a specific Pool
Note: replace the id
with the Pool you want to query
Get transactions for a specific Pool
Note: replace pool
id with the Pool you want to query
Get daily snapshots for a Pool over a time range
This example gets snapshots from the week of 11/9/20 - 11/15/20 UTC
Get a user's positions
Note: replace the id
with the wallet address you want to query
Get global stats for GYSR protocol (on the respective chain)
Get current protocol configuration parameters
Last updated