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
Add KOL Tracker feature and agent-sniper tutorial
nirholasff98c8c794fc
diff --git a/STRUCTURE.md b/STRUCTURE.mdindex afcf1d0ae..a7a395587 100644--- a/STRUCTURE.md+++ b/STRUCTURE.md@@ -32,6 +32,7 @@ bottom.| Cross-entity search | [pages/search.html](pages/search.html) `→ /search`, backend [api/search.js](api/search.js) + query layer [api/_lib/cross-search.js](api/_lib/cross-search.js) | Live | The one search across every creation type — avatars, on-chain/Solana agents, forged 3D models, worlds, and coins. Federates (not one SQL UNION — the stores are genuinely heterogeneous, two of five aren't even in the same database) five parallel queries, normalizes into one card shape, and ranks by recency plus real signals (follower count via `user_follows`, remix count, view count) — see the file header in `api/search.js` for the full unify-vs-federate writeup. Model results carry a working "Remix — $0.25" action against the existing paid rail ([api/x402/remix-asset.js](api/x402/remix-asset.js)), reused from [pages/creations.html](pages/creations.html) rather than re-derived. Coin search checks three.ws's own launch directory (`pump_agent_mints`) first, then falls back to market-wide pump.fun/Birdeye search for broader coverage (those external matches carry no verified timestamp or creator profile, and are ranked/labelled accordingly). Linked from the Discover nav menu. || Cross-surface rankings, streaks & badges | [pages/rankings.html](pages/rankings.html) `→ /rankings`, backend [api/leaderboard/unified.js](api/leaderboard/unified.js), streak/badge engine [api/_lib/streaks.js](api/_lib/streaks.js) (migration [api/_lib/migrations/20260712020000_leaderboard_streaks_badges.sql](api/_lib/migrations/20260712020000_leaderboard_streaks_badges.sql)), daily Top-10 badge sweep [api/cron/leaderboard-rollup.js](api/cron/leaderboard-rollup.js) | Live | Five real, queried leaderboard metrics — creations (forge models + worlds), remixes received, coin launches, followers, and walk distance (signed-in walkers, all-time) — ranked live with the viewer's own rank pinned even off-page. Every signed-in qualifying action (login, a finished forge model, a saved world, a `/walk` session) rolls a per-user daily streak in `user_streaks` via `recordDailyActivity()`, called from [api/_lib/auth.js](api/_lib/auth.js), [api/_lib/forge-store.js](api/_lib/forge-store.js), [api/_lib/diorama-store.js](api/_lib/diorama-store.js), and [api/walk/metrics.js](api/walk/metrics.js). Four real earned badges persist in `user_badges`: First Creation, Remixed (awarded in [api/x402/remix-asset.js](api/x402/remix-asset.js) when a remix lands on your creation), 7-Day Streak, and a daily-refreshed `top10_<metric>` per leaderboard. Streak + badges surface on the profile ([pages/profile.html](pages/profile.html)) and the Rankings page itself. Rejected metrics (documented in `api/leaderboard/unified.js`'s header): royalties earned in USD (the settlement record is a single overwritten JSONB column, not a cumulative ledger) and `/play` activity (no per-human-user session table exists). || Daily Match (agent output arena) | [pages/daily-match.html](pages/daily-match.html) `→ /daily-match`, backend [api/leaderboard/daily-match.js](api/leaderboard/daily-match.js) | Live | Live daily standings ranking public agents by real output shipped since 00:00 UTC: agent_actions events, sniper + pump trades, confirmed skill sales, and coin launches, with realized sniper P&L shown for context (never scored). Computed live per request (no rollup cron), resets naturally at UTC midnight; includes yesterday's champion and a live-output feed. Reputation-first: no payouts hang off the score. Format adopted with credit from Bowyer's Arena (bowyer.app/arena), who build their agent pages on three.ws avatars. |+| KOL Tracker | [pages/tracker.html](pages/tracker.html) `→ /tracker`, backend [api/kol/[action].js](api/kol/%5Baction%5D.js) `→ GET /api/kol/tracker?window=&limit=`, aggregator [src/kol/tracker.js](src/kol/tracker.js), wallet list [src/kol/wallet-store.js](src/kol/wallet-store.js) (bundled [src/kol/wallets.json](src/kol/wallets.json) + admin R2 imports via `POST /api/kol/import-gmgn`), FIFO P&L engine [src/kol/wallet-pnl.js](src/kol/wallet-pnl.js), cached X follower/avatar lookup [src/kol/x-profile.js](src/kol/x-profile.js) | Live | Solana crypto KOLs ranked by realized P&L computed from each tracked wallet's own on-chain trade history (24h/7d/30d), with win rate, volume, and trade count — every number traceable to real trades, never a competitor's computed leaderboard. A wallet only shows an X handle/avatar/follower-count when an admin has explicitly attached a verified `xHandle` via `import-gmgn`'s `xHandles` map (never inferred or scraped); unattached wallets rank by wallet address alone. Rows with no configured trade source (`PUMPFUN_BOT_URL`) fall back to an imported `pnlUsd`/`winRate` labeled with its `pnlSource` rather than fabricating on-chain numbers. Prewarm cron: [api/cron/kol-tracker-refresh.js](api/cron/kol-tracker-refresh.js). || Platform activity feed | [pages/feed.html](pages/feed.html) `→ /feed` + [pages/community.html](pages/community.html) `→ /community`, backend [api/users/me/feed.js](api/users/me/feed.js) | Live | Reverse-chronological creation events (avatars, agents, coins, models, worlds) plus follow activity, merged at read time from `forge_creations`, `dioramas`, and `user_follows` (no separate event log to drift out of sync). `?scope=following` (default; session-gated, anonymous gets 401) vs `?scope=all` (public; powers `/community` and first-visit feeds); `limit` 1..50, `before` ISO cursor. Items deep-link to creator portfolios. Distinct from the Money Pulse ticker `GET /api/feed` ([docs/money-feed.md](docs/money-feed.md)). Docs: [docs/social-layer.md](docs/social-layer.md) || Follow graph | [api/users/[username]/follow.js](api/users/%5Busername%5D/follow.js) + [api/users/[username]/follows.js](api/users/%5Busername%5D/follows.js), table `user_follows`, buttons on [pages/profile.html](pages/profile.html) | Live | `GET` returns `{following, followed_by, followers_count, following_count}`; `POST`/`DELETE` are idempotent (session + CSRF, self-follow 400) and return the same envelope so one round-trip updates the button and the counts. A genuinely new edge (`ON CONFLICT DO NOTHING`) publishes a `follow` user event to the notification bell exactly once. Feeds the activity feed's following scope, search ranking, and the `followers` leaderboard metric. Tests: [tests/api/users-follow.test.js](tests/api/users-follow.test.js). Docs: [docs/social-layer.md](docs/social-layer.md) || Notification bell & preferences | Event vocabulary [api/_lib/feed.js](api/_lib/feed.js) (`USER_EVENT_TYPES` → `publishUserEvent()` → `user_notifications`), endpoints [api/notifications/](api/notifications), preference matrix [api/_lib/notify-prefs.js](api/_lib/notify-prefs.js), bell client [src/notifications.js](src/notifications.js), settings panel [src/dashboard-next/pages/settings.js](src/dashboard-next/pages/settings.js) | Live | In-app inbox covering remixes ([api/x402/remix-asset.js](api/x402/remix-asset.js)), DMs ([api/friends/messages.js](api/friends/messages.js)), coin bonding-curve graduations (pump cron in [api/cron/[name].js](api/cron/%5Bname%5D.js)), follows, sales, purchases, IRL, market, and account events. Preferences are a category × channel matrix (`in_app` always on; push/email/telegram are per-category opt-outs) edited from `/dashboard/settings`. Docs: [docs/social-layer.md](docs/social-layer.md) |diff --git a/api/cron/kol-tracker-refresh.js b/api/cron/kol-tracker-refresh.jsnew file mode 100644index 000000000..0a98da39f--- /dev/null+++ b/api/cron/kol-tracker-refresh.js@@ -0,0 +1,48 @@+// GET/POST /api/cron/kol-tracker-refresh — prewarm the KOL Tracker's caches.+//+// The tracker (src/kol/tracker.js) computes P&L live per request but caches the+// X follower/avatar lookup for 15 minutes (src/kol/x-profile.js) — the free X API+// tier's rate limit (75 user lookups/15min) can't absorb every page load hitting+// it cold. Running this every 10 minutes keeps that cache warm so a visitor's+// request never blocks on (or exhausts) the X API budget.+//+// Idempotent and cheap: getKolTracker's own cache checks make a warm run mostly+// no-ops.++import { error, json, wrapCron } from '../_lib/http.js';+import { env } from '../_lib/env.js';+import { constantTimeEquals } from '../_lib/crypto.js';++function requireCron(req, res) {+ const secret = process.env.CRON_SECRET || env.CRON_SECRET;+ if (!secret) {+ error(res, 503, 'not_configured', 'CRON_SECRET unset');+ return false;+ }+ const auth = req.headers['authorization'] || '';+ const presented = auth.startsWith('Bearer ') ? auth.slice(7) : '';+ if (!constantTimeEquals(presented, secret)) {+ error(res, 401, 'unauthorized', 'invalid cron secret');+ return false;+ }+ return true;+}++const WINDOWS = ['24h', '7d', '30d'];++export default wrapCron(async (req, res) => {+ if (!requireCron(req, res)) return;+ const started = Date.now();++ const { getKolTracker } = await import('../../src/kol/tracker.js');+ const results = await Promise.allSettled(+ WINDOWS.map((window) => getKolTracker({ window, limit: 100 })),+ );++ const byWindow = {};+ results.forEach((r, i) => {+ byWindow[WINDOWS[i]] = r.status === 'fulfilled' ? r.value.length : null;+ });++ return json(res, 200, { ok: true, rows: byWindow, ms: Date.now() - started });+});diff --git a/api/kol/[action].js b/api/kol/[action].jsindex 4d0572ff4..15410cbed 100644--- a/api/kol/[action].js+++ b/api/kol/[action].js@@ -1,12 +1,9 @@// Consolidated KOL endpoints dispatcher.-import { readFile } from 'node:fs/promises';-import path from 'node:path';-import { fileURLToPath } from 'node:url';import { cors, json, method, readJson, wrap, error, rateLimited } from '../_lib/http.js';import { limits, clientIp } from '../_lib/rate-limit.js';import { requireAdmin } from '../_lib/admin.js';-import { putObject, getObjectBuffer } from '../_lib/r2.js';+import { loadWallets, saveImportedWallets } from '../../src/kol/wallet-store.js';// ── wallets (Birdeye P&L proxy) ───────────────────────────────────────────────@@ -125,41 +122,6 @@ async function handleWallets(req, res) {return json(res, 200, { data });}-const WALLETS_PATH = path.resolve(- path.dirname(fileURLToPath(import.meta.url)),- '../../src/kol/wallets.json',-);--// Imported wallets live in R2 — the Vercel filesystem is read-only at runtime,-// so writes to the bundled wallets.json can never persist (or even succeed).-const WALLETS_R2_KEY = 'kol/wallets.json';--async function loadBundledWallets() {- try {- return JSON.parse(await readFile(WALLETS_PATH, 'utf8'));- } catch {- return [];- }-}--async function loadImportedWallets() {- try {- const buf = await getObjectBuffer(WALLETS_R2_KEY);- const parsed = JSON.parse(buf.toString('utf8'));- return Array.isArray(parsed) ? parsed : [];- } catch {- return []; // nothing imported yet (or storage unreachable) — bundled list only- }-}--// Merged view: R2-stored imports take precedence over the bundled seed file.-async function loadWallets() {- const [bundled, imported] = await Promise.all([loadBundledWallets(), loadImportedWallets()]);- const byWallet = new Map(bundled.map((w) => [w.wallet, w]));- for (const w of imported) byWallet.set(w.wallet, w);- return [...byWallet.values()];-}-// ── import-gmgn ───────────────────────────────────────────────────────────────async function handleImportGmgn(req, res) {@@ -180,16 +142,28 @@ async function handleImportGmgn(req, res) {} catch (err) {return error(res, 400, 'validation_error', err.message);}+ // Optional admin-supplied wallet→X-handle map — the only way an xHandle ever+ // enters the tracked list. Never inferred or scraped: an admin who has verified+ // a real KOL controls a wallet (e.g. a signed message, a public self-disclosure)+ // attaches it here explicitly.+ const HANDLE_RE = /^[A-Za-z0-9_]{1,15}$/;+ const xHandles = body.xHandles && typeof body.xHandles === 'object' ? body.xHandles : {};+ for (const [wallet, handle] of Object.entries(xHandles)) {+ if (typeof handle !== 'string' || !HANDLE_RE.test(handle.replace(/^@/, ''))) continue;+ const entry = parsed.find((e) => e.wallet === wallet);+ if (entry) entry.xHandle = handle.replace(/^@/, '');+ }const existing = await loadWallets();const byWallet = new Map(existing.map((w) => [w.wallet, w]));- for (const entry of parsed) byWallet.set(entry.wallet, entry);+ for (const entry of parsed) {+ const prev = byWallet.get(entry.wallet);+ // Preserve a previously-attached xHandle across a re-import that doesn't repeat it.+ if (prev?.xHandle && !entry.xHandle) entry.xHandle = prev.xHandle;+ byWallet.set(entry.wallet, entry);+ }const merged = [...byWallet.values()];try {- await putObject({- key: WALLETS_R2_KEY,- body: JSON.stringify(merged, null, '\t') + '\n',- contentType: 'application/json',- });+ await saveImportedWallets(merged);} catch (err) {console.error('[kol/import-gmgn] R2 write failed:', err?.message || err);return error(res, 503, 'storage_unavailable', 'failed to persist imported wallets');@@ -248,12 +222,31 @@ async function handleTrades(req, res) {return json(res, 200, { mint, trades: result.trades, wallets: KOL_WALLETS.length });}+// ── tracker ───────────────────────────────────────────────────────────────────++async function handleTracker(req, res) {+ if (cors(req, res, { methods: 'GET,OPTIONS', origins: '*' })) return;+ if (!method(req, res, ['GET'])) return;+ const rl = await limits.mcpIp(clientIp(req));+ if (!rl.success) return rateLimited(res, rl);+ const url = new URL(req.url, `http://${req.headers.host}`);+ const window = url.searchParams.get('window') || '7d';+ if (!['24h', '7d', '30d'].includes(window))+ return error(res, 400, 'validation_error', 'window must be 24h, 7d, or 30d');+ const limitRaw = url.searchParams.get('limit');+ const limit = Math.min(Math.max(Number(limitRaw) || 100, 1), 100);+ const { getKolTracker } = await import('../../src/kol/tracker.js');+ const rows = await getKolTracker({ window, limit });+ return json(res, 200, { window, rows });+}+// ── dispatcher ────────────────────────────────────────────────────────────────const DISPATCH = {'import-gmgn': handleImportGmgn,leaderboard: handleLeaderboard,trades: handleTrades,+ tracker: handleTracker,wallets: handleWallets,};diff --git a/blog/autonomous-trading-experiment-x-article.md b/blog/autonomous-trading-experiment-x-article.mdnew file mode 100644index 000000000..f633d2d77--- /dev/null+++ b/blog/autonomous-trading-experiment-x-article.md@@ -0,0 +1,498 @@+# X Article: the 90-trade autonomous fleet postmortem++Ready-to-publish X Article for **@trythreews**. Built specifically for the X Articles editor (long-form, up to 100,000 characters, rich text). It uses only what X Articles render natively: a title, a cover image, headings, bold/italic, bulleted and numbered lists, block quotes, inline links, and uploaded images. No tables and no code blocks (X Articles render neither cleanly), so every table from the blog has been redrawn as an image or rewritten as text.++> **How to publish this**+> 1. On X, open the composer and choose **Write Article** (requires an eligible Premium+ subscription).+> 2. **Title field:** paste the title below.+> 3. **Cover image:** upload `00-cover.png` (clean dark, green/red only).+> 4. Paste the article body. X's editor keeps `##` / `###` as headings, `**bold**`, lists, and block quotes.+> 5. At each `[IMAGE: file]` marker, click the image button, upload the named file from `blog/x-article-assets/`, paste the caption beneath it, then delete the marker line.+> 6. The ten images are the only manual uploads. Everything else pastes as-is.++Images in `blog/x-article-assets/` (10 total):+`00-cover.png` (cover) · `01-hero.png` · `02-finding.png` · `03-leaderboard.png` · `04-conviction.png` · `05-funnel.png` · `06-paperhands.png` · `07-config.png` · `08-exits.png` · `09-waterfall.png`++---++## TITLE (paste into the X Article title field)++**We gave 11 AI agents real wallets and let them trade for three days. Here are all 90 trades, including the losses.**++## COVER IMAGE++`[IMAGE: 00-cover.png]` upload as the article cover.++---++# ARTICLE BODY (paste everything below this line)++We gave a fleet of AI trading agents their own Solana wallets and real SOL, pointed them at the pump.fun launch firehose, and stopped touching the keyboard.++Three days later, 90 real trades had closed on mainnet. We published every single one, individually graded, with the on-chain receipts. This is the full postmortem: what we built, the exact configuration of every agent, what it did, what it cost us, which agents won, what the 83,000 coins we did *not* buy taught us, and what the losses bought.++The whole record, with the charts, all 90 graded trades, an interactive backtester, and the raw dataset as JSON, lives here: **[three.ws/blog/autonomous-trading-experiment](https://three.ws/blog/autonomous-trading-experiment)**.++> The one-line finding: **win rate is a vanity metric.** The agents that were right *less* often made money, and the agents that were right *more* often lost three times as much. Below is exactly how that happened, in full detail, and what it means for autonomous agents that hold money.++---++## The setup: an A/B fleet with one variable++This is not one bot. It is a controlled A/B test.++Every agent runs the **same execution stack, the same safety firewall, and the same exit ladder**. The only thing that changes between arms is *how an entry gets chosen*. That isolation is the whole point: when one arm outperforms, we know it was the judgment, not the plumbing.++Three families of judgment were in the field:++- **Rules arms.** Frozen, human-tuned filters: market-cap bands, a socials requirement, creator-history checks, position sizing. No learning inside the window. This is the classic "sniper config."+- **Oracle arms.** Entries gated on a conviction model trained on the outcomes of past launches. A coin has to score above a threshold to be bought.+- **LLM arms.** No rulebook at all. Every launch is put in front of a language model that returns a structured verdict: buy or not, a confidence score, and a one-sentence thesis in the model's own words. The thesis is written to a hash-chained ledger right next to the trade.++**Position sizes were deliberately tiny**, from 0.002 to 0.15 SOL per trade. This phase was built to buy information, not profit. Every fill is real money on Solana mainnet with a public transaction signature. Nothing here is paper-traded or simulated after the fact.++**The window:** 20 to 23 July 2026. Source of truth: the three.ws agent-sniper production ledger, real fills only.++---++## The exact A/B design++Here is every arm and every knob. Same firewall, same 30-minute default max hold, same stop discipline. What differs is size, the take-profit and trailing targets, the max hold, and the conviction gate.++`[IMAGE: 07-config.png]`+*Caption: The complete A/B matrix. Eight strategies, eight wallets. "Gate" is the minimum conviction score required to enter; "off" means the arm did not use that mechanism.*++In words:++- **llm-grok** (LLM): 0.01 SOL, take-profit 45%, stop 30%, trail 20%, 30m hold, no gate.+- **llm-auto** (LLM): 0.01 SOL, take-profit 60%, stop 30%, trail 20%, 30m hold, no gate.+- **llm-claude** (LLM): 0.01 SOL, take-profit 60%, stop 30%, trail 20%, 30m hold, no gate.+- **oracle-open** (oracle): 0.008 SOL, no take-profit, stop 30%, no trail, 30m hold, **gate 35**.+- **rules-classic** (rules): 0.002 SOL, take-profit 60%, stop 30%, trail 20%, 30m hold, **gate 55**.+- **rules-proven** (rules): 0.05 SOL, no take-profit, stop 30%, trail 25%, 30m hold, no gate.+- **boost-ride** (rules): 0.01 SOL, take-profit 20%, stop 15%, trail 8%, **4m hold**, no gate.+- **intel-quality** (rules): 0.15 SOL, take-profit 200%, stop 35%, trail 30%, 30m hold, **gate 55**.++Two design choices matter for what follows. **boost-ride** is a fast scalper: tiny targets, a tight 8% trailing stop, and a 4-minute clock. **intel-quality** is the opposite: the biggest size in the fleet (0.15 SOL) chasing a 200% moonshot that has to actually 3x to trigger. Hold those two in mind.++### The safety layer everyone shared++Before any buy, a **trade firewall simulates the sell**. It checks that the position can actually be exited (liquidity, price impact, honeypot behavior) and returns a verdict. Across the 90 trades, the firewall marked **65 as clean allow** and **25 as warn**. That flag carried signal: allow-verdict entries won **34%** of the time, warn-verdict entries only **12%** (both cohorts still finished slightly negative, because entry judgment, not the firewall, was the real bottleneck). Fleet-wide safety bands sit above every arm and fail closed: a coin whose market cap cannot be determined is rejected, never bought blind. Category exclusions are read from the on-chain bonding-curve account, not the feed.++---++## The headline numbers++Here is the honest scorecard, before any spin:++- **90 closed trades**, across **8 strategies** in **8 wallets**.+- **25 wins, 65 losses.** Best single trade +73.9%, worst -99.9%.+- **Fleet net: about -0.103 SOL** on 1.93 SOL deployed. We paid tuition.+- **LLM-judged cohort: 33 trades, net about +0.015 SOL.**+- **Rules cohort: 57 trades, net about -0.118 SOL.**+- **6 of the 7 biggest wins belong to the LLM arms.**++`[IMAGE: 01-hero.png]`+*Caption: The fleet at a glance. 82,994 launches watched, 90 trades closed, 1.93 SOL deployed. The fleet finished down 0.103 SOL; the LLM-judged cohort finished up.*++The fleet as a whole lost money. That is the true number and we are leading with it. But the *distribution* of who lost it, and who did not, is the entire lesson.++---++## The core finding: win rate is a vanity metric++Look at the two cohorts side by side.++- The **LLM cohort** won only **24%** of its trades. Its average win was **+52.3%**; its average loss was just **-10.8%**. Net: **positive.**+- The **rules cohort** won **30%** of its trades, a *higher* strike rate. But its average win was only **+16.2%** and its average loss was **-23.7%**. Net: **three times the loss that the LLM cohort made in profit.**++`[IMAGE: 02-finding.png]`+*Caption: The rules cohort is right more often and still loses. Win rate measures how often you are right. It says nothing about how much you make when you are right or lose when you are wrong.*++The rules arms buy everything mediocre enough to clear a threshold: the ticker trying a little too hard, the week-old narrative, the chart that stairsteps on four wallets. They clip a lot of small wins and eat a few catastrophic losses.++The model does something a threshold filter cannot: it **declines**. Its edge is **not prediction, it is selection**. Fewer entries, a fatter right tail, shallower losses. It says no to launches that a market-cap band has no vocabulary to reject.++> **33 trades is a signal, not a proof.** We are not claiming an LLM has cracked the memecoin market on a three-day, 33-trade sample. We are claiming the *shape* of the result is real and worth scaling. We are widening the sample and we will publish it whether it confirms this or breaks it.++---++## The leaderboard: which agents actually performed best++Eight arms, ranked by net SOL. Only two finished green, and both are LLM-judged.++`[IMAGE: 03-leaderboard.png]`+*Caption: Net SOL by strategy. The two LLM arms are the only green bars. The arm with the best win rate in the whole fleet (boost-ride, 48%) posted the single worst loss.*++Arm by arm, best to worst:++1. **llm-grok**: **+0.019 SOL**, 9 trades, 44% win. The top performer. Tight, selective, and it took its profits. Average win +53.6%, average loss just -4.9%.+2. **llm-auto**: **+0.006 SOL**, 15 trades, 20% win. The other green arm. Won only one trade in five, but its wins were huge (average +64.5%), including the fleet's best single trade at +73.9%.+3. **rules-classic**: **-0.0006 SOL**, 1 trade. Barely traded, barely moved.+4. **llm-claude**: **-0.011 SOL**, 9 trades, 11% win. An LLM arm that landed in the red: proof the "LLM" label is not magic on its own. Its 60% take-profit target was slower to trigger and it caught fewer clean exits in this window.+5. **oracle-open**: **-0.017 SOL**, 14 trades, 7% win. Its conviction gate was set too low (35), which admitted a mediocre band. More on that below.+6. **rules-proven**: **-0.018 SOL**, 5 trades. This is the arm that made the platform's **first fully autonomous trade** (+42.38%, documented at [three.ws/blog/first-autonomous-trade](https://three.ws/blog/first-autonomous-trade)). Over five trades it gave most of that back. One good trade is not a strategy.+7. **boost-ride**: **-0.041 SOL**, 31 trades, **48% win**. The busiest arm and the one that was right most often. It also lost the most. A fast scalper with a 4-minute max hold, it clipped many small wins and got caught in a few launches whose liquidity evaporated in seconds. This one bar is the entire "win rate is a vanity metric" thesis in a single row.+8. **intel-quality**: **-0.041 SOL**, 6 trades, 0% win. The largest position sizing in the fleet (0.15 SOL) with a 200% take-profit target that never triggered. Big size plus a moonshot target plus no wins is the worst combination on the board.++**What separated the winners:** every green arm took profit on a real target and kept its losses shallow. The take-profit exit, not entry genius, is where the money actually showed up.++---++## All 90 trades, best to worst++Here is every closed position on the ledger, ranked by return. The distribution is the story: a handful of fat green wins on the left, a long shallow band of managed losses through the middle, and a short cliff of catastrophic losses on the right.++`[IMAGE: 09-waterfall.png]`+*Caption: All 90 trades ranked by return, from +73.9% to -99.9%. 25 winners, 65 losers. The profit lives in the far-left tail; the damage lives in the far-right cliff.*++**Hold times:** the median position was held about **4 minutes**; the shortest was **5 seconds**, the longest **4.4 days**. Winners exited fast (most take-profits fired inside 90 seconds to 3 minutes). The catastrophic losses fired even faster.++### Every winning trade (all 25)++The top of the tape was almost entirely LLM-judged, and almost entirely clean take-profit exits:++- +73.9% $House, llm-auto, take-profit, 68s+- +71.3% $DEPE, llm-grok, take-profit, 2m+- +65.6% $DUCK, llm-grok, take-profit, 72s+- +63.1% $BLACKHOLE, llm-grok, take-profit, 2m+- +60.8% $WhiteBull, llm-auto, take-profit, 3m+- +58.8% $掌握, llm-auto, take-profit, 84s+- +42.9% $HANU.p, boost-ride, take-profit, 5m+- +42.4% $BITS, rules-proven, timeout, 30m+- +20.9% boost-ride, take-profit, 3m+- +20.4% boost-ride, take-profit, 3m+- +20.4% $BDAG, boost-ride, take-profit, 2m+- +20.2% boost-ride, take-profit, 4m+- +20.0% $FLL, boost-ride, take-profit, 3m+- +18.7% $VFX, boost-ride, take-profit, 3m+- +14.2% $COOK, llm-grok, timeout, 30m+- +12.0% boost-ride, timeout, 4m+- +11.7% boost-ride, timeout, 4m+- +11.3% boost-ride, timeout, 4m+- +10.6% $MCP, llm-claude, trailing-stop, 61s+- +10.4% $TrippleBBL, oracle-open, timeout, 30m+- +7.7% boost-ride, timeout, 4m+- +5.2% boost-ride, timeout, 4m+- +5.0% boost-ride, timeout, 4m+- +4.7% boost-ride, timeout, 4m+- +2.0% $Aevon, boost-ride, timeout, 4m++Six of the seven best trades were LLM calls, every one exited on a take-profit between +45% and +74%. The model logged a one-sentence thesis for each before the outcome existed (all 29 are reproduced verbatim in "The reasoning ledger" below). The model was not predicting the future. It was refusing the obvious traps and letting the exit ladder do the rest.++### Every losing trade (all 65, ranked)++The other 65, least-bad to worst, with the peak each one reached before it closed. Read the bottom of this list against the hold times: the worst boost-ride wipeouts realized -84% to -99.9% in **six to nine seconds**. The stop-loss fired on time; there was simply no one left to sell to. Note also the long clot of -2.5% timeouts in the middle: dozens of positions that never moved and were closed flat by the 30-minute backstop.++- -2.3% $Walter, boost-ride, trailing-stop, 15s+- -2.5% $WET, intel-quality, timeout, 30m+- -2.5% $YES YOU, intel-quality, timeout, 30m+- -2.5% $SADCAT, intel-quality, timeout, 30m+- -2.5% $$DELU, oracle-open, timeout, 30m (peaked +4.2% first)+- -2.5% $test, oracle-open, timeout, 30m+- -2.5% $$RUGHUNTER, llm-auto, timeout, 30m+- -2.5% $JARRETT, oracle-open, timeout, 30m+- -2.5% $Diamond, llm-claude, timeout, 30m+- -2.5% $RCC, llm-auto, timeout, 30m+- -2.5% $Free, oracle-open, timeout, 30m+- -2.5% $SAVIOUR, llm-auto, timeout, 30m+- -2.5% $Jrool, oracle-open, timeout, 30m+- -2.5% $MrSue, oracle-open, timeout, 30m+- -2.5% $MELON, oracle-open, timeout, 30m+- -2.6% $REC, llm-grok, timeout, 30m+- -2.7% $CQUACK, llm-claude, timeout, 30m+- -2.7% $Pink, llm-claude, timeout, 30m+- -2.7% $ROGERS, llm-claude, timeout, 30m+- -2.8% $Pink, llm-auto, timeout, 30m+- -2.8% $Pink, llm-grok, timeout, 30m+- -3.0% $HOME, llm-claude, timeout, 30m+- -3.1% $HOME, llm-auto, timeout, 30m+- -3.7% $birry, llm-claude, timeout, 30m+- -4.1% $Moon, llm-auto, timeout, 30m+- -4.1% $doge, llm-grok, timeout, 30m+- -4.4% $GABRIEL, llm-auto, timeout, 30m+- -4.5% $ANSEM, oracle-open, timeout, 30m+- -4.7% $boss, llm-auto, timeout, 30m+- -5.0% $KYDEN, intel-quality, timeout, 30m+- -5.6% $ROGERS, llm-grok, timeout, 30m+- -6.4% (unnamed), boost-ride, trailing-stop, 2m (peaked +1.9% first)+- -7.1% $Smoke, intel-quality, timeout, 30m+- -7.4% $PJT, oracle-open, timeout, 30m+- -8.0% $Enthuist, intel-quality, timeout, 37.5h+- -8.7% (unnamed), boost-ride, trailing-stop, 19s+- -9.2% $APE, llm-grok, timeout, 30m+- -13.4% $Clouseau, rules-proven, trailing-stop, 2m (peaked +24.8% first)+- -14.3% $Meowpin, rules-proven, trailing-stop, 29s (peaked +28.3% first)+- -15.8% (unnamed), boost-ride, stop-loss, 5s+- -17.4% (unnamed), boost-ride, stop-loss, 7s+- -17.6% $tutu, llm-auto, trailing-stop, 2m (peaked +18.4% first)+- -18.7% $FLIPPENING, oracle-open, timeout, 30m+- -20.1% (unnamed), boost-ride, stop-loss, 8s+- -21.7% $one, llm-claude, trailing-stop, 2m (peaked +1.2% first)+- -21.7% $one, llm-auto, trailing-stop, 2m (peaked +1.2% first)+- -22.0% (unnamed), boost-ride, stop-loss, 18s+- -25.3% $AG, rules-proven, timeout, 32m+- -26.1% $looong, rules-proven, trailing-stop, 46s+- -26.4% $COREY, llm-auto, trailing-stop, 22s+- -28.1% $Dronenald, rules-classic, trailing-stop, 104.9h+- -30.1% $$MRH, boost-ride, stop-loss, 4m (peaked +10.1% first)+- -32.5% $SKE, oracle-open, stop-loss, 29s+- -32.8% $CWARDIN, boost-ride, stop-loss, 3m (peaked +16.8% first)+- -34.3% $BENNER, boost-ride, stop-loss, 3m (peaked +15.9% first)+- -34.4% $AGIGUY, boost-ride, stop-loss, 3m (peaked +15.9% first)+- -35.6% $RWA, boost-ride, stop-loss, 2m (peaked +10.6% first)+- -37.4% $Elon, llm-auto, stop-loss, 23s+- -38.9% $Poze, oracle-open, stop-loss, 63s (peaked +19.3% first)+- -57.4% $Jimothy, oracle-open, stop-loss, 15s+- -78.3% $RACOIN, llm-claude, stop-loss, 2m (peaked +55.0% first)+- -84.3% (unnamed), boost-ride, stop-loss, 6s+- -93.2% (unnamed), boost-ride, stop-loss, 9s+- -98.7% (unnamed), boost-ride, stop-loss, 8s+- -99.9% (unnamed), boost-ride, stop-loss, 3m (peaked +4.6% first)++### The drawdown story: 15 winners that gave it back++Fifteen positions were green at their peak and still closed red, costing the fleet about **0.059 SOL**. The tape is brutal about round-trips:++- $RACOIN peaked **+55.0%**, closed **-78.3%** (a stop that fired into no liquidity).+- $Meowpin peaked **+28.3%**, closed **-14.3%**.+- $Clouseau peaked **+24.8%**, closed **-13.4%**.+- $Poze peaked **+19.3%**, closed **-38.9%**.+- $CWARDIN peaked **+16.8%**, closed **-32.8%**.++This is the exact failure the winners avoided. The green arms did not predict tops; they had a take-profit target and hit it. **$MCP** is the counter-example that proves the point: it peaked +38.6%, and a trailing stop still banked it at **+10.6%** instead of letting it round-trip to zero. The exit ladder, not the entry, decided who kept their gains. (Every clickable on-chain receipt for all 90 is in the [full write-up](https://three.ws/blog/autonomous-trading-experiment).)++---++## The complete exit ledger++Break the 90 trades down by *how they closed*, and the mechanical lesson is unmistakable.++`[IMAGE: 08-exits.png]`+*Caption: Net SOL by exit type. Take-profit is the only category in the black. Stop-loss did the most damage. Everything that is not a take-profit is damage control.*++- **take_profit:** 13 exits, **100% win**, avg +42.8%, net **+0.056 SOL**. The only profitable category in the entire dataset.+- **timeout** (the max-hold backstop): 47 exits, 23% win, avg -0.9%, net **-0.036 SOL**. Roughly breakeven per trade, and by far the most common outcome. Most positions simply ran out the clock near flat.+- **trailing_stop:** 12 exits, 8% win, avg -14.7%, net **-0.037 SOL**. Trailing stops armed below breakeven are a machine for realizing small losses. They only earned their keep on positions already green.+- **stop_loss:** 18 exits, **0% win**, avg -48.0%, net **-0.086 SOL**. The single biggest bleeder, and the proof that a stop is a request, not a guarantee.++### The same story, by entry trigger++Sort by how the trade was *triggered* and the LLM edge shows up again:++- **llm_intel** (LLM-judged entries): 29 trades, 24% win, net **+0.009 SOL.** The only positive trigger.+- **intel_confirmed:** 10 trades, 10% win, net -0.035 SOL.+- **new_mint** (blind minute-zero snipes): 20 trades, 10% win, net -0.036 SOL.+- **graduation_ride** (boost-ride): 31 trades, 48% win, net -0.041 SOL.++---++## The reasoning ledger: every LLM thesis, verbatim++The LLM arms did not just trade. They wrote down *why*, one sentence per decision, to a hash-chained ledger, before the outcome existed. Here are all 29, ranked by how the trade turned out. Read top to bottom: the wins lean on "real two-sided market" and buyer-distribution language; the losses lean on "memetic name" and "narrative." The model's own vocabulary sorts its winners from its losers.++- **+71.3% $DEPE** (llm-grok, confidence 0.8): *"Strong real-market signal with multiple buyers and substantial wallet holding"*+- **+65.6% $DUCK** (llm-grok, confidence 0.7): *"DUCK has a decent market_realness score and a relatively balanced buyer-seller ratio."*+- **+63.1% $BLACKHOLE** (llm-grok, confidence 0.8): *"Genuine two-sided market indicated by high market_realness score."*+- **+60.8% $WhiteBull** (llm-auto, confidence 0.7): *"Moderately real market with diverse buyers warrants a small momentum position."*+- **+58.8% $掌握** (llm-auto, confidence 0.7): *"Genuine two-sided market and moderate market realness score justify a small momentum position."*+- **+14.2% $COOK** (llm-grok, confidence 0.8): *"Strong memetic potential with a catchy name and timely narrative."*+- **+10.6% $MCP** (llm-claude, confidence 0.8): *"MCP Genesis has a reasonably high market_realness score indicating genuine two-sided market activity."*+- **-2.5% $$RUGHUNTER** (llm-auto, confidence 0.8): *"Strong memetic name and timely narrative suggest potential for real momentum."*+- **-2.5% $Diamond** (llm-claude, confidence 0.8): *"Strong memetic name and ticker align with current market sentiment."*+- **-2.5% $RCC** (llm-auto, confidence 0.8): *"Memetic token name and low market cap may attract speculative buyers."*+- **-2.5% $SAVIOUR** (llm-auto, confidence 0.7): *"SAVIOR may have organic demand due to a compelling narrative and the creator's launch history"*+- **-2.6% $REC** (llm-grok, confidence 0.7): *"REC exhibits strong market_realness signals and timely narrative"*+- **-2.7% $CQUACK** (llm-claude, confidence 0.7): *"CQUACK's memetic name and symbol may attract initial speculative interest."*+- **-2.7% $Pink** (llm-claude, confidence 0.8): *"Pink grasshopper has a relatively real market with diverse buyers and sellers."*+- **-2.8% $Pink** (llm-auto, confidence 0.8): *"Pink grasshopper has a relatively real market with diverse buyers and sellers."*+- **-2.8% $Pink** (llm-grok, confidence 0.8): *"Pink grasshopper has a relatively high market realness score indicating genuine two-sided market demand."*+- **-3.0% $HOME** (llm-claude, confidence 0.7): *"Strong memetic quality and timely narrative align with market sentiment."*+- **-3.1% $HOME** (llm-auto, confidence 0.7): *"HOME token has strong memetic quality and a plausible narrative."*+- **-3.7% $birry** (llm-claude, confidence 0.7): *"Strong momentum with genuine market demand"*+- **-4.1% $Moon** (llm-auto, confidence 0.8): *"Memetic quality of 'TO THE MOON' is high and could attract significant attention"*+- **-4.1% $doge** (llm-grok, confidence 0.8): *"Strong memetic potential from 'swole' and 'doge' combination"*+- **-4.7% $boss** (llm-auto, confidence 0.8): *"Strong market realness and diverse buyer base justify a momentum position."*+- **-9.2% $APE** (llm-grok, confidence 0.8): *"A moderate momentum position in APE is worth taking due to a decent two-sided market and a sizable dev buy."*+- **-17.6% $tutu** (llm-auto, confidence 0.7): *"Moderately genuine market_realness and decent buyer distribution justify a momentum position."*+- **-21.7% $one** (llm-claude, confidence 0.7): *"Moderately strong market realness and balanced buyer/seller ratio justify a momentum position."*+- **-21.7% $one** (llm-auto, confidence 0.7): *"Genuine two-sided market and moderate market realness justify a small momentum position."*+- **-26.4% $COREY** (llm-auto, confidence 0.7): *"Genuine two-sided market and moderate market realness score indicate potential for real momentum."*+- **-37.4% $Elon** (llm-auto, confidence 0.7): *"Strong memetic quality and decent market realness justify a small momentum position."*+- **-78.3% $RACOIN** (llm-claude, confidence 0.8): *"RACOIN has a relatively genuine market with diverse buyers and sellers."*++Two things stand out. First, the biggest LLM loss, $RACOIN at -78.3%, was logged at 0.8 confidence with a clean-sounding thesis ("relatively genuine market with diverse buyers"), then round-tripped from +55% to -78% when its liquidity vanished. High confidence is not high safety on this market. Second, three different arms bought **$Pink** within seconds on nearly identical theses: the arms converge on the same coin, which is exactly the correlated-bet risk the A/B design exists to surface.++---++## What went well++**1. The take-profit is where the money is.** It was the *only* net-positive exit category: +0.056 SOL across 13 exits, every one a win. If there is one mechanical takeaway, it is that a defined profit target you actually hit beats "let it ride" on a market where the median coin dies within the hour.++**2. Selection beat prediction.** The LLM arms proved you can win with a 24% strike rate if your winners are five times the size of your losers. That is a fundamentally different, and more robust, way to trade this market than trying to be right more often.++**3. The firewall did its job.** Every one of the 90 entries passed a simulated sell first. The catastrophic losses were liquidity collapses after entry, not honeypots the firewall missed.++**4. Nobody paperhanded.** We audited every exit against each token's full future price history. The fleet left, as far as the tape is concerned, zero SOL on the table (full audit below).++---++## What went wrong++**1. A stop-loss is a request, not a guarantee.** Eighteen positions closed on a stop, none of them green, averaging -48%. Five realized between -78% and -99.9%, several in **under ten seconds**. The stop fired on time; the bonding curve's liquidity was already gone. **Tail defense happens at entry (holder-concentration screening) and in position sizing, not at the exit.** You cannot stop-loss your way out of a coin that has no bids.++**2. Trailing stops armed below breakeven realize small losses.** Twelve trailing-stop exits, net negative, 8% win rate. Under water, a trailing stop just locks in the damage a hair faster.++**3. The conviction gate and the money band never lined up.** Our own conviction model was right and mostly ignored (its own section, below).++**4. The self-improvement loop was silently dead** (its own section, below).++---++## The 83,000 coins we didn't buy++The trades are only half the record. The more interesting dataset is everything the fleet **declined**.++While it was live, the fleet **observed 82,994 launches in three days**, conviction-scored 45,784 of them, watched 42,995 to a labeled outcome, and bought **72**. That is under **1 in 1,000**.++`[IMAGE: 05-funnel.png]`+*Caption: 82,994 launches watched, 72 bought. On a market that is mostly predatory, selectivity is the product, not a side effect.*++Because roughly 43,000 of the skipped coins eventually earned outcome labels, we can test the conviction model at scale, on coins the fleet never touched. Here is the full breakdown of what happened to each band:++- **Unscored** (18,510 coins): 354 graduated, 1,581 pumped, 15,938 rugged, 637 flat. Good outcome: **10.5%**.+- **Conviction 0 to 30** (20,319 coins): 522 graduated, 1,874 pumped, 17,136 rugged, 787 flat. Good outcome: **11.8%**.+- **Conviction 30 to 50** (4,041 coins): 131 graduated, 571 pumped, 3,276 rugged, 63 flat. Good outcome: **17.4%**.+- **Conviction 50+** (71 labeled coins): 9 graduated, 46 pumped, 16 rugged, 0 flat. Good outcome: **77.5%.** About seven times the base rate.++`[IMAGE: 04-conviction.png]`+*Caption: Share of coins that pumped or graduated, by conviction band, across 42,995 labeled outcomes. The 50+ band hit 77.5%, roughly 7x the ~11% base rate. The signal is real and it is sitting in production.*++Now the gut-punch. **How many of the 110 coins that ever crossed conviction 50 did the fleet buy? Zero.**++The reason is painfully mechanical. One arm's gate was set at conviction 35 (too low, it admitted the mediocre 17% band). The other arm's gate was set at 65. The highest score any coin reached in the entire window was 61. **The two gates bracketed the profitable band and covered none of it.** The strict arm could never mathematically fire. Nobody chose this outcome; a config off by a little quietly excluded the best signal we had.++We checked for hindsight bias, because a 77.5% hit rate that only appears after the fact is worthless. Of the 110 coins, 104 have an archived *first* score, and all 104 were already at 50+ the very first time they were ever scored. **The signal was on the board before the outcomes were known.**++---++## The ones that got away, and the fix++The five biggest coins we skipped, and what they looked like at the moment our systems actually observed them:++- **$USOH**: ran to a **$161M** all-time-high market cap (a 73,975x from where we saw it). At observation: quality 43/100, 3 visible buyers.+- **$DOW**: $134M ATH. At observation: quality 36, conviction 20, 3 buyers.+- **$NTFS**: $76M ATH. Quality 43, conviction 21, 3 buyers.+- **$USWR**: $67M ATH. Quality 43, conviction 21, 3 buyers.+- **$VORF**: $25M ATH. Quality 43, conviction 21, 3 buyers.++At the moment we saw them, every one of these was statistically identical to the roughly 36,000 rugs sitting in the same dataset: a handful of buyers, a mediocre quality score. Their runs started *after* our observation window on them had closed.++That is the structural lesson, and it is not fixable with a better threshold: **a minute-zero sniper is blind to every winner whose story starts at minute thirty.** No entry filter, however good, can see a move that has not begun.++So we measured the alternative: a **second look**. If you bought each of the 102 measurable conviction-50 crossings at the close of the candle where they crossed:++- the crossing lands a median of **2 minutes after launch** (still sniper speed, not lagging),+- median capturable upside was **1.23x**; **35% reached 1.5x**, **19% reached 2x**, best **9.6x**,+- **zero** coins had already topped before they crossed,+- but the median crossing coin eventually decays to **0.32x**, so the profit only exists for a strategy that actually *takes* it.++We built that strategy. The sniper now has an **`oracle_crossing` trigger**: a watcher buys a coin the first time it crosses the conviction bar, sells the initial stake into a 1.5x ladder, and keeps a protected moonbag. The formerly-unreachable strict arm is re-armed on it at conviction 50. Its trades will publish exactly like every other trade in this post.++---++## The paperhands audit: did we sell too early?++The obvious criticism of any take-profit strategy is that you clip your winners and miss the moonshots. So we tested it against reality, hard. We checked **every one of the 90 exits** against each token's **full post-exit candle history**.++`[IMAGE: 06-paperhands.png]`+*Caption: Every exit checked against the token's entire future. 0 of 90 tokens trade above our exit today. 0 of 90 ever printed 1.5x our exit afterward. 37 never traded again at all. Total SOL lost to selling early: zero.*++The findings:++- **Where does each coin trade now, versus where we sold?** 0 of 90 are above our exit price. Best case 0.90x, median 0.36x. 37 of 90 are down more than 90% since we left.+- **What was the highest price each token *ever* printed after our exit?** 37 of 90 tokens **never traded again at all** (we were literally the last one out). Of the 53 that kept trading, the median post-exit high was 0.43x our exit, and **not one reached 1.5x.**+- The single closest call in the entire dataset: a trailing stop shook one arm out at +10.6%, and the token later poked 1.38x higher, worth about 0.004 SOL of "regret."++**Total SOL lost to selling too early, across the entire experiment: zero.** The fleet has no paperhands problem. Every sell was vindicated by the tape. The money was lost at entry, and the fix lives on the buy side.++---++## Calibration: the system's confidence carried real signal++Every decision is logged with a self-rated confidence. Sorted by that number, the ordering holds up:++- The **65 higher-confidence decisions** (logged near 0.7) were right about **34%** of the time.+- The **25 lower-confidence decisions** (logged near 0.4) were right about **12%** of the time.++The absolute hit rates are humbling on a market this adversarial. But the *ordering* is the prize: higher confidence really did mean higher hit rate. The LLM arms show the same monotonicity in their own confidence scores (roughly 21% win at 0.7 confidence, 27% at 0.8). That means the signal can be calibrated and sized against, which is the whole point of logging it.++---++## The embarrassing part: green dashboards, zero learning++The fleet is supposed to be self-improving. An optimizer reads each arm's real record every 6 hours and tunes its knobs inside hard safety bounds. After two days of "running," we audited it.++**It had never applied a single change.**++The database driver accepts a dynamic column name in a WHERE position but not in a SET position. The update meant to write each tuned knob threw a syntax error at runtime, every time. That throw was swallowed by an error handler, the audit-log insert was skipped along with it, and the cron kept returning HTTP 200 every 6 hours. Green dashboards, zero learning.++A second loop, meant to feed realized profit-and-loss back into the conviction model, was deployed in code but its scheduler job was never created. It ran exactly zero times.++Both are fixed now. The rule we wrote down and taped to the wall:++> **An autonomous system's health is measured by rows in its audit tables, not by its HTTP status codes.** "The cron returns 200" and "the loop is learning" are unrelated statements. If your self-improving system cannot show you the diffs it applied, assume it applied none.++---++## Don't trust us. Replay it.++The full write-up ships an **interactive backtester**. It holds the real per-minute price history of 77 of the trades and lets you run *your own* exit rules against the fleet's, on the same coins and the same candles.++Load "let winners run" and the result gets *worse*. Load "tight scalper" and the whole loss flips positive. On a market where the median coin dies within the hour, the single biggest lever in your exit policy is refusing to wait for a moonshot that mostly never comes. Thirty seconds, your own hands, real data: **[three.ws/blog/autonomous-trading-experiment](https://three.ws/blog/autonomous-trading-experiment)**.++---++## What we learned, in five lines++1. **Win rate is a vanity metric.** Optimize expectancy (average win times hit rate, minus average loss), not how often you are right.+2. **Selection beats prediction.** The durable edge is declining bad launches, not forecasting good ones.+3. **Stops do not work without liquidity.** Tail risk is managed at entry and in size, never at the exit.+4. **Take profit on a real target.** It was the only net-positive exit category in the whole dataset.+5. **Measure learning by audit rows, not status codes.** A 200 is not a diff.++---++## What's next++The experiment continues, and it changes in three ways:++- **Budgets now flow toward whatever performs.** Capital is reallocated to the arms that earn it, on the fleet's own measured record.+- **The `oracle_crossing` arm is live.** The second-look strategy that would have caught the winners our minute-zero snipers were structurally blind to is now in the field, publishing its trades the same way.+- **The model roster widens.** More frontier LLMs join the cockpit, head to head at equal budgets under identical rails. **Kimi K3 is first in line.** Same size of risk, same exit ladder, different judgment: exactly the A/B design that produced this postmortem.++The next edition of this dataset will also include the fleet's own self-tunings, now that the optimizer is actually writing them.++---++## Why this matters for three.ws++three.ws is a platform where AI agents own real Solana wallets and can be armed to act autonomously. Autonomous agents that hold money are easy to demo and hard to trust. The demo is a language model with a wallet key. The trust problem is everything else.++This experiment is how we earn that trust in public:++- **Every decision every agent made is on a public, hash-chained ledger.** This entire postmortem was generated from that ledger and the position table. We do not get to tell you a story; the receipts do.+- **We publish the losses.** A fleet that only shows you its wins is marketing. A fleet that shows you a -0.103 SOL result, a dead self-improvement loop, and a config bug that excluded its own best signal, is a system you can actually reason about.+- **The architecture generalizes.** Deterministic entry gates, a firewall that simulates the sell before the buy, an exit ladder, and a tamper-evident reasoning ledger are not memecoin-specific. They are the shape of any agent you would trust with a balance.++That is the product: not a bot that promises you gains, but an agent platform whose every autonomous action is measurable, auditable, and published, win or lose. **$THREE holders are watching the same ledger we are.**++---++## Verify everything++- **Full breakdown, all 90 graded trades, charts, backtester, raw JSON:** [three.ws/blog/autonomous-trading-experiment](https://three.ws/blog/autonomous-trading-experiment)+- **The first autonomous trade, decision by decision:** [three.ws/blog/first-autonomous-trade](https://three.ws/blog/first-autonomous-trade)+- **How the sniper is built (entry gates, the trade firewall, the exit ladder):** [three.ws/docs/agent-sniper](https://three.ws/docs/agent-sniper)++Follow **@trythreews** for the next edition. The crossing arm's trades and the wider model roster (Kimi K3 first) publish the same way this did: win or lose, on the ledger, no cherry-picking.diff --git a/blog/x-article-assets/00-cover.png b/blog/x-article-assets/00-cover.pngnew file mode 100644index 000000000..40f179015Binary files /dev/null and b/blog/x-article-assets/00-cover.png differdiff --git a/blog/x-article-assets/01-hero.png b/blog/x-article-assets/01-hero.pngnew file mode 100644index 000000000..d4f7bbe9aBinary files /dev/null and b/blog/x-article-assets/01-hero.png differdiff --git a/blog/x-article-assets/02-finding.png b/blog/x-article-assets/02-finding.pngnew file mode 100644index 000000000..e7bd6dfe8Binary files /dev/null and b/blog/x-article-assets/02-finding.png differdiff --git a/blog/x-article-assets/03-leaderboard.png b/blog/x-article-assets/03-leaderboard.pngnew file mode 100644index 000000000..991f506eaBinary files /dev/null and b/blog/x-article-assets/03-leaderboard.png differdiff --git a/blog/x-article-assets/04-conviction.png b/blog/x-article-assets/04-conviction.pngnew file mode 100644index 000000000..b51e396ceBinary files /dev/null and b/blog/x-article-assets/04-conviction.png differdiff --git a/blog/x-article-assets/05-funnel.png b/blog/x-article-assets/05-funnel.pngnew file mode 100644index 000000000..6eed0925eBinary files /dev/null and b/blog/x-article-assets/05-funnel.png differdiff --git a/blog/x-article-assets/06-paperhands.png b/blog/x-article-assets/06-paperhands.pngnew file mode 100644index 000000000..89eb969e9Binary files /dev/null and b/blog/x-article-assets/06-paperhands.png differdiff --git a/blog/x-article-assets/07-config.png b/blog/x-article-assets/07-config.pngnew file mode 100644index 000000000..a3a0b8883Binary files /dev/null and b/blog/x-article-assets/07-config.png differdiff --git a/blog/x-article-assets/08-exits.png b/blog/x-article-assets/08-exits.pngnew file mode 100644index 000000000..825ff94d1Binary files /dev/null and b/blog/x-article-assets/08-exits.png differdiff --git a/blog/x-article-assets/09-waterfall.png b/blog/x-article-assets/09-waterfall.pngnew file mode 100644index 000000000..42c9c9a9eBinary files /dev/null and b/blog/x-article-assets/09-waterfall.png differdiff --git a/data/pages.json b/data/pages.jsonindex 06e299fed..239280849 100644--- a/data/pages.json+++ b/data/pages.json@@ -1064,6 +1064,14 @@"changefreq": "hourly","added": "2026-06-15"},+ {+ "path": "/tracker",+ "title": "KOL Tracker",+ "description": "Solana crypto KOLs ranked by realized P&L computed from their own wallet's on-chain trade history, with win rate, volume, trade count, and X follower counts for verified handles.",+ "priority": 0.8,+ "changefreq": "hourly",+ "added": "2026-07-23"+ },{"path": "/integrity","title": "Custody Integrity",diff --git a/pages/tracker.html b/pages/tracker.htmlnew file mode 100644index 000000000..082134791--- /dev/null+++ b/pages/tracker.html@@ -0,0 +1,281 @@+<!doctype html>+<html lang="en">+ <head>+ <script>/* three.ws theme boot — no-flash */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>+ <meta charset="utf-8" />+ <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />+ <title data-i18n="tracker.meta_title">KOL Tracker · three.ws</title>+ <meta name="description" content="Track Solana crypto KOLs by real, on-chain P&L — realized profit, win rate, volume, and trade count computed from their own wallet activity, with X follower counts for the handles we've verified." data-i18n-attr="content:tracker.meta_description"/>+ <link rel="canonical" href="https://three.ws/tracker" />+ <link rel="icon" href="/favicon.ico" sizes="any" />+ <link rel="icon" type="image/svg+xml" href="/favicon.svg" />+ <link rel="apple-touch-icon" href="/apple-touch-icon.png" />+ <link rel="manifest" href="/manifest.webmanifest" />+ <link rel="stylesheet" href="/style.css" />+ <link rel="stylesheet" href="/nav.css" />+ <link rel="stylesheet" href="/footer.css" />+ <meta property="og:type" content="website" />+ <meta property="og:site_name" content="three.ws" />+ <meta property="og:url" content="https://three.ws/tracker" />+ <meta property="og:title" content="KOL Tracker · three.ws" data-i18n-attr="content:tracker.meta_og_title"/>+ <meta property="og:description" content="Solana crypto KOLs ranked by real, on-chain P&L — not self-reported numbers." data-i18n-attr="content:tracker.meta_og_description"/>+ <meta property="og:image" content="https://three.ws/api/page-og?s=crypto&t=KOL+Tracker&d=Solana+crypto+KOLs+ranked+by+real%2C+on-chain+P%26L&p=%2Ftracker" />+ <meta property="og:image:width" content="1200" />+ <meta property="og:image:height" content="630" />+ <meta name="twitter:card" content="summary_large_image" />+ <meta name="twitter:site" content="@trythreews" />+ <meta name="twitter:title" content="KOL Tracker · three.ws" data-i18n-attr="content:tracker.meta_twitter_title"/>+ <meta name="twitter:description" content="Solana crypto KOLs ranked by real, on-chain P&L, win rate, and volume." data-i18n-attr="content:tracker.meta_twitter_description"/>+ <meta name="twitter:image" content="https://three.ws/api/page-og?s=crypto&t=KOL+Tracker&d=Solana+crypto+KOLs+ranked+by+real%2C+on-chain+P%26L&p=%2Ftracker" />+ <meta name="theme-color" content="#0a0a0a" />+ <style>+ .tk-shell { max-width: 1080px; margin: 0 auto; padding: var(--space-lg) var(--space-md) var(--space-2xl); }+ .tk-hero { padding: var(--space-xl) 0 var(--space-md); }+ .tk-kicker { display: inline-flex; align-items: center; gap: var(--space-xs); font: var(--weight-semibold) var(--text-2xs)/1.2 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-text-dim); margin: 0 0 var(--space-sm); }+ .tk-live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--color-success); box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-success) 60%, transparent); animation: tk-pulse 1.8s ease infinite; }+ @keyframes tk-pulse { 0%,100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-success) 55%, transparent); } 70% { box-shadow: 0 0 0 6px transparent; } }+ .tk-title { font: var(--weight-bold) var(--text-2xl)/1.05 var(--font-display); color: var(--color-text-bright); margin: 0 0 var(--space-sm); letter-spacing: -0.02em; }+ .tk-sub { font: var(--weight-regular) var(--text-base)/var(--leading-normal) var(--font-body); color: var(--color-text-dim); margin: 0; max-width: 68ch; }++ .tk-controls { display: flex; flex-wrap: wrap; gap: var(--space-sm); align-items: center; margin: var(--space-lg) 0 var(--space-md); }+ .tk-seg { display: inline-flex; gap: var(--space-3xs); padding: var(--space-3xs); background: var(--surface-1); border: 1px solid var(--color-border); border-radius: var(--radius-pill); }+ .tk-seg-btn { appearance: none; border: 0; background: transparent; cursor: pointer; padding: var(--space-xs) var(--space-md); border-radius: var(--radius-pill); font: var(--weight-medium) var(--text-md)/1 var(--font-body); color: var(--color-text-dim); transition: color var(--duration-fast) var(--ease-standard), background var(--duration-fast) var(--ease-standard); white-space: nowrap; }+ .tk-seg-btn:hover { color: var(--color-text); }+ .tk-seg-btn.is-active { background: var(--surface-3); color: var(--color-text-bright); }+ .tk-seg-btn:focus-visible { outline: var(--focus-ring-width) solid var(--focus-ring-color); outline-offset: var(--focus-ring-offset); }+ .tk-count { margin-left: auto; font: var(--weight-medium) var(--text-sm)/1 var(--font-mono); color: var(--color-text-faint); }++ .tk-board-wrap { border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--surface-1); overflow-x: auto; }+ .tk-board { min-width: 720px; }+ .tk-head, .tk-row { display: grid; grid-template-columns: 44px 1.6fr 1fr 0.9fr 1fr 0.8fr 0.7fr; align-items: center; gap: var(--space-sm); padding: var(--space-sm) var(--space-md); }+ .tk-head { background: var(--surface-2); border-bottom: 1px solid var(--color-border); font: var(--weight-semibold) var(--text-2xs)/1 var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-text-faint); position: sticky; top: 0; }+ .tk-col-num { text-align: right; }+ .tk-row { border-bottom: 1px solid var(--color-border); transition: background var(--duration-fast) var(--ease-standard); }+ .tk-row:last-child { border-bottom: 0; }+ .tk-row:hover { background: var(--surface-2); }+ .tk-rank { font: var(--weight-bold) var(--text-md)/1 var(--font-mono); color: var(--color-text-dim); }+ .tk-rank.is-top { color: var(--color-text-bright); }+ .tk-medal { font-size: 16px; }+ .tk-kol { display: flex; align-items: center; gap: var(--space-sm); min-width: 0; }+ .tk-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--surface-3); flex: none; border: 1px solid var(--color-border); }+ .tk-avatar-fallback { display: flex; align-items: center; justify-content: center; font: var(--weight-semibold) var(--text-sm)/1 var(--font-body); color: var(--color-text-dim); font-family: var(--font-mono); }+ .tk-kol-meta { min-width: 0; }+ .tk-handle { display: block; font: var(--weight-medium) var(--text-md)/1.2 var(--font-body); color: var(--color-text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }+ a.tk-handle:hover { color: var(--color-text-bright); text-decoration: underline; }+ .tk-wallet { display: block; font: var(--weight-regular) var(--text-2xs)/1.2 var(--font-mono); color: var(--color-text-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }+ .tk-value { font: var(--weight-semibold) var(--text-md)/1 var(--font-mono); color: var(--color-text-bright); text-align: right; }+ .tk-value.tk-up { color: var(--color-success); }+ .tk-value.tk-down { color: var(--color-danger); }+ .tk-value.tk-muted { color: var(--color-text-faint); font-weight: var(--weight-regular); }+ .tk-source { display: inline-block; margin-left: 6px; font: var(--weight-medium) var(--text-2xs)/1 var(--font-mono); color: var(--color-text-faint); vertical-align: middle; }++ .tk-state { padding: var(--space-2xl) var(--space-md); text-align: center; }+ .tk-state-title { font: var(--weight-semibold) var(--text-lg)/1.2 var(--font-display); color: var(--color-text-bright); margin: 0 0 var(--space-xs); }+ .tk-state-msg { font: var(--weight-regular) var(--text-md)/var(--leading-normal) var(--font-body); color: var(--color-text-dim); margin: 0 auto var(--space-md); max-width: 52ch; }+ .tk-state .tk-cta { display: inline-flex; align-items: center; gap: var(--space-xs); padding: var(--space-sm) var(--space-lg); border-radius: var(--radius-md); background: var(--accent); color: #0a0a0a; font: var(--weight-semibold) var(--text-md)/1 var(--font-body); text-decoration: none; border: 0; cursor: pointer; }++ .tk-skel-row { display: grid; grid-template-columns: 44px 1.6fr 1fr 0.9fr 1fr 0.8fr 0.7fr; gap: var(--space-sm); align-items: center; padding: var(--space-sm) var(--space-md); border-bottom: 1px solid var(--color-border); min-width: 720px; }+ .tk-skel { height: 14px; border-radius: var(--radius-sm); background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: tk-shimmer 1.4s ease infinite; }+ .tk-skel.circle { width: 32px; height: 32px; border-radius: 50%; }+ @keyframes tk-shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }+ @media (prefers-reduced-motion: reduce) { .tk-skel, .tk-live-dot { animation: none; } }++ .tk-footer-links { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-top: var(--space-lg); }+ .tk-footer-links a { font: var(--weight-medium) var(--text-sm)/1 var(--font-body); color: var(--color-text-dim); text-decoration: none; padding: var(--space-xs) var(--space-md); border: 1px solid var(--color-border); border-radius: var(--radius-pill); transition: color var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard); }+ .tk-footer-links a:hover { color: var(--color-text-bright); border-color: var(--color-text-dim); }++ @media (max-width: 640px) {+ .tk-title { font-size: var(--text-xl); }+ }+ </style>++ <meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1">+ <meta property="og:locale" content="en_US">+ <meta property="og:image:alt" content="KOL Tracker — three.ws">+ <script type="application/ld+json">{"@context":"https://schema.org","@graph":[{"@type":"WebPage","name":"KOL Tracker","description":"Solana crypto KOLs ranked by real, on-chain P&L, win rate, volume, and trade count.","url":"https://three.ws/tracker","isPartOf":{"@type":"WebSite","name":"three.ws","url":"https://three.ws"}}]}</script>+ </head>+ <body>+ <header><div id="nav-container"></div></header>+ <script src="/nav.js"></script>++ <main class="tk-shell" aria-labelledby="tk-title">+ <section class="tk-hero">+ <p class="tk-kicker" data-i18n-html="tracker.on_chain_updates_live"><span class="tk-live-dot" aria-hidden="true"></span> On-chain · updates live</p>+ <h1 id="tk-title" class="tk-title" data-i18n="tracker.kol_tracker">KOL Tracker</h1>+ <p class="tk-sub" data-i18n="tracker.solana_crypto_kols_ranked_by_realized_p">Solana crypto KOLs ranked by realized P&L computed straight from their own wallet's trade history — not a self-reported number. Follower counts shown only for handles we've verified control the wallet.</p>+ </section>++ <section class="tk-controls" aria-label="Tracker window">+ <div class="tk-seg" role="tablist" aria-label="Window" id="tk-window">+ <button class="tk-seg-btn" data-window="24h" role="tab" aria-selected="false" data-i18n="tracker.24h">24H</button>+ <button class="tk-seg-btn is-active" data-window="7d" role="tab" aria-selected="true" data-i18n="tracker.7d">7D</button>+ <button class="tk-seg-btn" data-window="30d" role="tab" aria-selected="false" data-i18n="tracker.30d">30D</button>+ </div>+ <span class="tk-count" id="tk-count"></span>+ </section>++ <div class="tk-board-wrap">+ <section class="tk-board" aria-label="Tracked KOLs" aria-busy="true">+ <div class="tk-head" role="row" aria-hidden="true">+ <span>#</span>+ <span data-i18n="tracker.kol">KOL</span>+ <span class="tk-col-num" id="tk-pnl-label" data-i18n="tracker.7d_pnl">7D PnL</span>+ <span class="tk-col-num" data-i18n="tracker.followers">Followers</span>+ <span class="tk-col-num" id="tk-vol-label" data-i18n="tracker.7d_volume">7D Volume</span>+ <span class="tk-col-num" data-i18n="tracker.win_rate">Win Rate</span>+ <span class="tk-col-num" data-i18n="tracker.trades">Trades</span>+ </div>+ <div id="tk-rows" aria-live="polite"></div>+ </section>+ </div>++ <nav class="tk-footer-links" aria-label="Other leaderboards">+ <a href="/leaderboard" data-i18n="tracker.trader_leaderboard">Trader Leaderboard →</a>+ <a href="/smart-money" data-i18n="tracker.smart_money_radar">Smart Money Radar →</a>+ <a href="/rankings" data-i18n="tracker.creator_rankings">Creator Rankings →</a>+ </nav>+ </main>++ <script src="/brand.js" defer></script>+ <div id="footer-container"></div>+ <script src="/footer.js"></script>++ <script type="module">+ const rowsEl = document.getElementById('tk-rows');+ const boardEl = rowsEl.closest('.tk-board');+ const countEl = document.getElementById('tk-count');+ const windowSeg = document.getElementById('tk-window');+ const pnlLabel = document.getElementById('tk-pnl-label');+ const volLabel = document.getElementById('tk-vol-label');++ const WINDOW_LABEL = { '24h': '24H', '7d': '7D', '30d': '30D' };+ let state = { window: '7d', loading: false };++ const esc = (s) => String(s).replace(/[<>&"']/g, (c) => ({ '<': '<', '>': '>', '&': '&', '"': '"', "'": ''' }[c]));++ function fmtUsd(v) {+ if (v == null) return '—';+ const abs = Math.abs(v);+ const sign = v < 0 ? '-' : '+';+ if (abs >= 1_000_000) return `${sign}$${(abs / 1_000_000).toFixed(2)}M`;+ if (abs >= 1_000) return `${sign}$${(abs / 1_000).toFixed(1)}K`;+ return `${sign}$${abs.toFixed(0)}`;+ }+ function fmtVolume(v) {+ if (v == null) return '—';+ if (v >= 1_000_000) return `$${(v / 1_000_000).toFixed(2)}M`;+ if (v >= 1_000) return `$${(v / 1_000).toFixed(1)}K`;+ return `$${v.toFixed(0)}`;+ }+ function fmtFollowers(v) {+ if (v == null) return '—';+ if (v >= 1_000_000) return `${(v / 1_000_000).toFixed(1)}M`;+ if (v >= 1_000) return `${(v / 1_000).toFixed(1)}K`;+ return String(v);+ }+ function fmtWinRate(v) { return v == null ? '—' : `${Math.round(v * 100)}%`; }+ function fmtTrades(v) { return v == null ? '—' : String(v); }+ function shortWallet(w) { return w ? `${w.slice(0, 4)}…${w.slice(-4)}` : ''; }++ function medal(rank) {+ if (rank === 1) return '<span class="tk-medal" aria-hidden="true">🥇</span>';+ if (rank === 2) return '<span class="tk-medal" aria-hidden="true">🥈</span>';+ if (rank === 3) return '<span class="tk-medal" aria-hidden="true">🥉</span>';+ return '';+ }++ function avatarCell(r) {+ if (r.avatarUrl) return `<img class="tk-avatar" src="${esc(r.avatarUrl)}" alt="" loading="lazy" />`;+ const src = r.xHandle || r.label || r.wallet || '?';+ const ch = esc(src[0] || '?').toUpperCase();+ return `<span class="tk-avatar tk-avatar-fallback" aria-hidden="true">${ch}</span>`;+ }++ function pnlCell(r) {+ if (r.pnlUsd == null) return '<span class="tk-value tk-muted">—</span>';+ const cls = r.pnlUsd > 0 ? 'tk-up' : r.pnlUsd < 0 ? 'tk-down' : '';+ const src = r.pnlSource === 'onchain' ? '' : r.pnlSource ? `<span class="tk-source" title="Sourced from ${esc(r.pnlSource)}, not live on-chain trades">(${esc(r.pnlSource)})</span>` : '';+ return `<span class="tk-value ${cls}">${fmtUsd(r.pnlUsd)}</span>${src}`;+ }++ function rowHtml(r, rank) {+ const displayName = r.xHandle ? `@${r.xHandle}` : (r.label || shortWallet(r.wallet));+ const handleHtml = r.xHandle+ ? `<a class="tk-handle" href="https://x.com/${esc(r.xHandle)}" target="_blank" rel="noopener noreferrer nofollow">${esc(displayName)}</a>`+ : `<span class="tk-handle">${esc(displayName)}</span>`;+ const rankCls = rank <= 3 ? 'tk-rank is-top' : 'tk-rank';+ return `+ <div class="tk-row" role="row">+ <span class="${rankCls}">${medal(rank) || '#' + rank}</span>+ <span class="tk-kol">${avatarCell(r)}<span class="tk-kol-meta">${handleHtml}<span class="tk-wallet">${esc(shortWallet(r.wallet))}</span></span></span>+ <span class="tk-col-num">${pnlCell(r)}</span>+ <span class="tk-value tk-col-num">${fmtFollowers(r.followerCount)}</span>+ <span class="tk-value tk-col-num">${fmtVolume(r.volumeUsd)}</span>+ <span class="tk-value tk-col-num">${fmtWinRate(r.winRate)}</span>+ <span class="tk-value tk-col-num">${fmtTrades(r.trades)}</span>+ </div>`;+ }++ function skeleton() {+ let h = '';+ for (let i = 0; i < 10; i++) {+ h += `<div class="tk-skel-row"><span class="tk-skel" style="width:20px"></span><span style="display:flex;align-items:center;gap:10px"><span class="tk-skel circle"></span><span class="tk-skel" style="width:110px"></span></span><span class="tk-skel" style="width:60px;justify-self:end"></span><span class="tk-skel" style="width:50px;justify-self:end"></span><span class="tk-skel" style="width:60px;justify-self:end"></span><span class="tk-skel" style="width:40px;justify-self:end"></span><span class="tk-skel" style="width:30px;justify-self:end"></span></div>`;+ }+ rowsEl.innerHTML = h;+ }++ function showState(copy) {+ rowsEl.innerHTML = `<div class="tk-state"><p class="tk-state-title">${esc(copy.title)}</p><p class="tk-state-msg">${esc(copy.msg)}</p></div>`;+ }++ async function load() {+ if (state.loading) return;+ state.loading = true;+ skeleton();+ boardEl.setAttribute('aria-busy', 'true');+ const label = WINDOW_LABEL[state.window];+ pnlLabel.textContent = `${label} PnL`;+ volLabel.textContent = `${label} Volume`;+ try {+ const res = await fetch(`/api/kol/tracker?window=${encodeURIComponent(state.window)}&limit=100`);+ if (!res.ok) throw new Error('HTTP ' + res.status);+ const data = await res.json();+ const rows = data.rows || [];+ countEl.textContent = rows.length ? `${rows.length} KOLs` : '';+ if (!rows.length) {+ showState({ title: 'No KOLs tracked yet', msg: 'The tracked-wallet list is empty for this window. Check back soon.' });+ return;+ }+ rowsEl.innerHTML = rows.map((r, i) => rowHtml(r, i + 1)).join('');+ } catch (err) {+ showState({ title: "Couldn't load the tracker", msg: err.message || 'Something went wrong.' });+ } finally {+ state.loading = false;+ boardEl.setAttribute('aria-busy', 'false');+ }+ }++ windowSeg.addEventListener('click', (e) => {+ const btn = e.target.closest('.tk-seg-btn');+ if (!btn || btn.classList.contains('is-active')) return;+ windowSeg.querySelectorAll('.tk-seg-btn').forEach((b) => { b.classList.remove('is-active'); b.setAttribute('aria-selected', 'false'); });+ btn.classList.add('is-active');+ btn.setAttribute('aria-selected', 'true');+ state.window = btn.dataset.window;+ load();+ });+ windowSeg.addEventListener('keydown', (e) => {+ if (e.key !== 'ArrowLeft' && e.key !== 'ArrowRight') return;+ const btns = [...windowSeg.querySelectorAll('.tk-seg-btn')];+ const i = btns.findIndex((b) => b.classList.contains('is-active'));+ const next = btns[(i + (e.key === 'ArrowRight' ? 1 : btns.length - 1)) % btns.length];+ next.focus(); next.click();+ e.preventDefault();+ });++ load();+ </script>+ <!-- Runtime i18n: detects locale, swaps annotated copy, mounts <lang-switcher>. -->+ <script type="module" src="/i18n.js"></script>+ </body>+</html>diff --git a/public/tutorials-manifest.js b/public/tutorials-manifest.jsindex f024c1708..01eb17e9d 100644--- a/public/tutorials-manifest.js+++ b/public/tutorials-manifest.js@@ -514,6 +514,16 @@previewModel: '/animations/soldier.glb',ctaPrimary: { label: 'Open Vanity Wallet', href: '/vanity-wallet' },},+ {+ slug: 'arm-an-agent-sniper',+ tier: 'advanced',+ title: 'Arm an Autonomous Sniper on Your Agent',+ blurb: 'Fund your agent\'s wallet and arm it to trade fresh pump.fun launches on its own: entry filters, an on-chain safety simulation before every buy, a strict exit ladder, and a hash-chained decision ledger you can audit trade by trade.',+ builds: 'A live autonomous sniper strategy trading real SOL from your agent\'s wallet',+ time: '30 min',+ previewModel: '/animations/soldier.glb',+ ctaPrimary: { label: 'Open Mission Control', href: '/terminal' },+ },];const TIER_META = {diff --git a/src/kol/tracker.js b/src/kol/tracker.jsnew file mode 100644index 000000000..8e7183e0b--- /dev/null+++ b/src/kol/tracker.js@@ -0,0 +1,58 @@+// KOL Tracker — the wallet-centric leaderboard behind /tracker and+// GET /api/kol/tracker, combining three independently-sourced, real signals per+// tracked wallet:+// - trades + FIFO P&L/win-rate/volume, from wallet-pnl.js (real on-chain trades+// via whatever _fetchTrades source is configured — no synthetic numbers)+// - X follower count, from x-profile.js (real X API, only for wallets an admin+// has explicitly attached a verified handle to — see import-gmgn's xHandle map)+// - the tracked-wallet list itself, from wallet-store.js (bundled seed ++// admin-curated R2 imports)+//+// A wallet with no xHandle attached still ranks — it just renders with no+// follower count, never a fabricated one. Same for P&L: if no trade source is+// configured (PUMPFUN_BOT_URL unset), realizedUsd/winRate/trades/volumeUsd fall+// back to whatever the wallet's own record carries (e.g. a gmgn import's+// pnlUsd/winRate), which is honestly labeled as `pnlSource`.++import { loadWallets } from './wallet-store.js';+import { getWalletPnl } from './wallet-pnl.js';+import { fetchXProfile } from './x-profile.js';++async function rowFor(entry, window) {+ const pnl = await getWalletPnl({ wallet: entry.wallet, window }).catch(() => null);+ const hasLiveTrades = !!pnl && pnl.trades > 0;++ const profile = entry.xHandle ? await fetchXProfile(entry.xHandle).catch(() => null) : null;++ return {+ wallet: entry.wallet,+ label: entry.label ?? null,+ xHandle: entry.xHandle ?? null,+ avatarUrl: profile?.avatarUrl ?? null,+ verified: profile?.verified ?? false,+ followerCount: profile?.followerCount ?? null,+ pnlUsd: hasLiveTrades ? pnl.realizedUsd : (entry.pnlUsd ?? null),+ volumeUsd: hasLiveTrades ? pnl.volumeUsd : null,+ winRate: hasLiveTrades ? pnl.winRate : (entry.winRate ?? null),+ trades: hasLiveTrades ? pnl.trades : null,+ pnlSource: hasLiveTrades ? 'onchain' : entry.pnlUsd != null ? entry.source || 'imported' : null,+ window,+ };+}++/**+ * @param {{ window?: '24h'|'7d'|'30d', limit?: number }} opts+ * @returns {Promise<Array>} rows sorted by pnlUsd desc (nulls last)+ */+export async function getKolTracker({ window = '7d', limit = 100 } = {}) {+ const wallets = await loadWallets();+ const top = wallets.slice(0, Math.max(1, Math.min(limit, wallets.length || limit)));+ const rows = await Promise.all(top.map((entry) => rowFor(entry, window)));+ rows.sort((a, b) => {+ if (a.pnlUsd == null && b.pnlUsd == null) return 0;+ if (a.pnlUsd == null) return 1;+ if (b.pnlUsd == null) return -1;+ return b.pnlUsd - a.pnlUsd;+ });+ return rows.slice(0, limit);+}diff --git a/src/kol/wallet-pnl.js b/src/kol/wallet-pnl.jsindex e55f404f6..71e1ee1c4 100644--- a/src/kol/wallet-pnl.js+++ b/src/kol/wallet-pnl.js@@ -31,7 +31,7 @@ function consumeFifo(lots, sellTokens, proceedsUsd) {* Pure FIFO P&L computation. Exported for unit testing.** @param {{ trades: Array, currentPrices?: Object, windowSecs?: number }} opts- * @returns {{ realizedUsd, unrealizedUsd, totalUsd, winRate, trades, openPositions }}+ * @returns {{ realizedUsd, unrealizedUsd, totalUsd, winRate, trades, volumeUsd, openPositions }}*/export function computeWalletPnl({ trades, currentPrices = {}, windowSecs = Infinity }) {const now = Date.now() / 1000;@@ -46,10 +46,12 @@ export function computeWalletPnl({ trades, currentPrices = {}, windowSecs = Infilet realizedUsd = 0;let closedTrades = 0;let winningTrades = 0;+ let volumeUsd = 0;for (const trade of sorted) {const { mint, type, tokenAmount, solAmount, usdPrice } = trade;const tradeUsd = solAmount * usdPrice;+ volumeUsd += tradeUsd;if (type === 'buy') {if (!lots[mint]) lots[mint] = [];@@ -87,6 +89,7 @@ export function computeWalletPnl({ trades, currentPrices = {}, windowSecs = InfitotalUsd: realizedUsd + unrealizedUsd,winRate,trades: sorted.length,+ volumeUsd,openPositions,};}diff --git a/src/kol/wallet-store.js b/src/kol/wallet-store.jsnew file mode 100644index 000000000..6e43bf814--- /dev/null+++ b/src/kol/wallet-store.js@@ -0,0 +1,53 @@+// Shared tracked-wallet loader — bundled seed file + R2 admin imports.+//+// Extracted from api/kol/[action].js so the tracker aggregator (src/kol/tracker.js)+// and the wallets/import-gmgn endpoints read the exact same merged list instead of+// two independently-maintained copies of this logic.++import { readFile } from 'node:fs/promises';+import path from 'node:path';+import { fileURLToPath } from 'node:url';+import { putObject, getObjectBuffer } from '../../api/_lib/r2.js';++const WALLETS_PATH = path.resolve(+ path.dirname(fileURLToPath(import.meta.url)),+ 'wallets.json',+);++// Imported wallets live in R2 — the Vercel filesystem is read-only at runtime,+// so writes to the bundled wallets.json can never persist (or even succeed).+export const WALLETS_R2_KEY = 'kol/wallets.json';++async function loadBundledWallets() {+ try {+ return JSON.parse(await readFile(WALLETS_PATH, 'utf8'));+ } catch {+ return [];+ }+}++async function loadImportedWallets() {+ try {+ const buf = await getObjectBuffer(WALLETS_R2_KEY);+ const parsed = JSON.parse(buf.toString('utf8'));+ return Array.isArray(parsed) ? parsed : [];+ } catch {+ return []; // nothing imported yet (or storage unreachable) — bundled list only+ }+}++// Merged view: R2-stored imports take precedence over the bundled seed file.+export async function loadWallets() {+ const [bundled, imported] = await Promise.all([loadBundledWallets(), loadImportedWallets()]);+ const byWallet = new Map(bundled.map((w) => [w.wallet, w]));+ for (const w of imported) byWallet.set(w.wallet, w);+ return [...byWallet.values()];+}++export async function saveImportedWallets(merged) {+ await putObject({+ key: WALLETS_R2_KEY,+ body: JSON.stringify(merged, null, '\t') + '\n',+ contentType: 'application/json',+ });+}diff --git a/src/kol/x-profile.js b/src/kol/x-profile.jsnew file mode 100644index 000000000..28b304fd4--- /dev/null+++ b/src/kol/x-profile.js@@ -0,0 +1,49 @@+// Cached X (Twitter) profile lookup for the KOL tracker — follower count + avatar+// only. Uses the same twitter-api-v2 app-only bearer client as api/seed/x.js.+//+// Honest degradation: when TWITTER_BEARER_TOKEN is unset, or the lookup fails+// (rate limit, unknown handle), resolves to null. The tracker renders a wallet+// row with no follower count rather than a fabricated one.+//+// Cached for 15 minutes per handle — the free X API tier's rate limit is tight+// (75 user lookups / 15 min) and follower counts don't move fast enough to need+// fresher reads than that.++import { cacheGet, cacheSet } from '../../api/_lib/cache.js';++const CACHE_TTL_S = 900;+const HANDLE_RE = /^[A-Za-z0-9_]{1,15}$/;++export async function fetchXProfile(handle) {+ const clean = String(handle || '').replace(/^@/, '');+ if (!HANDLE_RE.test(clean)) return null;++ const cacheKey = `kol:xprofile:${clean.toLowerCase()}`;+ const cached = await cacheGet(cacheKey).catch(() => null);+ if (cached) return cached;++ const bearer = process.env.TWITTER_BEARER_TOKEN;+ if (!bearer) return null;++ try {+ const { TwitterApi } = await import('twitter-api-v2');+ const client = new TwitterApi(bearer).readOnly;+ const res = await client.v2.userByUsername(clean, {+ 'user.fields': ['public_metrics', 'profile_image_url', 'verified'],+ });+ const user = res?.data;+ if (!user) return null;+ const profile = {+ handle: user.username,+ name: user.name || null,+ avatarUrl: user.profile_image_url || null,+ verified: !!user.verified,+ followerCount: user.public_metrics?.followers_count ?? null,+ };+ await cacheSet(cacheKey, profile, CACHE_TTL_S).catch(() => {});+ return profile;+ } catch (err) {+ console.warn(`[kol/x-profile] lookup failed for @${clean}: ${err?.message || err}`);+ return null;+ }+}diff --git a/vercel.json b/vercel.jsonindex cc93fdd9b..f429f61a1 100644--- a/vercel.json+++ b/vercel.json@@ -5266,6 +5266,10 @@"path": "/api/cron/gmgn-seed","schedule": "0 3 * * *"},+ {+ "path": "/api/cron/kol-tracker-refresh",+ "schedule": "*/10 * * * *"+ },{"path": "/api/cron/quota-check","schedule": "0 * * * *"