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.

fix(launches): keep coin holder stats alive when Helius is capped, and log the neutral token stats change

nirholas6538eb82bf71
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8a139243c..41fd2ef4d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr
- **Agent wallets that cannot sign no longer look tradeable**: A small number of agent wallets hold a balance that three.ws cannot currently sign for. Their Portfolio tab used to show a live net worth with Trade buttons, and the Trade tab showed a working form, so the first sign of trouble was a failed withdrawal. Portfolio and Trade now say up front that trading and withdrawals are paused for that wallet, hide the actions that cannot work, and link straight to support. The explanation is also clearer: the balance has not moved, it is still on chain at the same address, and you should not create a replacement wallet while access is being restored. (`/agents`) `[fix]`
- **Ask your AI assistant to show the picture inside a Solana transaction**: Some Solana transactions carry a small image written straight into their memo, which explorers show as thousands of characters of unreadable text. A new free MCP server, @three-ws/solana-memo-media-mcp, lets Claude, Cursor or any other MCP client fetch a transaction by its signature and show you the image directly, alongside who signed it and a fingerprint of the exact bytes. It can also scan an account's recent history and pick out only the transactions that carry images. It needs no account, key or wallet, never writes anything, and only shows PNG, JPEG, WebP and GIF files whose contents match their label. The Onchain Viewer at /onchain was also fixed: it only recognised the newest memo program, so memos written through the standard Solana memo program were reported as missing. It now reads all three. (`/docs/mcp-solana-memo-media`) `[feature, fix]`
+- **Coin pages show the numbers, not a score**: Every coin launched on three.ws used to carry a quality score, a conviction tier and risk labels on its page, in the launch feed and on its share image. A high score can read as investment advice and a low one as FUD about someone's launch, so all of them are gone. In their place is a Token stats panel with the facts traders look up in terminals: volume, buys, sells, net buy and price change over 5 minutes, 1 hour, 6 hours and 24 hours, plus holders, the top 10 share, how much the dev holds, how much early buyers still hold, mint and freeze authority, bonding curve progress, liquidity and whether a DEX Screener profile was paid for. The Holders panel lists the ten largest wallets with links to each one, and leaves the bonding curve and pool out of the ranking. If the full holder index is unavailable, the page still shows the largest holders and says so instead of going blank. (`/launches`) `[improvement]`
- **Pick your chart on every coin page, and click an agent's coin to open it**: Every coin launched on three.ws now lets you choose the chart you trust, right on its page: our own price line, live TradingView candles that tick with each trade, or the DexScreener, Birdeye, GMGN and GeckoTerminal charts, all free and all without leaving three.ws. Your choice is remembered from coin to coin. Birdeye and GMGN are also added to the chart picker on /coin pages. A brand-new coin used to show "no price history" for its first hours, because the chart data sources had not listed it yet; it now charts from its very first trade. If GeckoTerminal has not listed a young coin yet, its tab says so and offers a chart that already covers it, instead of an error page. And the coin shown on an agent's page, its profile and its home card is now a link straight to that coin's page, where before it could not be clicked at all. (`/launches`) `[feature, fix]`
## 2026-09-16
diff --git a/api/pump/token-stats.js b/api/pump/token-stats.js
index e3b2f9632..bbb32435f 100644
--- a/api/pump/token-stats.js
+++ b/api/pump/token-stats.js
@@ -12,7 +12,8 @@
* net buy, unique traders, price change (pump.fun swap API
* trades, paged back up to 24h)
* · holders holder count, top-10 share, top holder, dev share, bonding
- * curve share, early-buyer share, top-10 list (Helius DAS)
+ * curve share, early-buyer share, top-10 list (Helius DAS, or
+ * the 20 largest accounts over plain RPC when Helius is down)
* · authorities mint and freeze authority as read off the mint account
* · curve bonding curve progress, curve reserves, graduation state
* · market liquidity and DEX Screener paid-profile state
@@ -166,23 +167,26 @@ function shareOfSupply(units, supply) {
* program-owned liquidity, not holders, so they are reported separately and
* excluded from the top-holder ranking the way trading terminals do.
*/
-export function holderStats(holders, { supply, creator, curve, pool, earlyBuyers }) {
+export function holderStats(holders, { supply, creator, curve, pool, earlyBuyers, complete = true }) {
const program = new Set([curve, pool].filter(Boolean));
const people = holders.filter((h) => !program.has(h.wallet));
const byWallet = new Map(holders.map((h) => [h.wallet, h.units]));
const sum = (list) => list.reduce((acc, h) => acc + h.units, 0n);
const top10 = people.slice(0, 10);
- const early = earlyBuyers
+ // A largest-accounts-only set knows the top of the book but not the tail, so
+ // the full count and the early-buyer sum are unknowable from it.
+ const early = earlyBuyers && complete
? sum(people.filter((h) => earlyBuyers.has(h.wallet) && h.wallet !== creator))
: null;
return {
- count: people.length,
+ count: complete ? people.length : null,
top10_pct: shareOfSupply(sum(top10), supply),
top1_pct: people[0] ? shareOfSupply(people[0].units, supply) : null,
- dev_pct: creator ? shareOfSupply(byWallet.get(creator) || 0n, supply) : null,
+ // Outside the largest accounts the dev's balance is unknown, not zero.
+ dev_pct: creator && (complete || byWallet.has(creator)) ? shareOfSupply(byWallet.get(creator) || 0n, supply) : null,
curve_pct: curve ? shareOfSupply(byWallet.get(curve) || 0n, supply) : null,
pool_pct: pool ? shareOfSupply(byWallet.get(pool) || 0n, supply) : null,
- early_buyers: earlyBuyers ? earlyBuyers.size : null,
+ early_buyers: earlyBuyers && complete ? earlyBuyers.size : null,
early_buyers_pct: early == null ? null : shareOfSupply(early, supply),
top: top10.map((h) => ({
wallet: h.wallet,
@@ -192,6 +196,45 @@ export function holderStats(holders, { supply, creator, curve, pool, earlyBuyers
};
}
+/**
+ * Holder set from standard RPC when Helius DAS is unavailable (quota, outage):
+ * the 20 largest token accounts, resolved to their owner wallets. Any provider
+ * on the failover chain serves getTokenLargestAccounts, so the top of the book
+ * survives a Helius outage; the full holder count does not.
+ */
+async function largestHolderSet(mint) {
+ const conn = getConnection({ network: 'mainnet' });
+ const mintPk = new PublicKey(mint);
+ const largest = await conn.getTokenLargestAccounts(mintPk, 'confirmed');
+ const accounts = (largest?.value || []).filter((a) => a.amount && a.amount !== '0');
+ if (!accounts.length) return null;
+ const parsed = await conn.getMultipleParsedAccounts(accounts.map((a) => a.address), { commitment: 'confirmed' });
+ const byOwner = new Map();
+ accounts.forEach((a, i) => {
+ const owner = parsed?.value?.[i]?.data?.parsed?.info?.owner;
+ if (!owner) return;
+ byOwner.set(owner, (byOwner.get(owner) || 0n) + BigInt(a.amount));
+ });
+ const holders = [...byOwner.entries()]
+ .map(([wallet, units]) => ({ wallet, units }))
+ .sort((a, b) => (b.units > a.units ? 1 : b.units < a.units ? -1 : 0));
+ return holders.length ? { holders, complete: false } : null;
+}
+
+async function readHolderSet(mint) {
+ try {
+ const live = await liveHolderSet({ mint, network: 'mainnet' });
+ if (live?.holders?.length) return { holders: live.holders, complete: true };
+ } catch {
+ /* Helius DAS unavailable with no cached copy: fall through to plain RPC */
+ }
+ try {
+ return await largestHolderSet(mint);
+ } catch {
+ return null;
+ }
+}
+
async function readAuthorities(mint) {
try {
const mintPk = new PublicKey(mint);
@@ -235,7 +278,7 @@ async function buildStats(mint) {
const [tradeHist, holderSet, authorities, dex, solUsd] = await Promise.all([
fetchDayOfTrades(mint, now),
- liveHolderSet({ mint, network: 'mainnet' }).catch(() => null),
+ readHolderSet(mint),
readAuthorities(mint),
readDexScreener(mint),
solPriceUsd().catch(() => null),
@@ -275,8 +318,8 @@ async function buildStats(mint) {
? windowStats(tradeHist.trades, { now, coveredFrom: tradeHist.complete ? null : tradeHist.oldest })
: null,
trades_sampled: tradeHist?.trades.length ?? null,
- holders: holderSet?.holders?.length
- ? holderStats(holderSet.holders, { supply, creator, curve, pool, earlyBuyers })
+ holders: holderSet
+ ? { ...holderStats(holderSet.holders, { supply, creator, curve, pool, earlyBuyers, complete: holderSet.complete }), complete: holderSet.complete }
: null,
authorities,
dev: creator
diff --git a/data/changelog.json b/data/changelog.json
index 0ba052768..c26c950de 100644
--- a/data/changelog.json
+++ b/data/changelog.json
@@ -1,6 +1,13 @@
{
"$comment": "Curated changelog entries for three.ws, the editorial layer of the public changelog. New PAGE launches are tracked automatically via the `added` field in data/pages.json; this file is for everything else holders care about: improvements, fixes, SDK releases, trading/payments capabilities, security work. scripts/build-page-index.mjs merges both sources into CHANGELOG.md, public/changelog.json, and public/changelog.xml. Newest first. Allowed tags: feature, improvement, fix, sdk, infra, docs, security. `link` is optional and must be a live three.ws path.",
"entries": [
+ {
+ "date": "2026-09-17",
+ "title": "Coin pages show the numbers, not a score",
+ "summary": "Every coin launched on three.ws used to carry a quality score, a conviction tier and risk labels on its page, in the launch feed and on its share image. A high score can read as investment advice and a low one as FUD about someone's launch, so all of them are gone. In their place is a Token stats panel with the facts traders look up in terminals: volume, buys, sells, net buy and price change over 5 minutes, 1 hour, 6 hours and 24 hours, plus holders, the top 10 share, how much the dev holds, how much early buyers still hold, mint and freeze authority, bonding curve progress, liquidity and whether a DEX Screener profile was paid for. The Holders panel lists the ten largest wallets with links to each one, and leaves the bonding curve and pool out of the ranking. If the full holder index is unavailable, the page still shows the largest holders and says so instead of going blank.",
+ "tags": ["improvement"],
+ "link": "/launches"
+ },
{
"date": "2026-09-17",
"title": "Pick your chart on every coin page, and click an agent's coin to open it",
diff --git a/pages/launch-detail.html b/pages/launch-detail.html
index 4fbae8af9..a87918751 100644
--- a/pages/launch-detail.html
+++ b/pages/launch-detail.html
@@ -55,7 +55,7 @@
<section id="ld-hero" class="ld-hero" aria-label="Coin overview"></section>
<!-- Token stats: per-timeframe trading activity and on-chain facts. -->
- <section id="ld-metrics" class="ld-section ld-metrics" aria-label="Token stats"></section>
+ <section id="ld-metrics" class="ld-section" aria-label="Token stats"></section>
<!-- Primary intelligence + market column, secondary sidebar. -->
<div class="ld-body">
diff --git a/public/changelog-recent.json b/public/changelog-recent.json
index 5b38359c7..5c57fd6a2 100644
--- a/public/changelog-recent.json
+++ b/public/changelog-recent.json
@@ -1,11 +1,11 @@
{
- "generated_at": "2026-09-17T06:41:56.528Z",
+ "generated_at": "2026-09-17T06:50:17.765Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json",
"site": {
"name": "three.ws",
"url": "https://three.ws"
},
- "total": 3691,
+ "total": 3692,
"complete": false,
"full_feed": "/changelog.json",
"entries": [
@@ -30,6 +30,16 @@
"fix"
]
},
+ {
+ "date": "2026-09-17",
+ "type": "update",
+ "title": "Coin pages show the numbers, not a score",
+ "summary": "Every coin launched on three.ws used to carry a quality score, a conviction tier and risk labels on its page, in the launch feed and on its share image. A high score can read as investment advice and a low one as FUD about someone's launch, so all of them are gone. In their place is a Token stats panel with the facts traders look up in terminals: volume, buys, sells, net buy and price change over 5 minutes, 1 hour, 6 hours and 24 hours, plus holders, the top 10 share, how much the dev holds, how much early buyers still hold, mint and freeze authority, bonding curve progress, liquidity and whether a DEX Screener profile was paid for. The Holders panel lists the ten largest wallets with links to each one, and leaves the bonding curve and pool out of the ranking. If the full holder index is unavailable, the page still shows the largest holders and says so instead of going blank.",
+ "link": "/launches",
+ "tags": [
+ "improvement"
+ ]
+ },
{
"date": "2026-09-17",
"type": "update",
@@ -1611,16 +1621,6 @@
"tags": [
"launch"
]
- },
- {
- "date": "2026-09-07",
- "type": "launch",
- "title": "Docs · Robinhood Portfolios",
- "summary": "How Robinhood Portfolios works: the manifest that makes a generated basket binding, in-kind issuance that needs no price oracle, the descending-price rebalance auction nobody can front-run, what happens when a tokenized equity is halted, and the lineage fee budget that leaves sybils nothing to farm.",
- "link": "/docs/robinhood-portfolios",
- "tags": [
- "launch"
- ]
}
]
}
diff --git a/public/changelog.json b/public/changelog.json
index 95cfc7238..d91a129d8 100644
--- a/public/changelog.json
+++ b/public/changelog.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-09-17T06:41:56.485Z",
+ "generated_at": "2026-09-17T06:50:17.737Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json",
"site": {
"name": "three.ws",
@@ -27,6 +27,16 @@
"fix"
]
},
+ {
+ "date": "2026-09-17",
+ "type": "update",
+ "title": "Coin pages show the numbers, not a score",
+ "summary": "Every coin launched on three.ws used to carry a quality score, a conviction tier and risk labels on its page, in the launch feed and on its share image. A high score can read as investment advice and a low one as FUD about someone's launch, so all of them are gone. In their place is a Token stats panel with the facts traders look up in terminals: volume, buys, sells, net buy and price change over 5 minutes, 1 hour, 6 hours and 24 hours, plus holders, the top 10 share, how much the dev holds, how much early buyers still hold, mint and freeze authority, bonding curve progress, liquidity and whether a DEX Screener profile was paid for. The Holders panel lists the ten largest wallets with links to each one, and leaves the bonding curve and pool out of the ranking. If the full holder index is unavailable, the page still shows the largest holders and says so instead of going blank.",
+ "link": "/launches",
+ "tags": [
+ "improvement"
+ ]
+ },
{
"date": "2026-09-17",
"type": "update",
diff --git a/public/changelog.xml b/public/changelog.xml
index 865efea77..d8dc89604 100644
--- a/public/changelog.xml
+++ b/public/changelog.xml
@@ -22,6 +22,14 @@
<category>feature</category>
<description>Some Solana transactions carry a small image written straight into their memo, which explorers show as thousands of characters of unreadable text. A new free MCP server, @three-ws/solana-memo-media-mcp, lets Claude, Cursor or any other MCP client fetch a transaction by its signature and show you the image directly, alongside who signed it and a fingerprint of the exact bytes. It can also scan an account's recent history and pick out only the transactions that carry images. It needs no account, key or wallet, never writes anything, and only shows PNG, JPEG, WebP and GIF files whose contents match their label. The Onchain Viewer at /onchain was also fixed: it only recognised the newest memo program, so memos written through the standard Solana memo program were reported as missing. It now reads all three.</description>
</item>
+ <item>
+ <title>Coin pages show the numbers, not a score</title>
+ <link>https://three.ws/launches</link>
+ <guid isPermaLink="false">2026-09-17:Coin pages show the numbers, not a score</guid>
+ <pubDate>Thu, 17 Sep 2026 12:00:00 GMT</pubDate>
+ <category>improvement</category>
+ <description>Every coin launched on three.ws used to carry a quality score, a conviction tier and risk labels on its page, in the launch feed and on its share image. A high score can read as investment advice and a low one as FUD about someone's launch, so all of them are gone. In their place is a Token stats panel with the facts traders look up in terminals: volume, buys, sells, net buy and price change over 5 minutes, 1 hour, 6 hours and 24 hours, plus holders, the top 10 share, how much the dev holds, how much early buyers still hold, mint and freeze authority, bonding curve progress, liquidity and whether a DEX Screener profile was paid for. The Holders panel lists the ten largest wallets with links to each one, and leaves the bonding curve and pool out of the ranking. If the full holder index is unavailable, the page still shows the largest holders and says so instead of going blank.</description>
+ </item>
<item>
<title>Pick your chart on every coin page, and click an agent's coin to open it</title>
<link>https://three.ws/launches</link>
diff --git a/src/launch-detail.js b/src/launch-detail.js
index e47afcfbe..c7ed519c8 100644
--- a/src/launch-detail.js
+++ b/src/launch-detail.js
@@ -494,7 +494,12 @@ function loadStats() {
}
const usd = (n) => (n == null ? '-' : fmtUsd(n, { sign: false }));
-const share = (v) => (v == null ? '-' : fmtPct(v * 100, { dp: v < 0.001 && v > 0 ? 3 : v < 0.1 ? 2 : 1 }));
+const share = (v) => {
+ if (v == null) return '-';
+ // Dust balances would otherwise print as a misleading flat 0.000%.
+ if (v > 0 && v < 0.00001) return '<0.001%';
+ return fmtPct(v * 100, { dp: v < 0.001 && v > 0 ? 3 : v < 0.1 ? 2 : 1 });
+};
function statCell(label, value, { cls = '', title = null } = {}) {
return el('div', { class: 'ld-ts-cell', title }, [
@@ -571,7 +576,7 @@ function factsGrid(stats) {
const m = stats.market || {};
const dev = stats.dev;
return el('div', { class: 'ld-ts-grid ld-ts-facts' }, [
- statCell('Holders', h ? compact(h.count) : '-'),
+ statCell('Holders', h?.count != null ? compact(h.count) : '-'),
statCell('Top 10', h ? share(h.top10_pct) : '-', { title: 'Supply held by the ten largest wallets, excluding the bonding curve and AMM pool.' }),
statCell('Dev holds', h ? share(h.dev_pct) : '-', { title: 'Supply held by the creator wallet.' }),
statCell('Early buyers', h?.early_buyers_pct != null ? `${share(h.early_buyers_pct)} · ${compact(h.early_buyers)}` : '-', {
@@ -1134,7 +1139,7 @@ async function renderDistribution() {
el('span', { class: 'ld-metric-val', text: v }),
]);
const metrics = el('div', { class: 'ld-metrics' }, [
- metric('Holders', compact(h.count)),
+ metric('Holders', h.count != null ? compact(h.count) : '-'),
metric('Top holder', share(h.top1_pct)),
metric('Top 10', share(h.top10_pct)),
metric('Dev', share(h.dev_pct)),
@@ -1165,9 +1170,14 @@ async function renderDistribution() {
el('div', { class: 'ld-dist' }, [
metrics,
rows.length ? el('div', { class: 'ld-holders' }, rows) : null,
- el('p', { class: 'ld-ts-note', text: 'Shares are of total supply. The bonding curve and AMM pool are liquidity, not holders, so they are left out of the ranking.' }),
+ el('p', {
+ class: 'ld-ts-note',
+ text: h.complete === false
+ ? 'Shares are of total supply, read from the 20 largest accounts while the full holder index is unavailable, so the holder count is not shown. The bonding curve and AMM pool are liquidity, not holders, and are left out of the ranking.'
+ : 'Shares are of total supply. The bonding curve and AMM pool are liquidity, not holders, so they are left out of the ranking.',
+ }),
]),
- { tag: 'live · Helius' },
+ { tag: h.complete === false ? 'live · largest accounts' : 'live · all holders' },
);
}
// ════════════════════════════════════════════════════════════════════════════
diff --git a/tests/pump-token-stats.test.js b/tests/pump-token-stats.test.js
new file mode 100644
index 000000000..bd70267a0
--- /dev/null
+++ b/tests/pump-token-stats.test.js
@@ -0,0 +1,112 @@
+import { describe, it, expect } from 'vitest';
+import { normalizeTrade, windowStats, holderStats } from '../api/pump/token-stats.js';
+
+// The neutral fact sheet on /launches/<mint>. A wrong window boundary or a
+// bonding curve counted as a holder would publish a false number about
+// someone's coin, so the arithmetic is pinned here.
+
+const NOW = 1_800_000_000;
+const trade = (ago, side, usd, price, user = `w${ago}`) =>
+ normalizeTrade({
+ timestamp: new Date((NOW - ago) * 1000).toISOString(),
+ type: side,
+ amountUsd: String(usd),
+ amountSol: '0.1',
+ priceUsd: String(price),
+ userAddress: user,
+ });
+
+describe('normalizeTrade', () => {
+ it('drops rows without a side or timestamp', () => {
+ expect(normalizeTrade({ type: 'buy' })).toBeNull();
+ expect(normalizeTrade({ timestamp: new Date().toISOString(), type: 'swap' })).toBeNull();
+ });
+});
+
+describe('windowStats', () => {
+ const trades = [
+ trade(7200, 'buy', 100, 1.0, 'a'),
+ trade(1800, 'buy', 50, 1.2, 'b'),
+ trade(600, 'sell', 20, 1.1, 'a'),
+ trade(60, 'buy', 10, 1.5, 'c'),
+ ];
+
+ it('counts buys, sells, volume, and net buy per window', () => {
+ const w = windowStats(trades, { now: NOW });
+ expect(w['5m']).toMatchObject({ buys: 1, sells: 0, volume_usd: 10, net_buy_usd: 10, traders: 1 });
+ expect(w['1h']).toMatchObject({ buys: 2, sells: 1, buy_usd: 60, sell_usd: 20, net_buy_usd: 40, traders: 3 });
+ expect(w['6h']).toMatchObject({ buys: 3, sells: 1, volume_usd: 180, traders: 3 });
+ });
+
+ it('measures price change from the last trade before the window opened', () => {
+ const w = windowStats(trades, { now: NOW });
+ expect(w['1h'].price_change_pct).toBeCloseTo(50);
+ expect(w['5m'].price_change_pct).toBeCloseTo((1.5 / 1.1 - 1) * 100);
+ });
+
+ it('reads a quiet window as zero change, not a missing value', () => {
+ const w = windowStats([trade(3000, 'buy', 5, 2)], { now: NOW });
+ expect(w['5m']).toMatchObject({ buys: 0, volume_usd: 0, price_change_pct: 0 });
+ });
+
+ it('flags windows that reach past the fetched history as partial', () => {
+ const w = windowStats(trades, { now: NOW, coveredFrom: NOW - 7200 });
+ expect(w['1h'].partial).toBe(false);
+ expect(w['6h'].partial).toBe(true);
+ expect(w['24h'].partial).toBe(true);
+ });
+});
+
+describe('holderStats', () => {
+ const supply = 1_000_000_000_000_000n;
+ const pct = (p) => (supply * BigInt(Math.round(p * 1000))) / 100_000n;
+ const holders = [
+ { wallet: 'CURVE', units: pct(70) },
+ { wallet: 'whale', units: pct(10) },
+ { wallet: 'dev', units: pct(5) },
+ { wallet: 'early', units: pct(3) },
+ ...Array.from({ length: 12 }, (_, i) => ({ wallet: `h${i}`, units: pct(1) })),
+ ];
+
+ it('leaves the bonding curve out of the holder ranking', () => {
+ const h = holderStats(holders, { supply, creator: 'dev', curve: 'CURVE', pool: null, earlyBuyers: null });
+ expect(h.count).toBe(15);
+ expect(h.top1_pct).toBeCloseTo(0.1);
+ expect(h.curve_pct).toBeCloseTo(0.7);
+ expect(h.top10_pct).toBeCloseTo(0.25);
+ expect(h.dev_pct).toBeCloseTo(0.05);
+ expect(h.top[1]).toMatchObject({ wallet: 'dev', is_dev: true });
+ expect(h.early_buyers).toBeNull();
+ expect(h.early_buyers_pct).toBeNull();
+ });
+
+ it('sums what early buyers still hold, excluding the creator', () => {
+ const h = holderStats(holders, {
+ supply,
+ creator: 'dev',
+ curve: 'CURVE',
+ pool: null,
+ earlyBuyers: new Set(['early', 'dev', 'gone']),
+ });
+ expect(h.early_buyers).toBe(3);
+ expect(h.early_buyers_pct).toBeCloseTo(0.03);
+ });
+
+ it('reports the top of the book but no count from a largest-accounts-only set', () => {
+ const top = holders.slice(0, 5).filter((h) => h.wallet !== 'dev');
+ const h = holderStats(top, {
+ supply,
+ creator: 'dev',
+ curve: 'CURVE',
+ pool: null,
+ earlyBuyers: new Set(['early']),
+ complete: false,
+ });
+ expect(h.count).toBeNull();
+ expect(h.top1_pct).toBeCloseTo(0.1);
+ // The dev fell outside the largest accounts, so the share is unknown, not 0.
+ expect(h.dev_pct).toBeNull();
+ expect(h.early_buyers).toBeNull();
+ expect(h.early_buyers_pct).toBeNull();
+ });
+});