Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

Upgrade Oracle hero to show real platform-wide conviction stats

nirholasd4c45a2d586e
diff --git a/pages/oracle.html b/pages/oracle.html
index 4def8250b..716fd7432 100644
--- a/pages/oracle.html
+++ b/pages/oracle.html
@@ -366,10 +366,10 @@
<h1>Stop guessing the coin.<br><span>Know the conviction.</span></h1>
<p>Oracle fuses four reads on every pump.fun launch — <b>who's</b> buying it (proven-wallet pedigree), <b>how</b> it's being bought (bundle vs. organic structure), <b>what</b> it is (cultural narrative), and <b>how</b> it's moving — into one transparent 0–100 conviction score. The more coins and wallets we watch, the sharper every score. Then arm your 3D agent to act on the plays that clear your bar.</p>
<div class="statline">
- <div><span>Coins scored</span><b id="stScored">—</b></div>
- <div><span>Strong+ live</span><b id="stStrong">—</b></div>
- <div><span>Smart wallets in play</span><b id="stSmart">—</b></div>
- <div><span>Updated</span><b id="stUpdated">—</b></div>
+ <div><span>Scored today</span><b id="stScored">—</b></div>
+ <div><span>Win rate</span><b id="stStrong">—</b></div>
+ <div><span>Best ATH×</span><b id="stSmart">—</b></div>
+ <div><span>Prime now</span><b id="stUpdated">—</b></div>
</div>
</header>
diff --git a/src/oracle.js b/src/oracle.js
index 366945efe..c71da62ee 100644
--- a/src/oracle.js
+++ b/src/oracle.js
@@ -309,10 +309,26 @@ function coinCard(it, watched = new Set()) {
function setStats(data) {
const items = data.items || [];
+ // Populate from feed immediately, then override with richer global stats.
$('#stScored').textContent = data.count ?? items.length;
$('#stStrong').textContent = items.filter((i) => i.tier === 'strong' || i.tier === 'prime').length;
$('#stSmart').textContent = items.reduce((s, i) => s + (i.smart_wallet_count || 0), 0);
- $('#stUpdated').textContent = 'now';
+ $('#stUpdated').textContent = '—';
+ // Fetch global platform stats asynchronously.
+ loadGlobalStats();
+}
+
+async function loadGlobalStats() {
+ try {
+ const { ok, data } = await api('/api/oracle/stats');
+ if (!ok || !data) return;
+ if (data.scored_24h != null) $('#stScored').textContent = data.scored_24h.toLocaleString();
+ if (data.win_rate != null) $('#stStrong').textContent = data.win_rate + '%';
+ else $('#stStrong').textContent = '—';
+ if (data.best_ath != null) $('#stSmart').textContent = Number(data.best_ath).toFixed(1) + '×';
+ else $('#stSmart').textContent = '—';
+ if (data.prime_count != null) $('#stUpdated').textContent = data.prime_count.toLocaleString();
+ } catch { /* non-fatal */ }
}
// ── live stream ──────────────────────────────────────────────────────────────