Every DFK community developer has a common set of data access needs to build their applications. They need a plethora of on-chain data (heroes, quests, summoning info, dex data, and more) from multiple different blockchains (dfk chain, harmony, and future chains). They often need other external data (e.g. historical JEWEL/CRYSTAL pricing for portfolio management).
Developers can piece this information together with existing tools (Harmony/AVAX API, community Python/JS sdks, and DFKs own GraphQL API). But this approach carries problems for community developers:
- The DFK GraphQL API is very helpful, but it does not cover use cases many community members want (e.g. historical information with historical pricing, questing data, dex data, presenting data in a RESTful format instead of GraphQL, etc). The Core API team could theoretically cover these use cases, but they are focused on core features tied to the DFK roadmap (as they should be!).
- To cover the gaps, community developers need to limit the UX in their apps by querying blockchains in real time, build their own blockchain indexing infrastructure & sdks, or use an open source SDK in a language they don’t prefer. This work is duplicative and burdensome for people who just want to build great DFK apps.
This proposal covers a solution to the above problems by creating a community built & run API that complements and extends the core team’s GraphQL API. This API would:
- Prioritize use cases needed by the DFK developer community that the core API team does not have the bandwidth to address.
- Not seek to compete with the core GraphQL API, but would embrace it as a data source and extend its capabilities.
- Have easy to follow and up to date documentation.
- Be open source so community developers can contribute to it or run an instance of it themselves.
- Be a source for API feature ideas to the core DFK API to implement in the official API.
- Present results in both GraphQL and REST (using the JSON API specification), giving developers a choice in how to interact with it.
- Be built in Typescript as a set of node packages/apps in a monorepo. It will store the data from its various sources in a Postgres database.
- Be hosted on fly.io to facilitate easy deployment and scalability.
- Be built with the high standards of availability, performance, and technical excellence, including:
- High automated test coverage
- Automated CI/CD
- 24/7 monitoring & incident management
This effort needs a grant because developing this API will take a significant amount of time in managing the product (getting feedback/input from the community to prioritize the right features), building the product, and running the product. I also don’t plan to monetize the API directly, and given I plan to open source it, grant funding feels like the best approach.
I am seeking 50k USD for this project to pay for the development costs of the project and the hosting costs of the API.
I plan to build, maintain, and operate this API. I am Brian Geihsler (https://www.linkedin.com/in/briangeihsler/), an experienced full stack developer, software entrepreneur, and technology leader. In my developer life, I have built many production-grade APIs across multiple tech stacks. More recently, I co-founded a SaaS startup that exited in 2018 & became a director of development, managing development teams in multiple geographies. I am currently devoting my day-job time to web3 projects like Defi Kingdoms.
Requests from DFK Team
- Deliver on the promise of a great developer website that details DFK contracts, APIs, and ways to access DFK data.
- Availability in the DFK Dev discord to answer questions as they arise.
- Alignment with the core API team’s roadmap so we can align the core team’s roadmap with the community API’s roadmap.
Connection to DFK Game and DFK Blockchain
This is directly connected to the DFK Game and Blockchain, with the intent of making developing DFK applications easier than ever for the DFK developer community.
I have combined the deliverables, payment schedule, and timeline into one section. Note that these delivery dates & scope are an estimate and subject to change based on community feedback and development schedule realities being different than estimates.
IN PROGRESS - Milestone 1 - delivery by June 27th 2022. Payment: $20,000
Deliver REST & GraphQL endpoints that allow developers to answer historical questions about heroes. Community developers want to answer questions like “What were this hero’s stats at time X?”, “How much did this hero level up cost (in today’s token values and with the token values at the time)?”, and “What quests has this hero been on, and how much did it earn (in today’s values & values at the time)?”
This will include:
A deployed & running API with REST and GraphQL endpoints for:
- Heroes (includes Serendale/Crystalvale and the ability to query a hero for its stats at a given date/time)
- Profession Quests - includes reward item quantities but not pricing
- Training Quests - includes reward item quantities but not pricing
- Level ups - includes items spent & results but not pricing
- Summoning - includes items spent on the summon
- Perilous Journey results
A public repository published to Github to facilitate collaboration with the broader DFK developer community.
A live documentation site based on OpenAPI v3.
This will not (yet) include a promise of availability/scalability - it will be considered a preview API at this stage.
***Milestone 2: delivery by August 17th 2022 - Payment: $10,000 ***
- Add current & historical pricing information to Milestone 1 endpoints
- Player Inventory & its estimated pricing/value
- If available, add Level 10 Profession Quests (rewards + pricing)
- Performance testing & right-sizing deployment scale
- Monitoring & incident management infrastructure to ensure high availability
After this milestone, the API will be considered “production-ready”
***Milestone 3: delivery by September 17th 2022 - Payment: $10,000 ***
- Player Gardens value and estimated APR/earnings schedule
- Gardens transactions including LP purchases, rewards claims, and the value of the transactions at the time of the transaction.
- Player Bank value and estimated APR/earnings
***Milestone 4: delivery by October 17th 2022 - Payment: $10,000 ***
- Player trades in the marketplace & their estimated values at the time of the trade
- Player crafted items and their estimated cost/value at the time of crafting
- Multi-currency support
Other feature ideas that would require additional grants or prioritizing in place of features above:
- Endpoints for aggregated information about heroes, quests, summoning, etc to power charts & dashboards
- Estimated hero value based on recently sold similar heroes
- Estimated pet value based on recently sold similar pets
- Duel results and rewards
- Yet-to-be released features from DFK that would impact this API (PVP, PVE, new chains, etc)
- Feature ideas solicited from the DFK Developer Community
- CLI that communicates with this API
- Typescript SDK that communicates with this API
Long Term Plan
$10,000 from the initial payment in Milestone 1 will be set aside in USDC under a publicly known ETH address to pay for hosting costs for this API. Funds will be extracted from this API monthly to pay hosting fees. This should cover 1-2 years of hosting costs & monitoring, depending on demand for the API
After Milestone 3, I will submit another grant to cover development of new features to develop after Milestone 4.
External Links/File Uploads
My LinkedIn: https://www.linkedin.com/in/briangeihsler/
I am actively working on this API. I will post a link to a preview version in the comments when it is available, likely by June 3rd 2022. There’s nothing that speaks better than a working piece of software