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.

feat: enhance treasury top-up process with off-registry target alerts

nirholase567f44b660e
diff --git a/.gitignore b/.gitignore
index 14d831c46..cdf26dfbe 100644
--- a/.gitignore
+++ b/.gitignore
@@ -315,3 +315,4 @@ launch-studio-preview.png
docs/nvidia-inception/three-ws-nvidia-deck.pdf
docs/nvidia-inception/assets/avatar-hero.png
docs/nvidia-inception/deck.html
+Screenshot 2026-07-02 at 3.18.08 PM.png
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 533ffff37..c352d1c88 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -14,7 +14,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr
- **Agora: verify a deliverable, then vouch for its maker in one click** — Checking someone's work and standing behind it are now a single move in the Commons. Open any completed job, hit Verify to re-download the deliverable and re-hash it against the on-chain proofHash in your own browser, and when it matches you'll see a Vouch button right there — one click opens your 'You' panel straight to a real, on-chain attestation for the citizen who produced it. The vouch is only ever offered after a genuine match, so you never attest to work you didn't confirm, and it's rate-limited and deduped per person so a relationship is one edge you can refresh, never spam. Every vouch is a real signed Solana transaction you can view on Explorer. (`/agora`) `[feature, improvement]`
- **Coin intelligence engine now backs off cleanly when the database is full** — The pump.fun intelligence firehose — the engine behind the coin-intel feed, the smart-money leaderboard and the oracle scores — used to keep writing to the database even after it hit its storage cap, failing thousands of times an hour and burning compute on work that could never be saved. It now checks free space before each run and pauses ingestion while the automatic cleanup reclaims room, then resumes on its own. The result: the engine self-heals instead of storming its logs, and the feeds it powers recover cleanly the moment space frees up. `[infra]`
- **Every coin world now gets the full town experience** — The flagship town's whole cast and economy now travel to every coin world on /play. Walk into any community and you'll find the full crew of twelve townsfolk selling real paid services — market reads, fact checks, security scans, vanity addresses, 3D mesh forging, coin launches and more, each settled on-chain in USDC — plus the ORACLE and NOVA agent exchange striking live x402 deals in the plaza, and an intel kiosk selling live market data for that world's own coin ($0.01 USDC, paid from your own wallet). The $THREE town keeps its signature frontier look and stays the front door of the metaverse. (`/play`) `[feature]`
-- **Every Oracle coin now has a full page, not just a pop-up** — Until now, opening a coin on Oracle gave you a slide-over drawer — great for a quick glance, but the shareable link just bounced back into that same drawer. Every coin now has a real standalone page at three.ws/oracle/coin/<mint>: the conviction verdict and four pillars render instantly at the top (served straight from the database, so the page paints fast and a shared link unfurls with the actual score on X, Telegram, Discord and Farcaster), then the full read fills in live below — why the score, the wallet structure, the narrative, the community pulse, who's in with every early wallet labeled, the ground-truth outcome, complete market intel, the 48-hour conviction trend, agent exits on the coin, related plays, and a live trade tape. A new Full page link in the drawer takes you there, and Copy link now points at it. (`/oracle`) `[feature]`
+- **Every pump.fun coin now has its own full Oracle page** — Opening a coin on Oracle used to give you a slide-over drawer, and the shareable link just bounced back into that drawer. Now every coin has a real standalone page at three.ws/oracle/coin/<mint> — and it resolves for any pump.fun mint, even a launch Oracle has never scored. Brand-new coins pull their real name, image and bonding-curve progress straight from pump.fun so the page and the social card are rich from the first paint; the conviction score, market intel and live trade tape stream in as the coin is read. For scored coins the verdict and four pillars render instantly at the top (from the database, so a shared link unfurls with the actual score on X, Telegram, Discord and Farcaster), then the full read fills in below — why the score, the wallet structure, the narrative, the community pulse, who's in with every early wallet labeled, the outcome, complete market data, the 48-hour conviction trend, agent exits, related plays, and the live tape. A new Full page link in the drawer takes you there, and Copy link now points at it. (`/oracle`) `[feature]`
- **Live agent screens now reach the 3D world, and coin art loads everywhere** — The in-world agent desk monitor in /play now renders the same live browser feed as the 2D watch panel and the live wall — previously it could only show the activity fallback because it listened on a stream that was never deployed. Coin art in the world lobby is now served through the platform's own image proxy, so tokens whose images live on flaky or retired IPFS/Arweave gateways still show their art instead of a broken tile. The paid crypto-intel feed also gained a second live price source, so a rate-limited upstream no longer makes paid calls fail — and if both sources are down you are never charged. Assorted console warnings from multiplayer connections closing mid-session are gone. (`/play`) `[fix, improvement]`
- **One funding wallet now keeps every economy engine topped up** — The platform's on-chain engines — the buyback relayer, coin-launch funder, treasury signers, subdomain minter and more — each hold their own small SOL balance to pay network fees. A new funding root now watches all of them and automatically tops up any that dip below their floor, from a single master wallet, every 30 minutes. It only ever sends to the platform's own registered engine wallets, never trades or launches, and is bounded by a reserve floor plus per-engine and per-sweep caps so it can't overspend. Until the master is funded it does nothing and the existing low-balance alerts keep running. `[infra]`
- **Oracle 3D graph is visible again** — The Oracle's 3D conviction graph — every scored coin as a sphere you can orbit, with size showing the conviction score and brightness showing the tier — was rendering as a black void: the spheres were lit only by a near-black ambient light and carried no glow of their own, so nothing showed even though the data was loading fine. Each coin now self-illuminates in its tier color and feeds the bloom pass, with real key and rim lighting giving the spheres depth. Prime coins burn brightest, and the whole constellation reads clearly against the dark backdrop. Open it from the Oracle's "3D graph" tab. (`/oracle`) `[fix]`
diff --git a/api/_lib/economy-master.js b/api/_lib/economy-master.js
index 2c05af27b..7285a9816 100644
--- a/api/_lib/economy-master.js
+++ b/api/_lib/economy-master.js
@@ -26,7 +26,7 @@
// • PER-RUN CAP — one sweep spends at most ECONOMY_MASTER_RUN_CAP_SOL total
// across all engines.
-import { decodeSecretKey } from './solana-signers.js';
+import { decodeSecretKey, SOLANA_SIGNERS, resolveSignerPubkey } from './solana-signers.js';
import { getSolBalance, sendSol, LAMPORTS_PER_SOL } from './avatar-wallet.js';
// The intended master. A pasted key whose pubkey does not match this is rejected
@@ -115,6 +115,59 @@ export function planTopUps(masterSol, targets) {
return { plan, skipped, totalSol: total, spendableSol };
}
+/**
+ * Defence-in-depth allowlist. Keep only targets whose pubkey is a resolved
+ * SOLANA_SIGNERS member and is NOT the master itself. The treasury-topup cron
+ * already builds its target list from the registry, so on the legitimate path
+ * this changes nothing — but it makes "SOL only ever moves to an owner-held
+ * registry wallet" a hard code invariant instead of a caller convention. A
+ * future caller (bug, bad merge, a compromised target list) that hands sweep an
+ * off-registry pubkey can never move SOL out of the owner-controlled set. Pure,
+ * so it is unit-tested without RPC.
+ *
+ * @param {Array<{name:string,pubkey:string,currentSol:number,refillToSol:number}>} targets
+ * @param {Set<string>|Iterable<string>} allowedPubkeys resolved registry pubkeys
+ * @param {string} masterPubkey the funding root — never a top-up TARGET of itself
+ * @returns {{ safe: typeof targets, rejected: Array<{name:string,pubkey:string,reason:string}> }}
+ */
+export function filterToRegistry(targets, allowedPubkeys, masterPubkey) {
+ const allowed = allowedPubkeys instanceof Set ? allowedPubkeys : new Set(allowedPubkeys);
+ const safe = [];
+ const rejected = [];
+ for (const t of targets) {
+ if (t.pubkey === masterPubkey) {
+ rejected.push({ name: t.name, pubkey: t.pubkey, reason: 'is_master' });
+ continue;
+ }
+ if (!allowed.has(t.pubkey)) {
+ rejected.push({ name: t.name, pubkey: t.pubkey, reason: 'not_in_registry' });
+ continue;
+ }
+ safe.push(t);
+ }
+ return { safe, rejected };
+}
+
+/**
+ * Resolve the base58 pubkey of every configured SOLANA_SIGNERS entry into a set.
+ * Secret-only (no RPC): each pubkey is derived from the signer's own key, so an
+ * unconfigured or undecodable signer simply isn't in the set (and thus can't be
+ * funded). This IS the allowlist the sweep enforces.
+ * @returns {Promise<Set<string>>}
+ */
+export async function resolveRegistryPubkeys() {
+ const set = new Set();
+ for (const spec of SOLANA_SIGNERS) {
+ try {
+ const { pubkey } = await resolveSignerPubkey(spec);
+ if (pubkey) set.add(pubkey);
+ } catch {
+ /* an unresolvable signer is simply not on the allowlist */
+ }
+ }
+ return set;
+}
+
/**
* Execute the guarded auto-refill sweep. Reads the master balance on-chain,
* plans the top-ups, then transfers each. Returns a structured result for the
@@ -130,10 +183,14 @@ export function planTopUps(masterSol, targets) {
export async function sweepTopUps({ connection, targets, network = 'mainnet' }) {
const master = await loadEconomyMaster();
if (!master) {
- return { configured: false, funded: [], failed: [], skipped: [], spentSol: 0 };
+ return { configured: false, funded: [], failed: [], skipped: [], rejected: [], spentSol: 0 };
}
+ // Hard allowlist: SOL only ever leaves the master toward a resolved registry
+ // signer, never the master itself, and never an off-registry address.
+ const allowed = await resolveRegistryPubkeys();
+ const { safe, rejected } = filterToRegistry(targets, allowed, master.publicKey.toBase58());
const { sol: masterSol } = await getSolBalance(connection, master.publicKey);
- const { plan, skipped, spendableSol } = planTopUps(masterSol, targets);
+ const { plan, skipped, spendableSol } = planTopUps(masterSol, safe);
const funded = [];
const failed = [];
@@ -162,6 +219,7 @@ export async function sweepTopUps({ connection, targets, network = 'mainnet' })
funded,
failed,
skipped,
+ rejected,
spentSol: round(funded.reduce((s, f) => s + f.sol, 0)),
};
}
diff --git a/api/cron/treasury-topup.js b/api/cron/treasury-topup.js
index 51833eee3..05c0ecf4c 100644
--- a/api/cron/treasury-topup.js
+++ b/api/cron/treasury-topup.js
@@ -113,6 +113,16 @@ export default wrapCron(async (req, res) => {
);
}
+ // An off-registry target reaching the sweep means a bad caller/target list.
+ // No SOL moved (the allowlist blocked it), but a human should know why.
+ for (const r of result.rejected || []) {
+ await sendOpsAlert(
+ `🚫 Economy master blocked an off-registry target (${r.reason})`,
+ `refused to fund ${r.name} → ${r.pubkey}. Not a resolved SOLANA_SIGNERS wallet; the sweep skipped it. No SOL left the master.`,
+ { signature: `economy-reject:${r.pubkey}:${r.reason}` },
+ );
+ }
+
return json(res, 200, {
ok: true,
rpc: rpcUrl,
@@ -121,6 +131,7 @@ export default wrapCron(async (req, res) => {
funded: result.funded,
failed: result.failed,
skipped: result.skipped,
+ rejected: result.rejected || [],
spent_sol: result.spentSol,
master_sol: result.masterSol ?? null,
read_errors: errors,
diff --git a/api/oracle-share.js b/api/oracle-share.js
index 72fc71372..ca08ae78e 100644
--- a/api/oracle-share.js
+++ b/api/oracle-share.js
@@ -22,6 +22,8 @@ import { cors, wrap } from './_lib/http.js';
import { env } from './_lib/env.js';
const MINT_RE = /^[1-9A-HJ-NP-Za-km-z]{32,44}$/;
+const PUMP_V3 = 'https://frontend-api-v3.pump.fun';
+const PUMP_CURVE_INITIAL_REAL_TOKENS = 793_100_000 * 1e6; // matches api/_lib/oracle/market.js
export default wrap(async (req, res) => {
if (cors(req, res, { methods: 'GET,OPTIONS' })) return;
@@ -48,6 +50,14 @@ export default wrap(async (req, res) => {
row = null;
}
+ // Not scored yet (a brand-new launch Oracle hasn't observed) — pull the coin's
+ // real identity + bonding-curve state straight from pump.fun so the hero, the
+ // social card, and the client's market fallback are all rich from the first
+ // paint, not a generic placeholder. Best-effort: a pump outage degrades to the
+ // generic hero, never a broken page.
+ let pump = null;
+ if (!row) pump = await fetchPumpIdentity(mint);
+
const pageUrl = `${origin}/oracle/coin/${mint}`;
const ogImage = `${origin}/api/oracle/og?mint=${encodeURIComponent(mint)}`;
@@ -67,6 +77,16 @@ export default wrap(async (req, res) => {
}),
ogAlt: `${sym} Oracle conviction score ${score}`,
};
+ } else if (pump) {
+ const sym = pump.symbol ? `$${pump.symbol}` : shortMint(mint);
+ const curve = pump.complete
+ ? 'graduated to DEX'
+ : (pump.bonding_curve_pct != null ? `${Math.round(pump.bonding_curve_pct)}% along the bonding curve` : 'live on pump.fun');
+ meta = {
+ title: `${sym}${pump.name ? ` (${pump.name})` : ''} — Oracle · three.ws`,
+ desc: `${sym}${pump.name ? ` — ${pump.name}` : ''} · ${curve}. Oracle is reading who's buying, how, what it is, and how it's moving into one live conviction score. proof.not.promises — three.ws Oracle`,
+ ogAlt: `${sym} on three.ws Oracle`,
+ };
} else {
meta = {
title: `${shortMint(mint)} — Oracle conviction · three.ws`,
@@ -78,9 +98,47 @@ export default wrap(async (req, res) => {
res.statusCode = 200;
res.setHeader('content-type', 'text/html; charset=utf-8');
res.setHeader('cache-control', 'public, max-age=30, s-maxage=300, stale-while-revalidate=3600');
- res.end(renderHtml({ mint, row, meta, pageUrl, ogImage, origin }));
+ res.end(renderHtml({ mint, row, pump, meta, pageUrl, ogImage, origin }));
});
+// Real pump.fun identity + bonding-curve snapshot for a mint. Keyless public
+// endpoint; mirrors the pump branch of api/_lib/oracle/market.js. Returns null on
+// any failure so the caller degrades gracefully.
+async function fetchPumpIdentity(mint) {
+ try {
+ const r = await fetch(`${PUMP_V3}/coins-v2/${mint}`, {
+ headers: { accept: 'application/json' },
+ signal: AbortSignal.timeout(3500),
+ });
+ if (!r.ok) return null;
+ const d = await r.json();
+ if (!d || !d.mint) return null;
+ const complete = Boolean(d.complete);
+ const realTok = Number(d.real_token_reserves);
+ let bondingPct = complete ? 100 : null;
+ if (bondingPct == null && Number.isFinite(realTok) && realTok >= 0) {
+ bondingPct = Math.max(0, Math.min(100, (1 - realTok / PUMP_CURVE_INITIAL_REAL_TOKENS) * 100));
+ }
+ return {
+ symbol: d.symbol || null,
+ name: d.name || null,
+ image: d.image_uri || null,
+ description: d.description || null,
+ creator: d.creator || null,
+ created_at: d.created_timestamp ? new Date(Number(d.created_timestamp)).toISOString() : null,
+ complete,
+ bonding_curve_pct: bondingPct,
+ real_sol_reserves: Number.isFinite(Number(d.real_sol_reserves)) ? Number(d.real_sol_reserves) / 1e9 : null,
+ reply_count: Number.isFinite(Number(d.reply_count)) ? Number(d.reply_count) : null,
+ is_live: Boolean(d.is_currently_live),
+ market_cap_usd: Number.isFinite(Number(d.usd_market_cap)) ? Number(d.usd_market_cap) : null,
+ links: { website: d.website || null, twitter: d.twitter || null, telegram: d.telegram || null },
+ };
+ } catch {
+ return null;
+ }
+}
+
function redirect(res, to) {
res.statusCode = 302;
res.setHeader('location', to);
@@ -119,33 +177,51 @@ function pillarBar(kind, label, val) {
<div class="track"><div class="fill" style="width:${v || 0}%"></div></div></div>`;
}
-// Server-rendered hero — the conviction verdict, above the fold, from the DB.
-function heroHtml({ mint, row, origin }) {
- const sym = row?.symbol ? esc(row.symbol) : shortMint(mint);
- const name = row?.name ? esc(row.name) : '';
+// Server-rendered hero — the conviction verdict, above the fold, from the DB for
+// scored coins, or the coin's real pump.fun identity for a launch Oracle hasn't
+// observed yet (the client patches in the score once it lazy-scores). Either way
+// the hero shows the real coin, never a bare placeholder.
+function heroHtml({ mint, row, pump, origin }) {
+ const symRaw = row?.symbol || pump?.symbol || null;
+ const sym = symRaw ? esc(symRaw) : shortMint(mint);
+ const name = esc(row?.name || pump?.name || '');
const score = row ? Number(row.score ?? 0) : null;
const tier = row?.tier || 'watch';
const cat = row?.category || '';
const sw = Number(row?.smart_wallet_count || 0);
- const img = row?.image_uri
- ? `<img class="oc-img" src="${esc(row.image_uri)}" alt="${sym}" width="84" height="84" loading="eager">`
- : `<div class="oc-img">${esc((row?.symbol || mint)[0] || '?').toUpperCase()}</div>`;
+ const imgUri = row?.image_uri || pump?.image || '';
+ const img = imgUri
+ ? `<img class="oc-img" src="${esc(imgUri)}" alt="${sym}" width="84" height="84" loading="eager">`
+ : `<div class="oc-img">${esc((symRaw || mint)[0] || '?').toUpperCase()}</div>`;
+ // Dial: the score for scored coins; a "reading" state for fresh launches that
+ // the client fills in (id ocDial) once /api/oracle/coin returns a verdict.
const dial = score == null
- ? `<div class="dial t-watch"><b>—</b><span>pending</span></div>`
- : `<div class="dial t-${esc(tier)}"><b>${score}</b><div class="tierpill tp-${esc(tier)}">${esc(tier)} conviction</div></div>`;
+ ? `<div class="dial t-watch" id="ocDial"><b>··</b><div class="tierpill tp-watch">reading conviction</div></div>`
+ : `<div class="dial t-${esc(tier)}" id="ocDial"><b>${score}</b><div class="tierpill tp-${esc(tier)}">${esc(tier)} conviction</div></div>`;
- const pillars = `<div class="pillars">
+ const pillars = `<div class="pillars" id="ocPillars">
${pillarBar('ped', 'Who', row?.pedigree)}
${pillarBar('str', 'How', row?.structure)}
${pillarBar('nar', 'What', row?.narrative)}
${pillarBar('mom', 'Move', row?.momentum)}
</div>`;
+ // Pre-graduation coins carry a bonding-curve chip so the fresh-launch state is
+ // still informative before any conviction or DEX price exists.
+ const curvePct = pump?.bonding_curve_pct;
+ const curveChip = pump
+ ? (pump.complete
+ ? '<span class="chip sm">graduated ✓</span>'
+ : (curvePct != null ? `<span class="chip">curve <b>${Math.round(curvePct)}%</b></span>` : ''))
+ : '';
const metaChips = `<div class="coin-meta" style="margin-top:14px">
${cat ? `<span class="chip cat">${esc(cat)}</span>` : ''}
${sw > 0 ? `<span class="chip sm">${sw} proven wallet${sw === 1 ? '' : 's'}</span>` : ''}
${row?.scored_at ? `<span class="chip">scored <b>${esc(agoServer(row.scored_at))}</b></span>` : ''}
+ ${curveChip}
+ ${pump?.created_at ? `<span class="chip">age <b>${esc(agoServer(pump.created_at))}</b></span>` : ''}
+ ${pump?.is_live ? '<span class="chip sm">live now</span>' : ''}
</div>`;
const actions = `<div class="dr-actions">
@@ -157,7 +233,7 @@ function heroHtml({ mint, row, origin }) {
<button class="dr-act dr-watch" id="ocWatch" type="button" aria-pressed="false">☆ Watch</button>
<button class="dr-act" id="ocCopyMint" type="button" title="Copy mint address">Copy mint</button>
<button class="dr-act" id="ocCopyLink" type="button" title="Copy shareable link">Copy link</button>
- <a class="dr-act dr-share" href="${esc(shareTweet(mint, row, origin))}" target="_blank" rel="noopener">Share ↗</a>
+ <a class="dr-act dr-share" href="${esc(shareTweet(mint, row, pump, origin))}" target="_blank" rel="noopener">Share ↗</a>
</div>`;
return `<div class="oc-hero" id="ocHeroDynamic">
@@ -174,16 +250,27 @@ function heroHtml({ mint, row, origin }) {
function pumpUrl(mint) { return `https://pump.fun/coin/${mint}`; }
-function shareTweet(mint, row, origin) {
- const sym = row?.symbol || shortMint(mint);
- const score = row?.score ?? '—';
- const tier = row?.tier || 'watch';
+function shareTweet(mint, row, pump, origin) {
+ const sym = row?.symbol || pump?.symbol || shortMint(mint);
const shareUrl = `${origin}/oracle/coin/${mint}`;
- const text = `$${sym} — ${score}/100 ${tier} conviction on @trythreews Oracle\n\nWho · How · What · Move all fused into one score.\n${shareUrl}`;
+ if (row) {
+ const text = `$${sym} — ${row.score ?? '—'}/100 ${row.tier || 'watch'} conviction on @trythreews Oracle\n\nWho · How · What · Move all fused into one score.\n${shareUrl}`;
+ return `https://twitter.com/intent/tweet?text=${encodeURIComponent(text)}`;
+ }
+ const text = `$${sym} on @trythreews Oracle — who's buying, how, what it is, and how it's moving, fused into one live conviction score.\n${shareUrl}`;
return `https://twitter.com/intent/tweet?text=${encodeURIComponent(text)}`;
}
-export function renderHtml({ mint, row, meta, pageUrl, ogImage, origin }) {
+// Safe JSON for inlining into a <script> — neutralize </script> and JS line
+// separators so the boot payload can't break out of the tag.
+function jsonForScript(obj) {
+ return JSON.stringify(obj)
+ .replace(/</g, "\\u003c")
+ .split(String.fromCharCode(0x2028)).join("\\u2028")
+ .split(String.fromCharCode(0x2029)).join("\\u2029");
+}
+
+export function renderHtml({ mint, row, pump, meta, pageUrl, ogImage, origin }) {
const t = esc(meta.title);
const d = esc(meta.desc);
return `<!doctype html>
@@ -236,12 +323,13 @@ export function renderHtml({ mint, row, meta, pageUrl, ogImage, origin }) {
<main class="wrap">
<a class="oc-back" href="/oracle">← Oracle feed</a>
- ${heroHtml({ mint, row, origin })}
+ ${heroHtml({ mint, row, pump, origin })}
<div class="oc-body" id="ocDeep">
<div class="oc-spinner" aria-label="Loading conviction"></div>
</div>
</main>
+ <script>window.__OC_BOOT=${jsonForScript({ mint, pump: pump || null, hasVerdict: Boolean(row) })}</script>
<script type="module" src="/oracle-coin.js"></script>
<script src="/footer.js" defer></script>
</body>
diff --git a/data/changelog.json b/data/changelog.json
index 3d3c91a67..79e24aea1 100644
--- a/data/changelog.json
+++ b/data/changelog.json
@@ -3,8 +3,8 @@
"entries": [
{
"date": "2026-07-02",
- "title": "Every Oracle coin now has a full page, not just a pop-up",
- "summary": "Until now, opening a coin on Oracle gave you a slide-over drawer — great for a quick glance, but the shareable link just bounced back into that same drawer. Every coin now has a real standalone page at three.ws/oracle/coin/<mint>: the conviction verdict and four pillars render instantly at the top (served straight from the database, so the page paints fast and a shared link unfurls with the actual score on X, Telegram, Discord and Farcaster), then the full read fills in live below — why the score, the wallet structure, the narrative, the community pulse, who's in with every early wallet labeled, the ground-truth outcome, complete market intel, the 48-hour conviction trend, agent exits on the coin, related plays, and a live trade tape. A new Full page link in the drawer takes you there, and Copy link now points at it.",
+ "title": "Every pump.fun coin now has its own full Oracle page",
+ "summary": "Opening a coin on Oracle used to give you a slide-over drawer, and the shareable link just bounced back into that drawer. Now every coin has a real standalone page at three.ws/oracle/coin/<mint> — and it resolves for any pump.fun mint, even a launch Oracle has never scored. Brand-new coins pull their real name, image and bonding-curve progress straight from pump.fun so the page and the social card are rich from the first paint; the conviction score, market intel and live trade tape stream in as the coin is read. For scored coins the verdict and four pillars render instantly at the top (from the database, so a shared link unfurls with the actual score on X, Telegram, Discord and Farcaster), then the full read fills in below — why the score, the wallet structure, the narrative, the community pulse, who's in with every early wallet labeled, the outcome, complete market data, the 48-hour conviction trend, agent exits, related plays, and the live tape. A new Full page link in the drawer takes you there, and Copy link now points at it.",
"tags": [
"feature"
],
diff --git a/docs/x402-endpoints.md b/docs/x402-endpoints.md
index 779b2e612..e115b9705 100644
--- a/docs/x402-endpoints.md
+++ b/docs/x402-endpoints.md
@@ -59,6 +59,26 @@ The shared handler in `x402-paid-endpoint.js` builds the challenge
(`buildRequirements()`), verifies the submitted payment, settles it, runs the
endpoint logic, and issues a signed receipt.
+## Where payments land
+
+Most endpoints pay the **platform receiver** (`X402_PAY_TO_SOLANA` /
+`X402_PAY_TO_BASE`). Some deliberately override the receiver so the money reaches
+a third party instead — the platform is just the rail:
+
+| Endpoint | Receiver override | Who gets paid |
+| -------- | ----------------- | ------------- |
+| `/api/x402/skill-call` | per-skill `payTo` | the skill **author's** wallet ([skill-call.js:159](../api/x402/skill-call.js#L159)) |
+| `/api/x402/service` | `row.payout_address` | the **provider's** payout address for a listed service ([service.js:92](../api/x402/service.js#L92)) |
+| `/api/x402/cosmetic-purchase` | `creatorWallet` split | the cosmetic **creator** (platform keeps its cut) ([cosmetic-purchase.js:204](../api/x402/cosmetic-purchase.js#L204)) |
+| `/api/x402/dance-tip`, `/api/x402/club-cover` | platform receiver, then swept | performers, paid out by the `club-payouts` cron from `CLUB_SOLANA_TREASURY_SECRET_KEY_B64` |
+
+`/api/x402/ring-settle` is an **internal** primitive (`discoverable:false`) — it is
+deliberately not advertised in the 402 challenge or the discovery catalog; it
+recirculates funds back to `X402_PAY_TO_SOLANA` to keep the closed loop balanced
+([ring-settle.js:18](../api/x402/ring-settle.js#L18)). The full wallet-by-wallet
+picture — every receiver, tip, split, and treasury — is in the
+[money map](money-map.md).
+
## Intel & oracle endpoints
These return market/polling information and are the ones the autonomous loop pays
diff --git a/public/changelog.json b/public/changelog.json
index 2e705ac6b..191686215 100644
--- a/public/changelog.json
+++ b/public/changelog.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-07-02T11:52:18.233Z",
+ "generated_at": "2026-07-02T23:29:56.799Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json",
"site": {
"name": "three.ws",
@@ -93,8 +93,8 @@
{
"date": "2026-07-02",
"type": "update",
- "title": "Every Oracle coin now has a full page, not just a pop-up",
- "summary": "Until now, opening a coin on Oracle gave you a slide-over drawer — great for a quick glance, but the shareable link just bounced back into that same drawer. Every coin now has a real standalone page at three.ws/oracle/coin/<mint>: the conviction verdict and four pillars render instantly at the top (served straight from the database, so the page paints fast and a shared link unfurls with the actual score on X, Telegram, Discord and Farcaster), then the full read fills in live below — why the score, the wallet structure, the narrative, the community pulse, who's in with every early wallet labeled, the ground-truth outcome, complete market intel, the 48-hour conviction trend, agent exits on the coin, related plays, and a live trade tape. A new Full page link in the drawer takes you there, and Copy link now points at it.",
+ "title": "Every pump.fun coin now has its own full Oracle page",
+ "summary": "Opening a coin on Oracle used to give you a slide-over drawer, and the shareable link just bounced back into that drawer. Now every coin has a real standalone page at three.ws/oracle/coin/<mint> — and it resolves for any pump.fun mint, even a launch Oracle has never scored. Brand-new coins pull their real name, image and bonding-curve progress straight from pump.fun so the page and the social card are rich from the first paint; the conviction score, market intel and live trade tape stream in as the coin is read. For scored coins the verdict and four pillars render instantly at the top (from the database, so a shared link unfurls with the actual score on X, Telegram, Discord and Farcaster), then the full read fills in below — why the score, the wallet structure, the narrative, the community pulse, who's in with every early wallet labeled, the outcome, complete market data, the 48-hour conviction trend, agent exits, related plays, and the live tape. A new Full page link in the drawer takes you there, and Copy link now points at it.",
"link": "/oracle",
"tags": [
"feature"
diff --git a/public/changelog.xml b/public/changelog.xml
index 18bf2d499..edd6e10d0 100644
--- a/public/changelog.xml
+++ b/public/changelog.xml
@@ -71,12 +71,12 @@
<description>The flagship town's whole cast and economy now travel to every coin world on /play. Walk into any community and you'll find the full crew of twelve townsfolk selling real paid services — market reads, fact checks, security scans, vanity addresses, 3D mesh forging, coin launches and more, each settled on-chain in USDC — plus the ORACLE and NOVA agent exchange striking live x402 deals in the plaza, and an intel kiosk selling live market data for that world's own coin ($0.01 USDC, paid from your own wallet). The $THREE town keeps its signature frontier look and stays the front door of the metaverse.</description>
</item>
<item>
- <title>Every Oracle coin now has a full page, not just a pop-up</title>
+ <title>Every pump.fun coin now has its own full Oracle page</title>
<link>https://three.ws/oracle</link>
- <guid isPermaLink="false">2026-07-02:Every Oracle coin now has a full page, not just a pop-up</guid>
+ <guid isPermaLink="false">2026-07-02:Every pump.fun coin now has its own full Oracle page</guid>
<pubDate>Thu, 02 Jul 2026 12:00:00 GMT</pubDate>
<category>feature</category>
- <description>Until now, opening a coin on Oracle gave you a slide-over drawer — great for a quick glance, but the shareable link just bounced back into that same drawer. Every coin now has a real standalone page at three.ws/oracle/coin/&lt;mint&gt;: the conviction verdict and four pillars render instantly at the top (served straight from the database, so the page paints fast and a shared link unfurls with the actual score on X, Telegram, Discord and Farcaster), then the full read fills in live below — why the score, the wallet structure, the narrative, the community pulse, who's in with every early wallet labeled, the ground-truth outcome, complete market intel, the 48-hour conviction trend, agent exits on the coin, related plays, and a live trade tape. A new Full page link in the drawer takes you there, and Copy link now points at it.</description>
+ <description>Opening a coin on Oracle used to give you a slide-over drawer, and the shareable link just bounced back into that drawer. Now every coin has a real standalone page at three.ws/oracle/coin/&lt;mint&gt; — and it resolves for any pump.fun mint, even a launch Oracle has never scored. Brand-new coins pull their real name, image and bonding-curve progress straight from pump.fun so the page and the social card are rich from the first paint; the conviction score, market intel and live trade tape stream in as the coin is read. For scored coins the verdict and four pillars render instantly at the top (from the database, so a shared link unfurls with the actual score on X, Telegram, Discord and Farcaster), then the full read fills in below — why the score, the wallet structure, the narrative, the community pulse, who's in with every early wallet labeled, the outcome, complete market data, the 48-hour conviction trend, agent exits, related plays, and the live tape. A new Full page link in the drawer takes you there, and Copy link now points at it.</description>
</item>
<item>
<title>Live agent screens now reach the 3D world, and coin art loads everywhere</title>
diff --git a/public/features.json b/public/features.json
index c0df9d63f..82cd69e1a 100644
--- a/public/features.json
+++ b/public/features.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-07-02T11:52:18.220Z",
+ "generated_at": "2026-07-02T23:29:56.767Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json",
"site": {
"name": "three.ws",
diff --git a/public/oracle-coin.js b/public/oracle-coin.js
index 723a264eb..6a424c18a 100644
--- a/public/oracle-coin.js
+++ b/public/oracle-coin.js
@@ -20,6 +20,7 @@
const NETWORK = 'mainnet';
const MINT_RE = /^[1-9A-HJ-NP-Za-km-z]{32,44}$/;
const WATCH_KEY = 'ld_watchlist'; // shared with the feed + drawer on /oracle
+ const BOOT = window.__OC_BOOT || {}; // server-embedded identity + pump snapshot
const $ = (sel, root = document) => root.querySelector(sel);
const esc = (s) => String(s ?? '').replace(/[&<>"']/g, (c) => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#39;' }[c]));
@@ -305,6 +306,13 @@
wrap.classList.remove('mkt-loading');
wrap.removeAttribute('aria-busy');
if (!ok || !data || data.price?.usd == null) {
+ // No DEX/aggregator price yet — but a brand-new pump.fun launch still has
+ // a real bonding-curve state, which the server captured into __OC_BOOT.
+ // Render that so a curve-stage coin gets a live market card, not a void.
+ if (status === 404 && BOOT.pump) {
+ wrap.innerHTML = renderPumpMarket(BOOT.pump);
+ return;
+ }
wrap.innerHTML = status === 404
? `<div class="dr-sec">Market</div><div class="state" style="padding:20px 0">No live market yet — this mint hasn't started trading. Price, liquidity and holders appear the moment it does.</div>`
: `<div class="dr-sec">Market</div><div class="state" style="padding:20px 0">Live market data is momentarily unavailable. <button type="button" class="dr-act" id="ocMktRetry">Retry</button></div>`;
@@ -315,6 +323,33 @@
wrap.innerHTML = renderMarket(data);
}
+ // Pre-graduation market card from the pump.fun bonding-curve snapshot the server
+ // embedded — used when no aggregator price exists yet (a coin still on the curve).
+ function renderPumpMarket(pf) {
+ const pct = pf.bonding_curve_pct;
+ const curve = pf.complete
+ ? `<div class="mkt-row"><span class="chip sm">Graduated to DEX ✓</span></div>`
+ : (pct != null ? `<div class="mkt-curve">
+ <div class="mkt-curve-top"><span>Bonding curve</span><b>${Math.round(pct)}% to graduation</b></div>
+ <div class="mkt-curve-track"><div class="mkt-curve-fill" style="width:${Math.max(2, Math.min(100, pct))}%"></div></div>
+ ${pf.real_sol_reserves != null ? `<div class="mkt-curve-sub">${pf.real_sol_reserves.toFixed(1)} ◎ in curve${pf.reply_count ? ` · ${fmtInt(pf.reply_count)} replies` : ''}${pf.is_live ? ' · <span class="mkt-up">live now</span>' : ''}</div>` : ''}
+ </div>` : '');
+ const tiles = [
+ pf.market_cap_usd != null ? statTile('Market cap', fmtUsd(pf.market_cap_usd)) : '',
+ pf.real_sol_reserves != null ? statTile('In curve', `${pf.real_sol_reserves.toFixed(1)} ◎`) : '',
+ pf.created_at ? statTile('Age', ago(pf.created_at)) : '',
+ ].filter(Boolean).join('');
+ const chips = [
+ pf.reply_count != null ? `<span class="chip">replies <b>${fmtInt(pf.reply_count)}</b></span>` : '',
+ pf.creator ? `<span class="chip">creator <b>${esc(shortAddr(pf.creator))}</b></span>` : '',
+ ].filter(Boolean).join('');
+ return `<div class="dr-sec">Market <span style="color:var(--faint);font-weight:400;font-size:10px">pump.fun · pre-DEX</span></div>
+ ${tiles ? `<div class="mkt-stats">${tiles}</div>` : ''}
+ ${curve}
+ ${chips ? `<div class="coin-meta" style="margin-top:10px">${chips}</div>` : ''}
+ <div class="mkt-src">Live · pumpfun — full metrics populate once it lists on a DEX</div>`;
+ }
+
async function loadSentiment(mint) {
const wrap = $('#ocPulse');
if (!wrap) return;
@@ -368,7 +403,7 @@
} catch { /* non-fatal */ }
}
- async function loadRelated(mint, category, onOpen) {
+ async function loadRelated(mint, category) {
const wrap = $('#ocRelated');
if (!wrap || !category) return;
const { ok, data } = await api(`/api/oracle/feed?network=${NETWORK}&category=${encodeURIComponent(category)}&limit=6&min_score=60`);
@@ -394,12 +429,8 @@
</a>`;
}).join('')}
</div>`;
- wrap.querySelectorAll('.dr-related').forEach((el) => el.addEventListener('click', (e) => {
- // Same-page navigation without a reload for a snappier feel; falls back to href.
- if (e.metaKey || e.ctrlKey || e.shiftKey) return;
- e.preventDefault();
- onOpen(el.dataset.relatedMint);
- }));
+ // Related coins are plain links to their own full pages — each gets its own
+ // server-rendered hero + social card on navigation.
}
// ── live trade tape (ported from src/oracle-tape.js) ───────────────────────
@@ -473,40 +504,38 @@
return q && MINT_RE.test(q) ? q : null;
}
- async function render(mint) {
- const deep = $('#ocDeep');
- if (!deep) return;
- deep.innerHTML = '<div class="oc-spinner" aria-label="Loading conviction"></div>';
- const { ok, data } = await api(`/api/oracle/coin?mint=${encodeURIComponent(mint)}&network=${NETWORK}`, { timeout: 20000 });
- if (!ok || !data || !data.conviction) {
- deep.innerHTML = `<div class="state"><b>This launch hasn't been scored yet</b>Oracle scores coins as they surface on pump.fun. If it's brand new, it'll appear here within moments. <button type="button" class="dr-act" id="ocRetry">Retry</button></div>`;
- $('#ocRetry')?.addEventListener('click', () => render(mint));
- return;
+ // Patch the server-rendered hero dial + pillars once a live verdict arrives.
+ // For a fresh launch the SSR hero shows a "reading" state; this fills it in the
+ // moment /api/oracle/coin returns a score, so the top of the page never lies.
+ function updateHero(c) {
+ const dial = $('#ocDial');
+ if (dial && c.score != null) {
+ dial.className = `dial t-${c.tier || 'watch'}`;
+ dial.innerHTML = `<b>${c.score}</b><div class="tierpill tp-${esc(c.tier || 'watch')}">${esc(c.tier || 'watch')} conviction</div>`;
}
- const c = data.conviction;
- document.title = `${c.symbol ? `$${c.symbol}` : mint.slice(0, 8)} — ${c.score}/100 ${c.tier || ''} conviction · Oracle · three.ws`;
-
- const reasons = (data.reasons || []).map((r) => `<div class="reason"><span class="rdot ${esc(r.pillar)}"></span><span>${esc(r.text)}</span></div>`).join('') || '<div class="state" style="padding:20px 0">No breakdown available.</div>';
- const narr = data.narrative;
- const whos = (data.whos_in || []).map(whoRow).join('') || '<div class="state" style="padding:20px 0">No wallet footprint recorded yet.</div>';
- const out = data.outcome;
- const comp = data.components || {};
+ const p = c.pillars || {};
+ const set = (kind, val) => {
+ const el = $(`#ocPillars .pil.${kind}`);
+ if (!el || val == null) return;
+ const b = el.querySelector('.lab b'); if (b) b.textContent = Math.round(val);
+ const fill = el.querySelector('.fill'); if (fill) fill.style.width = `${Math.max(0, Math.min(100, val))}%`;
+ };
+ set('ped', p.pedigree); set('str', p.structure); set('nar', p.narrative); set('mom', p.momentum);
+ }
+ // The conviction-independent scaffold: identity is already in the SSR hero, so
+ // market + live trades render immediately for ANY mint. The conviction column
+ // fills in (or shows an "observing" state) once /api/oracle/coin resolves.
+ function buildScaffold(mint) {
+ const deep = $('#ocDeep');
+ if (!deep) return;
deep.innerHTML = `
- ${drawerTake(data)}
+ <div id="ocTake"></div>
<div id="ocHistory"></div>
<div class="oc-cols">
- <div>
- <div class="dr-sec">Why this score</div>${reasons}
- ${narr ? `<div class="dr-sec">Narrative</div><div style="font-size:13.5px;color:var(--ink)">${esc(narr.narrative || '')}</div>
- <div class="coin-meta" style="margin-top:8px"><span class="chip cat">${esc(narr.category)}</span><span class="chip">virality <b>${narr.virality ?? '—'}</b></span><span class="chip">${esc(narr.source || '')}</span></div>` : ''}
- <div id="ocPulse"></div>
- ${structurePanel(comp.structure)}
- ${out ? `<div class="dr-sec">Outcome</div><div class="coin-meta">
- <span class="chip ${out.graduated ? 'sm' : out.rugged ? 'flag' : ''}">${out.graduated ? 'graduated ✓' : out.rugged ? 'rugged ✕' : 'live'}</span>
- ${out.ath_multiple ? `<span class="chip">ATH <b>${Number(out.ath_multiple).toFixed(1)}×</b></span>` : ''}</div>` : ''}
- <div class="dr-sec">Who's in <span style="color:var(--faint)">(${(data.whos_in || []).length})</span></div>${whos}
- <div id="ocProof"></div>
+ <div id="ocConviction">
+ <div class="dr-sec">Conviction</div>
+ <div class="oc-spinner" aria-label="Reading conviction"></div>
</div>
<div>
<div id="ocMarket" class="mkt-loading" aria-busy="true">
@@ -518,32 +547,68 @@
<div id="ocRelated"></div>
</div>
</div>`;
-
- loadHistory(mint);
loadMarket(mint);
- loadSentiment(mint);
- loadProofTrades(mint);
- loadRelated(mint, c.category, openMint);
-
+ loadHistory(mint);
+ loadProofTrades(mint); // renders into #ocProof once the conviction column exists
if (window.__ocTape) { try { window.__ocTape.destroy(); } catch {} }
const tapeEl = $('#ocTape');
if (tapeEl) window.__ocTape = mountTape(tapeEl, mint);
}
- function openMint(mint) {
- if (!mint || !MINT_RE.test(mint)) return;
- history.pushState(null, '', `/oracle/coin/${mint}`);
- wireHeroForSwap(mint);
- render(mint);
- window.scrollTo({ top: 0, behavior: 'smooth' });
+ function fillConviction(data, mint) {
+ const col = $('#ocConviction');
+ if (!col) return;
+ const c = data.conviction;
+ document.title = `${c.symbol ? `$${c.symbol}` : mint.slice(0, 8)} — ${c.score}/100 ${c.tier || ''} conviction · Oracle · three.ws`;
+ updateHero(c);
+ const reasons = (data.reasons || []).map((r) => `<div class="reason"><span class="rdot ${esc(r.pillar)}"></span><span>${esc(r.text)}</span></div>`).join('') || '<div class="state" style="padding:20px 0">No breakdown available.</div>';
+ const narr = data.narrative;
+ const whos = (data.whos_in || []).map(whoRow).join('') || '<div class="state" style="padding:20px 0">No wallet footprint recorded yet.</div>';
+ const out = data.outcome;
+ const comp = data.components || {};
+ col.innerHTML = `
+ <div class="dr-sec">Why this score</div>${reasons}
+ ${narr ? `<div class="dr-sec">Narrative</div><div style="font-size:13.5px;color:var(--ink)">${esc(narr.narrative || '')}</div>
+ <div class="coin-meta" style="margin-top:8px"><span class="chip cat">${esc(narr.category)}</span><span class="chip">virality <b>${narr.virality ?? '—'}</b></span><span class="chip">${esc(narr.source || '')}</span></div>` : ''}
+ <div id="ocPulse"></div>
+ ${structurePanel(comp.structure)}
+ ${out ? `<div class="dr-sec">Outcome</div><div class="coin-meta">
+ <span class="chip ${out.graduated ? 'sm' : out.rugged ? 'flag' : ''}">${out.graduated ? 'graduated ✓' : out.rugged ? 'rugged ✕' : 'live'}</span>
+ ${out.ath_multiple ? `<span class="chip">ATH <b>${Number(out.ath_multiple).toFixed(1)}×</b></span>` : ''}</div>` : ''}
+ <div class="dr-sec">Who's in <span style="color:var(--faint)">(${(data.whos_in || []).length})</span></div>${whos}
+ <div id="ocProof"></div>`;
+ const take = $('#ocTake');
+ if (take) take.innerHTML = drawerTake(data);
+ loadHistory(mint);
+ loadSentiment(mint);
+ loadProofTrades(mint);
+ loadRelated(mint, c.category);
+ }
+
+ function renderObserving(mint, retry) {
+ const col = $('#ocConviction');
+ if (!col) return;
+ col.innerHTML = `<div class="dr-sec">Conviction</div>
+ <div class="state" style="padding:28px 20px">
+ <b>Oracle is reading this launch</b>
+ A conviction score fuses who's buying, how, what it is, and how it's moving — it appears here within moments of a coin surfacing on pump.fun. The live market and trade tape are already streaming.
+ <div style="margin-top:14px"><button type="button" class="dr-act" id="ocRetry">${retry >= 4 ? 'Check again' : 'Checking…'}</button></div>
+ </div>`;
+ $('#ocRetry')?.addEventListener('click', () => render(mint, { retry: 0 }));
}
- // When navigating between coins in-page, the SSR hero is stale — the deep
- // section already re-renders with fresh data, so hide the now-mismatched hero
- // and let the deep view lead. (Direct loads always get the correct SSR hero.)
- function wireHeroForSwap(mint) {
- const hero = $('#ocHeroDynamic');
- if (hero) hero.style.display = 'none';
+ async function render(mint, { retry = 0 } = {}) {
+ const deep = $('#ocDeep');
+ if (!deep) return;
+ if (deep.dataset.scaffold !== mint) { deep.dataset.scaffold = mint; buildScaffold(mint); }
+ const { ok, data } = await api(`/api/oracle/coin?mint=${encodeURIComponent(mint)}&network=${NETWORK}`, { timeout: 20000 });
+ if (ok && data && data.conviction) { fillConviction(data, mint); return; }
+ // Not scored yet — /api/oracle/coin lazy-scores on the first hit, so a short
+ // backoff usually fills it. Keep the streaming market + tape untouched.
+ renderObserving(mint, retry);
+ if (retry < 4 && deep.dataset.scaffold === mint) {
+ setTimeout(() => { if (deep.dataset.scaffold === mint) render(mint, { retry: retry + 1 }); }, 4000 + retry * 2000);
+ }
}
function boot() {
@@ -553,7 +618,7 @@
render(mint);
window.addEventListener('popstate', () => {
const m = mintFromPath();
- if (m) { location.reload(); }
+ if (m && m !== $('#ocDeep')?.dataset.scaffold) location.reload();
});
}
diff --git a/scripts/wire-master-wallet.mjs b/scripts/wire-master-wallet.mjs
index 10d638355..3ea66bc4e 100755
--- a/scripts/wire-master-wallet.mjs
+++ b/scripts/wire-master-wallet.mjs
@@ -54,9 +54,9 @@ const WALLETS = {
pubkey: 'wwwqvAbN4RjaRvfGsorxMuauq7SWVcV13Aa7GaqHGUn',
desc: 'SOL-burning autonomous engines (funded ~2.77 SOL)',
},
- wwwu: {
- pubkey: 'wwwuGbqHrwF5RG89KhUbmRWEvjnRH9k5kVM5p7T3WwW',
- desc: 'platform treasury + revenue/payouts face (FUND before use)',
+ Wwwu: {
+ pubkey: 'WwwuGbqHrwF5RG89KhUbmRWEvjnRH9k5kVM5p7T3WwW',
+ desc: 'platform treasury + revenue/payouts face (funded ~10 SOL + USDC)',
},
};
@@ -76,15 +76,15 @@ const ASSIGNMENTS = [
{ env: 'COIN_TREASURY_SECRET_KEY_B64', wallet: 'wwwqv', enc: 'base64', note: 'coin lottery/reflection payouts (strict base64)' },
// ── wwwu: the platform treasury + revenue/payout face (fund it) ──
- { env: 'PLATFORM_TREASURY_KEYPAIR', wallet: 'wwwu', enc: 'base64', note: 'shared platform treasury / withdrawal gas' },
- { env: 'MARKETPLACE_PAYER_KEYPAIR', wallet: 'wwwu', enc: 'base64', note: 'gasless checkout fee-payer' },
- { env: 'THREE_BUYBACK_SECRET_KEY_B64', wallet: 'wwwu', enc: 'base64', note: '$THREE buyback (holds USDC revenue)' },
- { env: 'CLUB_SOLANA_TREASURY_SECRET_KEY_B64', wallet: 'wwwu', enc: 'base64', note: 'club tip sweeps' },
- { env: 'VANITY_BOUNTY_PAYOUT_KEY', wallet: 'wwwu', enc: 'base58', note: 'vanity bounty payouts (strict base58)' },
- { env: 'REWARDS_DISTRIBUTOR_SECRET', wallet: 'wwwu', enc: 'base58', note: '$THREE holder rewards distributor' },
+ { env: 'PLATFORM_TREASURY_KEYPAIR', wallet: 'Wwwu', enc: 'base64', note: 'shared platform treasury / withdrawal gas' },
+ { env: 'MARKETPLACE_PAYER_KEYPAIR', wallet: 'Wwwu', enc: 'base64', note: 'gasless checkout fee-payer' },
+ { env: 'THREE_BUYBACK_SECRET_KEY_B64', wallet: 'Wwwu', enc: 'base64', note: '$THREE buyback (holds USDC revenue)' },
+ { env: 'CLUB_SOLANA_TREASURY_SECRET_KEY_B64', wallet: 'Wwwu', enc: 'base64', note: 'club tip sweeps' },
+ { env: 'VANITY_BOUNTY_PAYOUT_KEY', wallet: 'Wwwu', enc: 'base58', note: 'vanity bounty payouts (strict base58)' },
+ { env: 'REWARDS_DISTRIBUTOR_SECRET', wallet: 'Wwwu', enc: 'base58', note: '$THREE holder rewards distributor' },
// ── already LIVE — skipped unless --include-live (rerouting strands funds) ──
- { env: 'LABOR_ESCROW_SECRET_BASE58', wallet: 'wwwu', enc: 'base58', live: true, note: 'labor escrow — LIVE on its own wallet; migrate balances before rerouting' },
+ { env: 'LABOR_ESCROW_SECRET_BASE58', wallet: 'Wwwu', enc: 'base58', live: true, note: 'labor escrow — LIVE on its own wallet; migrate balances before rerouting' },
// Intentionally EXCLUDED entirely: SOLANA_AGENT_COLLECTION_AUTHORITY_KEY
// (on-chain NFT-collection update authority — must stay its original wallet).
diff --git a/tasks/onchain-deployment/SOLANA-SIGNERS.md b/tasks/onchain-deployment/SOLANA-SIGNERS.md
index 93cf4b82d..7e0ef2132 100644
--- a/tasks/onchain-deployment/SOLANA-SIGNERS.md
+++ b/tasks/onchain-deployment/SOLANA-SIGNERS.md
@@ -44,7 +44,7 @@ Encodings: `base64` = base64 of the 64 raw secret-key bytes (`…_B64` vars); `b
|---|---|---|
| `wwwww…ccrU` | x402 receiver + closed-loop spender (holds USDC) | `X402_SEED_SOLANA_SECRET_BASE58`, `PUMP_X402_LAUNCHER_SECRET_KEY_B64`, `A2A_PAYER_SOLANA_SECRET` |
| `wwwqv…HGUn` | SOL-burning autonomous engines (funded ~2.77 SOL) | `LAUNCHER_MASTER_SECRET_KEY_B64`, `PUMP_CRON_RELAYER_SECRET_KEY_B64`, `CIRCULATION_TREASURY_SECRET`, `THREEWS_SOL_PARENT_SECRET_BASE58`, `COIN_TREASURY_SECRET_KEY_B64` |
-| `wwwu…WwW` | platform treasury + revenue/payouts (fund before use) | `PLATFORM_TREASURY_KEYPAIR`, `MARKETPLACE_PAYER_KEYPAIR`, `THREE_BUYBACK_SECRET_KEY_B64`, `CLUB_SOLANA_TREASURY_SECRET_KEY_B64`, `VANITY_BOUNTY_PAYOUT_KEY`, `REWARDS_DISTRIBUTOR_SECRET` |
+| `WwwuGbqHrwF5…T3WwW` (capital W) | platform treasury + revenue/payouts (funded ~10 SOL + USDC) | `PLATFORM_TREASURY_KEYPAIR`, `MARKETPLACE_PAYER_KEYPAIR`, `THREE_BUYBACK_SECRET_KEY_B64`, `CLUB_SOLANA_TREASURY_SECRET_KEY_B64`, `VANITY_BOUNTY_PAYOUT_KEY`, `REWARDS_DISTRIBUTOR_SECRET` |
`LABOR_ESCROW_SECRET_BASE58` is already **live** on its own wallet — the tool skips it unless you pass `--include-live` (rerouting strands any escrowed funds; migrate balances first). `SOLANA_AGENT_COLLECTION_AUTHORITY_KEY` is never touched.
@@ -52,22 +52,22 @@ Encodings: `base64` = base64 of the 64 raw secret-key bytes (`…_B64` vars); `b
# 1. Put each wallet's secret in its own local file (base58 / base64 / JSON array).
# NEVER commit them. NEVER paste them into a chat.
echo '<wwwqv-secret>' > wwwqv.key
-echo '<wwwu-secret>' > wwwu.key
+echo '<Wwwu-secret>' > Wwwu.key
echo '<wwwww-secret>' > wwwww.key
# 2. Dry run — prints the full plan, sets nothing:
-node scripts/wire-master-wallet.mjs --key wwwqv=./wwwqv.key --key wwwu=./wwwu.key --key wwwww=./wwwww.key
+node scripts/wire-master-wallet.mjs --key wwwqv=./wwwqv.key --key Wwwu=./Wwwu.key --key wwwww=./wwwww.key
# 3. Apply to Vercel production (overwrite existing), add --preview to also do preview:
node scripts/wire-master-wallet.mjs \
- --key wwwqv=./wwwqv.key --key wwwu=./wwwu.key --key wwwww=./wwwww.key \
+ --key wwwqv=./wwwqv.key --key Wwwu=./Wwwu.key --key wwwww=./wwwww.key \
--apply --overwrite
# 4. Redeploy, then verify pubkeys + balances:
node scripts/check-relayer-balances.mjs
# 5. Shred the local key files.
-shred -u wwwqv.key wwwu.key wwwww.key
+shred -u wwwqv.key Wwwu.key wwwww.key
```
Each key is decoded locally and MUST derive to its wallet's expected pubkey or the run aborts (guards against wiring the wrong key). You can wire one wallet at a time — slots whose key you didn't provide are skipped. Every var is set `--sensitive`, so keep your own copy — Vercel Sensitive vars are unreadable after save.
diff --git a/tests/economy-master.test.js b/tests/economy-master.test.js
index 3ffc7c6f5..9a1523eea 100644
--- a/tests/economy-master.test.js
+++ b/tests/economy-master.test.js
@@ -5,6 +5,7 @@ import { test } from 'vitest';
import assert from 'node:assert/strict';
import {
planTopUps,
+ filterToRegistry,
RESERVE_SOL,
PER_TOPUP_MAX_SOL,
RUN_CAP_SOL,
@@ -63,3 +64,40 @@ test('neediest first: the most-drained engine wins a tight run cap', () => {
]);
assert.equal(plan[0].name, 'big');
});
+
+// filterToRegistry is the hard leak guard: SOL can only ever move to a resolved
+// registry signer, never off-registry and never the master itself.
+test('allowlist: an off-registry pubkey is rejected, never funded', () => {
+ const allowed = new Set(['ENGINE_A', 'ENGINE_B']);
+ const { safe, rejected } = filterToRegistry(
+ [
+ { name: 'legit', pubkey: 'ENGINE_A', currentSol: 0, refillToSol: 0.5 },
+ { name: 'attacker', pubkey: 'EVIL_ADDR', currentSol: 0, refillToSol: 0.5 },
+ ],
+ allowed,
+ 'MASTER',
+ );
+ assert.deepEqual(safe.map((t) => t.name), ['legit']);
+ assert.deepEqual(rejected, [{ name: 'attacker', pubkey: 'EVIL_ADDR', reason: 'not_in_registry' }]);
+});
+
+test('allowlist: the master is never a top-up target of itself', () => {
+ const allowed = new Set(['MASTER', 'ENGINE_A']);
+ const { safe, rejected } = filterToRegistry(
+ [{ name: 'economy-master', pubkey: 'MASTER', currentSol: 0, refillToSol: 999 }],
+ allowed,
+ 'MASTER',
+ );
+ assert.equal(safe.length, 0);
+ assert.deepEqual(rejected, [{ name: 'economy-master', pubkey: 'MASTER', reason: 'is_master' }]);
+});
+
+test('allowlist: an empty registry funds nothing (safe default)', () => {
+ const { safe, rejected } = filterToRegistry(
+ [{ name: 'e', pubkey: 'ENGINE_A', currentSol: 0, refillToSol: 0.5 }],
+ new Set(),
+ 'MASTER',
+ );
+ assert.equal(safe.length, 0);
+ assert.equal(rejected.length, 1);
+});