Basic Details
Project name:
0x Community Subgraphs
Point of contact:
cole@paperclip.xyz
Discord:
coleperkins
Team background:
We’re Paperclip Labs. We design, build and ship crypto products and tools. We are a team of designers, developers and researchers that have worked with some of the top DeFi teams, including Compound, dYdX and Messari. We have experience and a proven track record building, shipping and maintaining subgraphs for a number of clients and protocols, most recently we shipped the Compound v3 Community Subgraphs. We believe we are well-positioned to successfully execute on this initiative.
Cole Perkins - Co-founder
Cole leads design at Paperclip Labs. Previously, he was a Product Designer at MetaLab, where he worked with clients, including Google, The Chan Zuckerberg Institute, D-Wave, Otter AI and IFTTT.
Spencer Perkins - Co-founder
Spencer leads engineering at Paperclip Labs. Previously, he was a Software Engineer at Tesla, working on the Megapack & Cybertruck teams. Prior to Tesla, Spencer worked on robotics at Nvidia.
Project Details
Describe the problem being solved:
Subgraphs are a building block for teams to build products on top of protocols.
We believe from a tech perspective, a protocol needs:
- Core contracts (protocol implementation)
- Interface to access those contracts (dApp)
- Datasource to analyze and understand the protocol performance (Subgraph)
Currently, there is no reliable and comprehensive data source on the 0x protocol. The official 0x subgraph is only deployed on mainnet, is lacking maintenance, and is missing key data. Dune analytics dashboards exist, but they are not suitable to use as a data source for dApp’s.
We propose building a community Subgraph for the 0x Protocol. This subgraph will improve data analytics to better support dApp developers who need to query on-chain data or analysts/traders using the subgraph to make more informed investment decisions.
We are proposing to build a comprehensive subgraph deployed to all supported chains of the 0x protocol, which will include data such as:
- Native orders
- Limit
- RFQ
- OTC
- NFT (ERC721 and ERC1155)
- Swaps
- TransformERC20 (bridge, limit and RFQ)
- LiquidityProvider
- Optimized:
- UniswapV2
- UniswapV3
- PancakeSwap
Explain how the funding will be used:
The funding will be used to fund the development, deployment and maintenance of the project. In the Project scope below we have broken down the funding required for each phase.
Project Scope
List any critical milestones and dependencies (if applicable):
Milestone 1: Research & Discovery
Objective:
- To understand the needs and pain points of the community in relation to the subgraph and determine the essential metrics that should be incorporated based on informed insights.
Activities:
- Community Engagement: Conduct outreach initiatives to gauge what data will be most beneficial for builders and community members in the context of this subgraph. This will also involve collaborating with teams who are actively using and developing tools on the 0x protocol.
- User Interviews: Develop a comprehensive script for interviews and recruit developers using 0x protocol data to delve into their challenges, expectations, and requirements.
- Research Synthesis: Collate and analyze all the data and findings obtained from the research activities to derive meaningful insights.
- Metric Structuring: Define a detailed outline of pivotal metrics that the subgraph should encompass, drawn from the insights acquired during community engagement.
Deliverables:
- Research Report: Anonymized user research data, well-defined list of key metrics to be included in the subgraph.
Milestone 2: Subgraph Development & Deployment
Objective:
- To design, develop, and deploy a reliable and efficient subgraph for the 0x protocol.
Activities:
- Block Diagram Creation: Develop a block diagram that shows how 0x contracts spawn, interact, and function with the granularity needed to implement and document the subgraph implementation.
- Schema Definition: Define the schema, incorporating all key metrics identified during the research and discovery phase. This will be designed in a way for efficient indexing, and querying.
- Subgraph Implementation: Transform the design and research insights into a fully functional subgraph.
- Deployment: Launch the developed subgraph on both hosted and decentralized Graph networks for all chains with the 0x protocol.
Deliverables:
- Open-Source Code: The entire subgraph code, which will be made publicly accessible.
- Subgraph Documentation: Comprehensive schema documentation, example queries, and integration notes.
- Subgraph Deployment: Deployed and fully indexed subgraphs on the hosted and decentralized networks for all chains with the 0x protocol, namely:
- Ethereum mainnet
- BNB
- Polygon
- Avalanche
- Fantom
- Celo
- Optimism
- Arbitrum
- Base
Phase 3: Subgraph Data Verification
Objective:
To ensure the accuracy and reliability of the subgraph data by rigorously comparing it against established sources, highlighting its correctness.
Activities:
- Data Scrutiny: Conduct a thorough examination of the subgraph data, comparing each metric and dataset with their corresponding values in existing sources (contracts, Dune dashboards, etc.)
- Discrepancy Analysis: Identify any disparities between the subgraph data and existing sources. Investigate the root causes of these discrepancies to ensure data integrity and accuracy.
- Data Validation: Confirm the correctness of the subgraph data through various validation techniques, ensuring its reliability for users.
Deliverables:
- Data Verification Report: A comprehensive report comparing and verifying correctness and explaining any discrepancies with existing data sources.
Milestone 4: One Year Sustaining + API key + Subgraph Signal
Objective:
To ensure the subgraph’s robustness, accessibility, and attractiveness over the next year by addressing technical issues, facilitating community engagement, and promoting its decentralization.
Activities:
-
Subgraph Maintenance: Monitor the subgraph for the year, addressing and resolving:
-
Any bugs or data-related issues that arise.
-
Potential indexing errors.
-
Supporting small community requests for improvements
-
API Key Distribution: Offer a complimentary API key to the community, granting them access to query the decentralized deployments of the subgraphs for the upcoming year for free. Note that if this becomes abused, we will need to revoke the key.
-
Subgraph Curation: Providing curation services on the decentralized subgraph implementations to attract indexers.
Deliverables:
- Community API Key: A token for the community allowing access to the decentralized subgraph deployments for a full year.
- Curation Evidence: Engaged curation to encourage indexer participation.
Continued Support
One challenge inherent in grants is the potential decline in grantee motivation to maintain support once a grant concludes. Our viewpoint emphasizes the importance of sustaining projects that remain valuable to the community in the long run. To address this, we will provide one year of sustaining support upon completion of this grant. We propose additional support through mini-grants, and novel features and integrations through subsequent grant opportunities should the project be deemed successful by the community; this could include react hooks library and documentation.
Planning and Budgeting
Funding Request
We are requesting $32,000 for development and deployment of all subgraphs and maintenance for 1 year.
Timeline
2 months (~8 weeks).
Proposed Budget
Milestone | Duration (weeks) | Cost (USD) |
---|---|---|
1. Research & Discovery | ~2 | $3,500 |
2. Subgraph Development & Deployment | ~5 | $21,000 |
3. Subgraph Data Verification | ~1 | $3,000 |
4. One Year Sustaining + API Key + Subgraph Signal | N/A | $4,500 |
Estimate Total | 8 weeks | $32,000 |
Below is a timeline view of the above milestones.
Additional notes
Relevant Past Work and References
-
Paperclip Labs work samples: You can check out some of our clients and work we have done with in the past.
-
Hopscotch + 0x integration: Our recently launched product, Hopscotch, allows users to generate on-chain payment links that accept payments in any token, similar to traditional currency transactions on Wise or Venmo. The contracts use 0x protocol to route swaps through.
-
Compound v3 Community Subgraph: We recently built the Compound v3 community subgraph. This is the most comprehensive datasource that exists for Compound v3, and is designed specifically for developers and users to serve as a reliable, comprehensive data source.
- Blog post on what we did
- Subgraphs: Mainnet, Arbitrum, Polygon
- Github Repo
-
Maple Finance Subgraph: We worked with the Messari team to build a subgraph for Maple finance which aligned to Messaris standardized schema, used to power their analytics dashboard.
-
Compound v2 Subgraph & Dashboard: We built the Compound V2 community subgraph and data analytics dashboard. This project helped provide data transparency on the Compound V2 protocol and helps users make more informed investment decisions. This project was featured at ETHGlobal.
Additional Notes
Success metrics
We believe success should be metrics driver, we can gauge the success of the subgraph based off:
- Number of queries: Monitor the number of queries made to the subgraph over time. Does this increase over time and is there sustained usage
- Number of applications / users: Monitor the number of application building on top of the subgraph, and user engagement from the 0x community. Again looking for increased usage over time, and sustained usage.
Lessons learned from the past.
After building different products with teams in the space we have insights that significantly inform our approach to these projects. Here are some key takeaways:
- Well defined scope: One of our biggest insights is keep scope specific and defined. It helps in setting clear expectations, managing resources efficiently. Tight cycles of building and getting feedback are key when developing a product.
- Build it when people want it: Understanding what the users need helps in aligning our efforts towards solutions that bring value to the users and the community. It’s wise to focus on the core product first, then engage with users to understand what additional features or tools they need next.
- Engagement with Users: Engaging directly with the end-users has proven to be invaluable. Our past work, like the Compound v3 Community Subgraphs, emphasized this. For the 0x subgraphs, we plan to spend more time interacting with more teams to better understand their needs.
- Iterative Development and Feedback Loops: We advocate for an iterative process where we engage and share with the community for feedback at each milestone.
- If you build it they might not come: When it comes to getting the word out and getting the tools into developers hands, we ask for the support of the team/DAO to help market the tool (should everyone be satisfied). Ensuring visibility and outreach is integral to get the tools utilized by developers.
- Validation is Crucial: Checking the functionality, performance, and data accuracy is critical to deliver a reliable and accurate solution. It ensures what we build works as intended and earns the trust of its users.
Updates
Milestone 4: Addition
We will also deploy on Alchemy Hosted Services.
Funding Request
Grant amount requested (in fiat):
$32,000 USD
Grant amount by token (ratio of tokens):
We ask for a funding split 50/50 between ARB and ZRX tokens. This ask reflects the shared advantages our project brings to both 0x and Arbitrum communities.
- ZRX (50%)
- ARB (50%)
Receiving address and chain:
Mainnnet: TBD
Arbitrum: TBD