caelum0x 9a4a12c6b1 feat: show real pool-level vault stats on /vault without requiring a connected wallet
/vault previously rendered nothing but two "Connect Wallet" buttons for any
visitor without a browser wallet extension -- including any hackathon judge
reviewing the live site headlessly. The underlying /api/vault-position route
requires a `user` address and 400s without one, even though totalAssets/
totalDebtPrincipal/totalLenderShares are global contract state, not per-user.

Add a server-rendered VaultPoolStatsBar (TVL, idle liquidity, outstanding
debt, utilization) fetched directly on the server via a new getVaultPoolStats()
helper, same no-wallet-required pattern already used by the homepage's live
network/oracle data and /swap's quote box -- /vault was the one page that
didn't follow it.

Verified: tsc --noEmit and eslint clean; cast call against the live demo
vault (0x851356...91C on the self-hosted anvil RPC) confirms the real numbers
the new component will render: totalAssets=500000000000, totalDebtPrincipal=
20000000000, totalLenderShares=1000 (500,000 TUSD TVL, 20,000 TUSD debt, 4%
utilization, 480,000 TUSD idle) -- matches docs/STATUS.md's documented demo
position exactly.
2026-10-29 00:58:59 +03:00
..