Docs

Live Dashboard Data

How the site reads real numbers off-chain once deployed, and falls back to mock data until then.

Server Components read the chain directly

No cron job, no separate database. Hero.tsx and Compounds.tsx are Next.js Server Components, so they can await a data function directly. Both call getEcosystemStats() from web/lib/live-data.ts, wrapped in Next's unstable_cache (5-minute revalidation) so every page request doesn't hit the RPC.

The fallback is the whole point

isEngineLive() in web/lib/chain.ts checks that the token address, FeeRouter address, and initial supply are all set. If any are missing, which is true today (see Overview), every live fetch short-circuits to the existing mock ecosystem object from lib/data.ts. The site never shows zeros, loading spinners, or crashes pre-launch. It shows the same numbers it always has, until they're real.

What actually goes live once deployed, and what doesn't yet

live
$SNOWBALL burned
live
Transaction count
still mocked
Total volume ($)
still mocked
Holder count
still mocked
BNB volume generated

Burned supply is a direct read (initialSupply - totalSupply()), and transaction count is a Transfer event log count, both cheap enough for a per-request (cached) chain read. Total volume in dollars and unique holder count need real event indexing across every Swap plus a BNB/USD price feed: a proper indexer, not a single RPC call. That's tracked as follow-up work, not silently faked with a plausible-looking number.

Environment variables

VariableDescription
BSC_RPC_URLDefaults to the public bsc-dataseed endpoint.
NEXT_PUBLIC_SNOWBALL_TOKEN_ADDRESSSet once SnowballToken is deployed.
NEXT_PUBLIC_FEE_ROUTER_ADDRESSSet once FeeRouter is deployed.
NEXT_PUBLIC_SNOWBALL_REGISTRY_ADDRESSSet once SnowballRegistry is deployed.
NEXT_PUBLIC_SNOWBALL_DEPLOY_BLOCKBlock Deploy.s.sol ran at, so log queries don't scan from genesis.
NEXT_PUBLIC_SNOWBALL_INITIAL_SUPPLYThe fixed supply passed to the constructor (wei, 18 decimals), needed to derive the burned amount.

See web/.env.example for the same list with inline comments.