Protocol metrics / field guide

Separate on-chain signals from assumptions.

A guide to the Stellar DeFi Analytics prototype: where its figures come from, what the metric modules intend to describe, and what is not ready to support a decision.

Illustrative series - no live market feed
Illustration only - not a chart of measured values
01 / Data signals

Trace each number to its source.

Some account reads call Stellar Horizon; other modules currently return example data. The distinction matters more than a polished chart.

Network read

Account balances

The Horizon server can load account balances. By default, the app points to Stellar testnet; use NEXT_PUBLIC_HORIZON_URL to select another endpoint.

Inspect Horizon helper
Placeholder

TVL and asset prices

getTVL() returns a fixed 1,000,000 and getAssetPrice() returns 1. These values are not calculated from protocol contracts, a DEX, or an oracle.

Inspect placeholder functions
Sample inputs

Portfolio performance

The current wallet-performance helper uses hard-coded sample trades and prices. Its outputs are illustrative, not derived from the supplied wallet's transaction history.

Inspect portfolio module
Not live

Streaming and exports

The price-stream manager does not open a WebSocket yet. Verify export output before use; tax or accounting reports are not verified deliverables.

Inspect analytics modules
02 / Reading a metric

Three checks before trusting a chart.

A metric is only as useful as its definition, source, and timestamp. Treat those as first-class parts of the display.

Find the source

Identify the Horizon endpoint, contract, indexer, oracle, or static fixture behind the value. A constant is not an observation.

Check the method

Read the implementation and inputs. Sample trades and assumed prices cannot establish a wallet's actual return.

Check the time

Require a clear update timestamp and freshness policy before describing any feed as live or current.

03 / Run locally

Explore the application safely.

For development, keep the default network on testnet and never put secret keys or signing credentials in public environment variables.

git clone https://github.com/HyperDevTools/stellar-defi-analytics.git
cd stellar-defi-analytics
npm install
npm run dev

Open http://localhost:3000. Read the API notes and contribution guide; validate any data pipeline independently before using its output.