Skip to content

Deepcryptodive/spark-data-service

 
 

Repository files navigation

Data Service for Spark Protocol BOS Component

This service aggregates data from Spark Protocol across multiple chains, providing a crucial link between Spark Lend and applications that wish to utilize its data. Spark Lend is a lending market based on the Aave v3 codebase, that is currently live on Gnosis and Ethereum.

This Data Service was initially developed to be used in conjugation with Spark Nexus, but it can also be run stand-alone.

Note: for an Aave-exclusive Data Service, see the following branch.

Features

  • Aggregates and serves market data from Spark Lend.
  • Provides user-specific deposit, debt, and health factor information.
  • Supports multiple blockchains (i.e. where Spark Protocol is deployed)
  • Is accesible as public API

Getting Started

You can deploy this locally, or have it run on Cloudflare. We have deployed it at https://spark-api.pages.dev/

Prerequisites

Before running the service locally, ensure you have the following installed:

  • Node.js
  • Yarn package manager

Installation (locally)

  1. Clone the repository to your local machine.
  2. Run yarn install to install dependencies.
  3. Use yarn start to run the app server locally on localhost:8080.

Deployment

Deploy the service to Cloudflare Pages with the yarn deploy command.

Ensure you have the correct permissions and environmental variables set up. i.e. in the Cloudflare Dashboard, under Workers & Pages create a Page with name spark-api (or which name you defined in package.json). You do not need to link it to the Github repo.

Support Chains (chainID)

  • Ethereum Mainnet (1)
  • Gnosis (100)
  • For debuggin purposes only: Polygon Mainnet (137) (fetching data from Aave v3 on Polygon)

API endpoints

Acknowledgments

A special thank you to the contributors and maintainers of the Aave Data Service, originally developed for the AAVE v3 NEAR BOS Component, upon which this project is based.

References: https://github.com/corndao/aave-data-service

https://near.org/aave-v3.near/widget/AAVE

About

Spark Protocol Data API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 99.6%
  • Other 0.4%