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.
It indexes the EVM lane, which is what production settlement uses today, so the security figure it reports is staked capital. The OGONG L1 measures the same security in verified work and has no stake to report; an L1 indexer is roadmap work.
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 / env | Default | Meaning |
|---|---|---|
--bind <addr> / OGONG_STATS_BIND | 127.0.0.1:8088 | address to serve the read-only API on |
--refresh-secs <n> / OGONG_STATS_REFRESH_SECS | 30 | how often to refresh the chain + catalog snapshot |
OGONG_EVM_RPC_URL | http://127.0.0.1:8545 | any 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
| Route | Returns |
|---|---|
GET /stats | network 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 /models | the verified models on offer network-wide, each with its cheapest advertised price, how many providers serve it, reputation, and observed tokens/sec |
GET /providers | one entry per verified live provider, with its served models + prices, stake, tier, and capacity |
GET /health | liveness + 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_commitmentand 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_commitmenthash is on chain, so the indexer fetches each live ad and verifies it against that hash), and live free compute. Thecapacitynumbers here are the routers’ live advertised supply; realized verified throughput per epoch is the settle-watch view, not this one.