Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Network stats & discovery (ogong-stats)

ogong-stats is a read-only HTTP indexer that answers, at any moment, what the network can serve, how much stake secures it, and how much has been emitted - straight from chain. It reads no secrets and holds no keys. Every value it returns is a plain read of the same on-chain contract state, and every live model it lists is verified against the provider’s bonded ad_commitment before it is surfaced.

Because it only reports what the chain already says, you can run it locally (pointed at any RPC) for a fully trust-minimized personal view, or host it as a public dashboard that anyone else can spot-check against chain.

Build

cargo build --release -p ogong-stats

Run

Configuration is the same environment the other readers use:

OGONG_EVM_RPC_URL=http://127.0.0.1:8545 \
OGONG_EVM_ESCROW=<escrow contract address> \
OGONG_EVM_STAKING=<staking contract address> \
OGONG_EVM_EMISSION=<emission contract address> \
OGONG_EVM_REGISTRY=<registry contract address> \
ogong-stats --bind 127.0.0.1:8088
Flag / envDefaultMeaning
--bind <addr> / OGONG_STATS_BIND127.0.0.1:8088address to serve the read-only API on
--refresh-secs <n> / OGONG_STATS_REFRESH_SECS30how often to refresh the chain + catalog snapshot
OGONG_EVM_RPC_URLhttp://127.0.0.1:8545any EVM JSON-RPC endpoint (a local anvil, or Robinhood Chain)
OGONG_EVM_ESCROW / _STAKING / _EMISSION / _REGISTRY(required)the deployed contract addresses to read from
OGONG_EVM_STAKING(required)the canonical staking contract, so stake is read Sybil-safely

Endpoints

RouteReturns
GET /statsnetwork summary: bonded vs live-verified providers, validator count + total staked security, routers, approved TEE measurements, emission (total emitted / cap / current epoch + reward / schedule), and aggregate live capacity
GET /modelsthe verified models on offer network-wide, each with its cheapest advertised price, how many providers serve it, reputation, and observed tokens/sec
GET /providersone entry per verified live provider, with its served models + prices, stake, tier, and capacity
GET /healthliveness + the timestamp of the last successful snapshot

All responses are JSON with Access-Control-Allow-Origin: *, so a browser dashboard can read them directly. If the chain or routers are unreachable the service stays up and returns 503 with a clear error rather than stale or invented numbers.

What is on-chain vs what is indexed

The point of the indexer is that everything it shows is provable, so it helps to know where each number comes from:

  • Directly on-chain (a single account read): the bonded provider/validator/router sets, each provider’s ad_commitment and trust root, the approved TEE enclave set, total staked security, and the emission schedule + totals.
  • Indexed from chain history: realized settled volume per provider per epoch (the settle-watch indexer buckets it as the emission tally).
  • Not on-chain by design: the plaintext model list + prices (only the ad_commitment hash is on chain, so the indexer fetches each live ad and verifies it against that hash), and live free compute. The capacity numbers here are the routers’ live advertised supply; realized verified throughput per epoch is the settle-watch view, not this one.