⚠️ WARNING: Work in Progress This project is in active development. Features, APIs, and documentation are subject to rapid and significant changes. Production use is not recommended at this stage.
Pike Markets Indexer is a multi-chain data indexing solution built with Ponder, designed to track and serve Pike Markets-related on-chain information. It follows the GraphQL pattern with supplementary REST endpoints for user metrics.
The indexer is currently being developed against Pike Markets contracts deployed on Base Sepolia testnet. As the protocol evolves and deploys to additional networks, the indexer will be updated to support them.
The latest deploy of the API is on https://pike-indexer-production.up.railway.app/.
- Multi-chain indexing support for Pike Markets data
- GraphQL API for market and user data
- Supplementary REST endpoints for complex user metrics
- Real-time price information updates
- Historical data tracking for APRs and token prices
- E-mode functionality support
There are two endpoints to calculate user metrics using latest updated data. The metrics are:
borrowUsdValue
: Sum of all borrow assets multiplied by the latest fetched price.supplyUsdValue
: Sum of all borrow assets multiplied by the latest fetched price.supplyAPY
: Current Annual Percentage Yield that the supply assets are suggested to.borrowAPY
: Current annual interest that the borrow assets are suggested to.APY
: Sum ofsupplyAPY
andborrowAPY
weighted using USD values. This follow this reference.healthIndex
: How close the user is from liquidation considering all markets collateral, borrows and liquidation threshold. For more information check this reference. It only exists on the protocol level.worth
: Difference betweenborrowUsdValue
andsupplyUsdValue
.
The net
prefix means that is related with multiple protocols or markets.
user/<userId>/metrics
: High level APR and USD user metrics considering all protocols. TheuserId
parameter is given by<userAddress>-<chainId>
./user/<userId>/protocol/<protocolId>/metrics
: Protocol level metrics of one user. TheprotocolId
parameter is given by<riskEngineAddress>-<chainId>
.
# Install dependencies
pnpm install
# Create environment file
cp .env.example .env.local
# Create auto generated data from config and schema
pnpm codegen
# Check .env.example for required environment variables
# Start development server
pnpm dev