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.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
feat: enhance pedigree scoring with creator history and proven sell adjustments; persist chart view preference
zprve6e04abb9ebb
diff --git a/api/_lib/oracle/conviction.js b/api/_lib/oracle/conviction.jsindex a1506f795..438047e3f 100644--- a/api/_lib/oracle/conviction.js+++ b/api/_lib/oracle/conviction.js@@ -44,16 +44,23 @@ const clamp = (n, lo = 0, hi = 100) => Math.max(lo, Math.min(hi, n));const num = (v, d = 0) => (Number.isFinite(Number(v)) ? Number(v) : d);/**- * Pedigree — the quality of the wallets buying. Driven by the data brain's- * pre-computed coin_smart_money.score when present (it is already pedigree-- * weighted 0–100), then nudged by the count of proven wallets and dragged down- * hard by any flagged (rugger/dumper) wallets in the book.+ * Pedigree — the quality of the wallets buying AND the wallet that launched the+ * coin. Driven by the data brain's pre-computed coin_smart_money.score when+ * present (it is already pedigree-weighted 0–100), then nudged by the count of+ * proven wallets, dragged down hard by any flagged (rugger/dumper) wallets in the+ * book, by proven money already exiting, and by a creator with a rug history.+ *+ * Returns an optional `cap` (≤100): a confirmed serial-rugger creator ceilings the+ * FINAL score the same way a bundle structure does — pedigree among buyers can't+ * paper over the dev who shipped a graveyard of dead launches.** @param {object} sm smartMoney slice of CoinIntel- * @returns {{score:number, reasons:string[]}}+ * @param {object} creator creator slice of CoinIntel { label, launches, launchWins, dumpRate }+ * @returns {{score:number, reasons:string[], cap:number}}*/-export function pedigreeScore(sm = {}) {+export function pedigreeScore(sm = {}, creator = {}) {const reasons = [];+ let cap = 100;const notable = Array.isArray(sm.notable) ? sm.notable : [];const provenWallets = notable.filter((w) => isProven(w.label, w.score));const flaggedWallets = notable.filter((w) => isFlagged(w.label));@@ -92,7 +99,37 @@ export function pedigreeScore(sm = {}) {reasons.push(`${flaggedWallets.length} flagged wallet${flaggedWallets.length > 1 ? 's' : ''} (rugger/dumper) in the book`);}- return { score: clamp(score), reasons };+ // Proven money already heading for the exit. If the smart wallets that bought+ // are selling a meaningful share of what they put in, the pedigree signal is+ // being unwound in real time — discount it.+ const provenSell = num(sm.provenSellLamports);+ if (proven > 0 && provenSell > 0) {+ const exitShare = provenSell / proven;+ if (exitShare >= 0.5) { score -= 16; reasons.push(`smart money already sold ${Math.round(exitShare * 100)}% of its position`); }+ else if (exitShare >= 0.25) { score -= 8; reasons.push(`smart money trimming (${Math.round(exitShare * 100)}% sold)`); }+ }++ // Creator track record. A proven shipper lifts pedigree; a serial rugger both+ // drags it and ceilings the final score. First-time / unjudged creators are+ // neutral — absence of a record is not a red flag.+ const launches = num(creator?.launches);+ const launchWins = num(creator?.launchWins);+ if (isFlagged(creator?.label) || (launches >= 3 && launchWins === 0)) {+ score -= 22; cap = Math.min(cap, 45);+ reasons.push(launches >= 3+ ? `creator has ${launches} prior launches, none graduated — rug pattern`+ : 'creator wallet flagged as a rugger');+ } else if (launchWins >= 3) {+ score += 12; reasons.push(`creator has shipped ${launchWins} graduated launches`);+ } else if (launchWins >= 1) {+ score += 6; reasons.push(`creator shipped ${launchWins} graduated launch${launchWins > 1 ? 'es' : ''}`);+ }+ const creatorDump = num(creator?.dumpRate); // 0..1+ if (launches >= 2 && creatorDump >= 0.5) {+ score -= 8; reasons.push(`creator dumps ${Math.round(creatorDump * 100)}% of their launches`);+ }++ return { score: clamp(score), reasons, cap };}/**@@ -134,6 +171,23 @@ export function structureScore(st = {}) {reasons.push(`buyers are heavily interconnected (${Math.round(connectivity)}%)`);}+ // Sniped launch: a large share of buy volume landed in the first seconds — the+ // open was raced by bots, not discovered organically. High snipe pressure means+ // a thin, reflexive top that distributes onto later buyers.+ const snipeRatio = num(st.snipeRatio, NaN);+ if (Number.isFinite(snipeRatio)) {+ if (snipeRatio >= 70) { score -= 16; cap = Math.min(cap, 50); reasons.push(`${Math.round(snipeRatio)}% of early volume sniped in the first seconds`); }+ else if (snipeRatio >= 45) { score -= 8; reasons.push(`${Math.round(snipeRatio)}% sniped at the open`); }+ }++ // Fresh/farmed-wallet share: a book dominated by brand-new, single-purpose+ // wallets is a farm, not a crowd — the canonical bundle disguise.+ const freshWalletRatio = num(st.freshWalletRatio, NaN);+ if (Number.isFinite(freshWalletRatio)) {+ if (freshWalletRatio >= 70) { score -= 18; cap = Math.min(cap, 48); reasons.push(`${Math.round(freshWalletRatio)}% of buyers are fresh/farmed wallets`); }+ else if (freshWalletRatio >= 45) { score -= 9; reasons.push(`${Math.round(freshWalletRatio)}% of buyers are fresh wallets`); }+ }+const uniqueBuyers = num(st.uniqueBuyers);if (uniqueBuyers >= 60) { score += 16; reasons.push(`${uniqueBuyers} unique early buyers — broad base`); }else if (uniqueBuyers >= 25) { score += 9; reasons.push(`${uniqueBuyers} unique early buyers`); }diff --git a/src/launch-detail.js b/src/launch-detail.jsindex 5d95c7416..2cedbe597 100644--- a/src/launch-detail.js+++ b/src/launch-detail.js@@ -50,10 +50,32 @@ const state = {coin: null,tape: null, // EventSource handlechartInterval: '15m',- chartView: 'native', // 'native' (Birdeye area chart) | 'dexscreener' (interactive embed)+ chartView: 'native', // 'native' (Birdeye area chart) | 'dexscreener' (interactive embed); hydrated from localStorage in boot()+ dexFrameTimer: 0, // watchdog for a stalled DexScreener embedpriceTimer: 0,};+// The chart-source choice is a viewing preference, not coin-specific — persist it+// so a trader who prefers the full DexScreener terminal keeps it across coins.+const CHART_VIEW_KEY = 'ld_chart_view';++function readChartView() {+ try {+ const v = localStorage.getItem(CHART_VIEW_KEY);+ return v === 'dexscreener' || v === 'native' ? v : 'native';+ } catch {+ return 'native';+ }+}++function writeChartView(view) {+ try {+ localStorage.setItem(CHART_VIEW_KEY, view);+ } catch {+ /* storage full / blocked — non-fatal, the in-memory state still switches */+ }+}+// ── Jupiter Terminal lazy loader ─────────────────────────────────────────────// We load the Jupiter Terminal script only when the user clicks Buy, so it// never slows down cold page loads. The script self-registers as window.Jupiter.@@ -1061,6 +1083,7 @@ function chartViewBar() {onclick: () => {if (state.chartView === value) return;state.chartView = value;+ writeChartView(value);renderChart();},}),@@ -1084,31 +1107,47 @@ function dexEmbedUrl() {return `https://dexscreener.com/solana/${encodeURIComponent(state.mint)}?${params}`;}-function renderDexChart(target) {- const views = chartViewBar();- const open = el('a', {+function dexLink() {+ return el('a', {class: 'ld-chart-open',href: `https://dexscreener.com/solana/${encodeURIComponent(state.mint)}`,target: '_blank',rel: 'noopener',text: 'Open in DexScreener ↗',});- const frame = el('div', { class: 'ld-dex-wrap' }, [- el('div', { class: 'ld-skel ld-skel-chart' }),- el('iframe', {- class: 'ld-dex-frame',- src: dexEmbedUrl(),- title: 'DexScreener live chart',- loading: 'lazy',- onload: (e) => e.target.parentElement.classList.add('ld-dex-ready'),- }),- ]);- section(- target,- 'Price',- el('div', { class: 'ld-chart' }, [el('div', { class: 'ld-chart-controls' }, [views, open]), frame]),- { tag: 'DexScreener · live' },- );+}++function renderDexChart(target) {+ clearTimeout(state.dexFrameTimer);+ const controls = el('div', { class: 'ld-chart-controls' }, [chartViewBar(), dexLink()]);+ const wrap = el('div', { class: 'ld-dex-wrap' });+ const iframe = el('iframe', {+ class: 'ld-dex-frame',+ src: dexEmbedUrl(),+ title: 'DexScreener live chart',+ loading: 'lazy',+ onload: () => {+ clearTimeout(state.dexFrameTimer);+ wrap.classList.add('ld-dex-ready');+ },+ });+ wrap.replaceChildren(el('div', { class: 'ld-skel ld-skel-chart' }), iframe);+ section(target, 'Price', el('div', { class: 'ld-chart' }, [controls, wrap]), { tag: 'DexScreener · live' });++ // Watchdog: if the embed never loads (blocked, offline, sandbox), don't leave a+ // dead skeleton — surface a recoverable error with a retry and a direct link.+ state.dexFrameTimer = setTimeout(() => {+ if (wrap.classList.contains('ld-dex-ready')) return;+ wrap.replaceChildren(+ el('div', { class: 'ld-empty ld-empty-sm' }, [+ el('p', { text: "DexScreener's chart didn't load. It may be blocked or still indexing this coin." }),+ el('div', { class: 'ld-dex-fallback-actions' }, [+ el('button', { class: 'ld-btn ld-btn-ghost', type: 'button', text: 'Retry', onclick: () => renderChart() }),+ dexLink(),+ ]),+ ]),+ );+ }, 9000);}async function renderChart() {@@ -2015,6 +2054,7 @@ function renderCopilot() {async function boot() {startParticleField();+ state.chartView = readChartView();state.mint = resolveMint();if (!state.mint) {renderFatal({