Series 2: The Evolution of The Graph and Predy’s Use Cases

Predy Finance
2 min readSep 24, 2023

The Evolution Towards Decentralized Subgraphs

Currently, there are two methods to deploy Subgraphs. One is deploying via The Graph’s Hosted service, which is free as The Graph provides the resources. However, this service is gradually being phased out. The alternative is deploying Subgraphs on a decentralized network. This network operates with participants running Subgraphs in a distributed manner, reaping the benefits of decentralization. Utilizing this requires the GRT token, a utility token. The network consists of indexers (who index Subgraphs), curators (who recommend high-quality Subgraphs), and delegators (who delegate GRT tokens to indexers). Presently, The Graph is in the process of transitioning all Subgraphs to this decentralized network.

source: The Graph
source: The Graph

Predy’s Use Cases

Predy takes two Subgraphs, both of which have transitioned to the decentralized network. One is used to index core contracts of Predy, helping retrieve token pairs, user positions, and their states from the frontend. It’s also used to track user position history and profit and fee timelines. Moreover, it aids in computing daily summaries for statistics.

The other Subgraph is utilized to fetch information from Uniswap V3 pools. Since Predy is built upon Uniswap V3, it’s essential to always be updated on the pool’s current state and history, a feat achieved using Subgraphs.

Current Challenges and Conclusion

While The Graph is indispensable for many applications, including Predy, there are some concerns. A significant issue is the time taken to sync up to the current state after deploying a Subgraph. Depending on the data and duration, this can be time-consuming. We hope for improvements from The Graph and The Guild teams. Another challenge is the high consumption of GRT tokens for numerous queries. However, with the experimental caching feature in place, this issue might be resolved shortly.

The services provided by The Graph are invaluable. Without them, our development and operational costs would have skyrocketed. We’re grateful for this remarkable framework and are committed to supporting The Graph’s growth.

For those interested, Predy has made its Subgraph public. Please check the link below.

https://thegraph.com/explorer/subgraphs/59QRECjVLT2ZM1LbBBeP4DYajfK4dC8pJDjhz6eWiM3D?view=Overview&chain=arbitrum-one

https://thegraph.com/explorer/subgraphs/FMeMvxUPEANaZRnm1GPJea24LEXPvPjDsZQutfAuJDfS?view=Overview&chain=arbitrum-one

--

--

Predy Finance

Most capital efficient Perpetual Options based with Uniswap. Live on Arbitrum.