Introducing The 0x Protocol Community Subgraphs
Feb 6, 2024
Today, we are excited to share the 0x Protocol Community Subgraphs — the most extensive and openly accessible data sources for the 0x Protocol.
0x Protocol overview
With almost $140 billion in trading volume, 0x Protocol is a leader in decentralized exchange infrastructure. Products using 0x Protocol — such as Matcha, Coinbase Wallet, and Robinhood Crypto — represent a growing ecosystem of builders, optimizers, and innovators enabling the new internet of value being built on crypto rails.
The data gap
At Paperclip Labs, we believe there are three fundamental things a protocol needs:
Core contracts: The protocol implementation.
Interfaces: To access and interact with the contracts.
Open data sources: Essential for analyzing, understanding, and ensuring transparency within the protocol.
To address the need for improved open data sources within the 0x Protocol, we built the Community Subgraphs, offering comprehensive and user-friendly data sources available for everyone.
Why subgraphs?
Despite blockchains being public by nature, they are primarily designed for writing data. This design can make it challenging to read and curate data in a user-friendly way. Subgraphs provide a practical solution, offering a structured way to extract, transform, load, and query data. This simplifies accessing and utilizing on-chain data in an open-source and decentralized environment.
The 0x Protocol Community Subgraphs help provide data transparency within the protocol, serving as a foundational building block for applications developed on the protocol.
Who are they built for?
We designed these subgraphs for developers working with the 0x Protocol. Shaped by feedback from the 0x developer community, they aim to meet real-world needs, providing detailed insights into ERC20 and NFT swap activities.
Key features
Multi-chain deployment: Marking a milestone, these subgraphs are the first to be deployed for the 0x Protocol across all operational chains, providing a comprehensive view of the protocol.
Comprehensive data coverage: Includes all swap types within the protocol, including limit, RFQ, OTC orders, pluggable liquidity providers, bridge orders, optimized swaps, and NFT (ERC721 and ERC1155) orders.
Aggregated protocol metrics: Provides a macro view of the protocol with data aggregated at various levels such as protocol, token, token pair, account, fill type, and NFT collection.
Historical data: Offers historical data in daily and weekly timeframes, essential for pattern analysis and informed decision-making.
Community collaboration: Committed to community-driven development, our collaboration with the 0x community helps ensure the subgraphs meet specific data needs of the broader community, aligning our efforts with the requirements of the users.
Detailed documentation: Comes with complete documentation, including diagrams, usage notes, and example queries for seamless integration.
Data validation: All data within the subgraphs has undergone extensive validation, cross-referencing with contracts and existing data sources where possible.
Decentralized deployment: The subgraphs are deployed on The Graph's hosted and decentralized networks.
Free API key for the 0x Community: To help support the 0x community, we are providing a free API key for the decentralized subgraph deployments, giving developers the ability to explore and leverage the subgraphs without barriers.
Want to try it out?
We invite you to explore the 0x Protocol Community Subgraphs, share your insights, and contribute towards making them an indispensable asset for the 0x Protocol and the wider DeFi ecosystem. We're excited to see how you'll leverage these subgraphs in your projects.
Start exploring the decentralized subgraphs:
Dive deeper into our work and view a comprehensive list of all hosted and decentralized deployments by visiting our GitHub repository.
Have questions or want to learn more? Feel free to reach out to spencer@paperclip.xyz or send us a DM on Twitter.
Acknowledgements
This project was made possible through the funding and support of a 0x Protocol grant and the support and insights from the 0x community. Special thanks to nikita and 0xSHA for their constructive feedback throughout.