Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
feat(trader): moon-bag exits are legible, and every arm banks initials at 2x
nirholasdbdcf737f821
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 814b9f6ec..5aa519289 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -38,7 +38,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr- **The trading fleet never sells 100% of a winner again** — New rule across every autonomous trading strategy: once a position has earned back what it cost, we never sell all of it. Any exit taken in profit now sells just enough to recover the original stake (or banks the gain down to a floor if the stake is already home) and keeps the rest, which then rides indefinitely. The logic is simple: after the cost is recovered the leftover position is free, so it is worth nothing at worst and has no ceiling at best. Selling that last slice to lock in a few thousandths of a SOL gives up every large outcome for a rounding error, and large outcomes are the entire reason to hold. Concretely: a position that ran to 1.4x and then hit its trailing stop used to be dumped completely for about +0.003 SOL; it now sells 71% to return the stake and keeps 29% riding at zero cost. Losses are unchanged and still exit completely, because nothing is free until the stake is back, and the hard stop-loss still overrides everything while real money is at risk. Held positions are booked as closed for accounting the moment the profit is banked, so they never occupy a slot that would stop a strategy from taking its next trade. Each strategy's held bags and their current value are now shown on the experiments board, tracked separately from realized profit since nothing counts as profit until it is sold. This also repairs the take-initials ladder, which could never actually fire: the exit settings lived on the strategy but were missing from the query the position loop reads, so every position silently fell back to selling everything no matter how it was configured. (`/sniper/experiments`) `[feature, fix]`- **The trading postmortem's findings are now enforced in code** — Our published audit of the fleet's first 90 real trades ended with a list of fixes, and four of them are now live code instead of intentions. First, the overconfidence ceiling: the audit showed AI judge verdicts at 0.7 confidence performed best while verdicts above 0.9 went winless, so each AI-judged strategy now carries a confidence ceiling next to its floor, and a screaming-confident verdict is recorded but never funded. Second, named-model integrity: during the audit most calls to the named models were actually answered by cheaper fallback models, muddying the model-vs-model comparison, so the Grok and Claude strategies are now strict and will pause rather than trade on a fallback's judgment. Third, the liquidity-decay exit: a coin nobody is trading at all now gets sold after five quiet minutes instead of squatting on a trading slot for the full half-hour timeout, and this only applies underwater, so quiet winners still ride. Fourth, and most important operationally: the audit found two of the fleet's learning loops had been silently dead for two days behind green health checks, so a new hourly watchdog now asks every learning loop when it last actually wrote a row, and pages us when any answer is too old. A loop that has never written a row counts as the worst finding, not a pass. (`/docs/trading-experiment`) `[improvement, fix, infra]`- **three.ws is an OpenAI Select Partner** — three.ws has been named an OpenAI Select Partner within the OpenAI Partner Network. A new page at /openai lays out everything the platform already ships on OpenAI surfaces: the free, keyless 3D Studio MCP connector for ChatGPT with nine tools (text to 3D, avatars, auto-rigging, conversational refinement, and a living agent body), the custom GPT Actions surface for plans without connectors, one-tap AR on iOS and Android, and Spatial MCP, the open CC0 shape for returning a live 3D scene as a tool result. The partner directory at /partners was also rewritten to list only the programs three.ws is actually enrolled in today, with NVIDIA correctly described as Inception membership. (`/openai`) `[feature, docs]`-- **Trader profiles now show the moon-bags** — A closed trade that kept a moon-bag no longer reads as a 100% sell. Trader pages and share cards now tag those exits (initials out, rest rides), show each bag's live value, and count total bags riding at zero cost basis in the headline metrics. (`/traders`) `[improvement]`+- **Trader profiles now show the moon-bags** — A closed trade that kept a moon-bag no longer reads as a 100% sell. Trader pages and share cards now tag those exits (initials out, rest rides), show each bag's live value, and count total bags riding at zero cost basis in the headline metrics. (`/leaderboard`) `[improvement]`- **Trading arms now earn their freedom from their own track record** — The autonomous trading fleet used to give every strategy the same leash: the same limits on how far its settings could move, the same short list of settings it could change, and the same information in front of it before each decision. A strategy that had been making money for weeks was kept in exactly the same box as one that had never had a winning day. Now each arm is graded on its own real, on-chain results and placed in one of four tiers. A profitable arm gets a wider range to work in, moves faster, unlocks settings a losing arm can't touch (which launches it hunts, how confident it needs to be before buying, and the take-initials exit that banks your stake at 2x and lets the rest ride), takes a bigger share of the fleet's fixed daily budget, and is shown far more evidence before it decides: how often launches actually succeed, which signals genuinely predict a winner, its own trading history, and how well its own past calls turned out. A bleeding arm is held tighter instead. Grading is on realized profit rather than win rate, so an arm that wins only a third of its trades but makes real money is rewarded, while one that wins most of its trades and still loses money is not. Every tier is re-earned continuously, so an arm that stops paying loses the extra rope automatically. None of it can touch the safety limits: the trade firewall, the daily loss cap, position limits, and a hard stop-loss apply at every tier, no matter how well an arm is doing. Each arm's tier and the evidence behind it are visible on the experiments board. (`/sniper/experiments`) `[feature, improvement]`- **Trading fleet: initial buy-in comes off the table at 2x, the rest rides** — Every autonomous trading arm now banks its initial stake the first time a position doubles: it sells exactly enough to recover the buy-in and lets the remaining tokens ride behind the trailing stop. Combined with the moon-bag rule from earlier today, no arm ever sells 100% of a winner, and once a coin hits 2x the position is playing with house money. Arms the performance optimizer already tunes keep their earned settings. (`/sniper/experiments`) `[improvement]`- **Turned-away selfies no longer guess at the shape of your head** — When an avatar is built from a single photo, the half of your face pointing away from the camera is not in the picture at all. Up to now the shape step treated its estimate of that hidden half as though it were measured, so a photo taken at a steep angle could push made-up structure into the skull. The engine now checks how far the head is turned before reshaping anything. Past about a third of a turn it keeps the photo's colour and detail but leaves the head shape alone, which is the honest answer when the information simply is not there. The limit sits far away from ordinary selfies: across a forty-face test set of front-facing photos, the most turned one measured under three degrees against a threshold of thirty-five, so normal photos are unaffected. This came out of deliberately testing the engine on things that are not the user's face, including pets, statues, shop mannequins, carnival masks, faces on posters and phone screens, group shots and badly blurred or backlit photos. That testing produced a reassuring result worth stating plainly: none of them could push the avatar outside the range of head shapes real faces produce, because several safeguards already compound to keep any result on a plausible human head. (`/create/selfie`) `[improvement]`diff --git a/api/_lib/trader-stats.js b/api/_lib/trader-stats.jsindex 9072d381e..855b8d9cc 100644--- a/api/_lib/trader-stats.js+++ b/api/_lib/trader-stats.js@@ -385,6 +385,14 @@ export function computeTraderMetrics(positions, { solUsd = null, selfDealMints =unique_coins: coins.size,churn_pct: Number(churnPct.toFixed(2)),+ // Moon-bag policy in numbers: closed rows where the initials came out but+ // tokens still ride. "Closed" here means the stake is recovered, not that+ // the trader sold 100% — these two fields are what makes that legible.+ moonbags_held: closed.filter((p) => Number(p.moonbag_base_amount || 0) > 0).length,+ moonbag_value_sol: Number((closed.reduce(+ (a, p) => a + (Number(p.moonbag_base_amount || 0) > 0 ? big(p.moonbag_last_value_lamports || 0) : 0), 0,+ ) / LAMPORTS_PER_SOL).toFixed(6)),+// What they made it on — the single top-earning coin plus a short breakdown,// each number traceable to the closed positions above. `top_coin` is null// only when the trader has no closed positions with a mint in this window.@@ -475,7 +483,8 @@ export async function fetchTraderPositions({ agentId, network, window = 'all', nselect p.id, p.agent_id, p.wallet, p.mint, p.symbol, p.name, p.status, p.exit_reason,p.entry_quote_lamports, p.exit_quote_lamports, p.last_value_lamports, p.peak_value_lamports,p.realized_pnl_lamports, p.realized_pnl_pct, p.buy_sig, p.sell_sig,- p.opened_at, p.closed_at+ p.opened_at, p.closed_at,+ p.moonbag_base_amount, p.moonbag_last_value_lamports, p.initials_recoveredfrom agent_sniper_positions pwhere p.agent_id = ${agentId} and p.network = ${network}and (p.status in ('open','opening','closing') or p.closed_at >= ${start})@@ -485,7 +494,8 @@ export async function fetchTraderPositions({ agentId, network, window = 'all', nselect p.id, p.agent_id, p.wallet, p.mint, p.symbol, p.name, p.status, p.exit_reason,p.entry_quote_lamports, p.exit_quote_lamports, p.last_value_lamports, p.peak_value_lamports,p.realized_pnl_lamports, p.realized_pnl_pct, p.buy_sig, p.sell_sig,- p.opened_at, p.closed_at+ p.opened_at, p.closed_at,+ p.moonbag_base_amount, p.moonbag_last_value_lamports, p.initials_recoveredfrom agent_sniper_positions pwhere p.agent_id = ${agentId} and p.network = ${network}order by coalesce(p.closed_at, p.opened_at) desc@@ -556,6 +566,11 @@ async function copierCountForAgent(agentId, network) {/** Shape a closed position for the profile history + Proof tab (every number → tx). */export function shapeClosed(p, network) {+ // A closed row with a moon-bag is NOT a 100% sell: the initials came out and+ // the remaining tokens still ride (owner policy: sell the buy-in at 2x, hold+ // the rest even to zero). Surface that or the track record misreads as+ // full exits.+ const moonbagTokens = p.moonbag_base_amount != null ? Number(p.moonbag_base_amount) : 0;return {id: p.id,mint: p.mint,@@ -570,6 +585,10 @@ export function shapeClosed(p, network) {closed_at: p.closed_at,buy_url: solscanUrl(p.buy_sig, network),sell_url: solscanUrl(p.sell_sig, network),+ moonbag_held: moonbagTokens > 0,+ moonbag_value_sol: moonbagTokens > 0 && p.moonbag_last_value_lamports != null+ ? big(p.moonbag_last_value_lamports) / LAMPORTS_PER_SOL+ : null,};}@@ -842,6 +861,7 @@ export async function getLeaderboard({p.entry_quote_lamports, p.exit_quote_lamports, p.last_value_lamports, p.peak_value_lamports,p.realized_pnl_lamports, p.realized_pnl_pct, p.buy_sig, p.sell_sig,p.opened_at, p.closed_at,+ p.moonbag_base_amount, p.moonbag_last_value_lamports, p.initials_recovered,a.user_id as agent_user_id, a.name as agent_name, a.avatar_url as agent_avatar, a.profile_image_url as agent_imagefrom agent_sniper_positions pjoin agent_identities a on a.id = p.agent_id@@ -853,6 +873,7 @@ export async function getLeaderboard({p.entry_quote_lamports, p.exit_quote_lamports, p.last_value_lamports, p.peak_value_lamports,p.realized_pnl_lamports, p.realized_pnl_pct, p.buy_sig, p.sell_sig,p.opened_at, p.closed_at,+ p.moonbag_base_amount, p.moonbag_last_value_lamports, p.initials_recovered,a.user_id as agent_user_id, a.name as agent_name, a.avatar_url as agent_avatar, a.profile_image_url as agent_imagefrom agent_sniper_positions pjoin agent_identities a on a.id = p.agent_iddiff --git a/data/changelog.json b/data/changelog.jsonindex 79ae4aa6b..e4a42b193 100644--- a/data/changelog.json+++ b/data/changelog.json@@ -15953,7 +15953,7 @@"tags": ["improvement"],- "link": "/traders"+ "link": "/leaderboard"},{"date": "2026-07-25",diff --git a/public/changelog.json b/public/changelog.jsonindex 38de2ac4c..8578e55bb 100644--- a/public/changelog.json+++ b/public/changelog.json@@ -1,5 +1,5 @@{- "generated_at": "2026-07-25T13:34:08.886Z",+ "generated_at": "2026-07-25T13:34:30.906Z","generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json","site": {"name": "three.ws",@@ -357,7 +357,7 @@"type": "update","title": "Trader profiles now show the moon-bags","summary": "A closed trade that kept a moon-bag no longer reads as a 100% sell. Trader pages and share cards now tag those exits (initials out, rest rides), show each bag's live value, and count total bags riding at zero cost basis in the headline metrics.",- "link": "/traders",+ "link": "/leaderboard","tags": ["improvement"]diff --git a/public/changelog.xml b/public/changelog.xmlindex 0d9910962..be72b3854 100644--- a/public/changelog.xml+++ b/public/changelog.xml@@ -264,7 +264,7 @@</item><item><title>Trader profiles now show the moon-bags</title>- <link>https://three.ws/traders</link>+ <link>https://three.ws/leaderboard</link><guid isPermaLink="false">2026-07-25:Trader profiles now show the moon-bags</guid><pubDate>Sat, 25 Jul 2026 12:00:00 GMT</pubDate><category>improvement</category>diff --git a/scripts/seed-sniper-experiments.mjs b/scripts/seed-sniper-experiments.mjsindex cf87192c5..011493cdc 100644--- a/scripts/seed-sniper-experiments.mjs+++ b/scripts/seed-sniper-experiments.mjs@@ -180,7 +180,9 @@ const BOOST_ARM = {trailing_stop_pct: 8,take_profit_pct: 20,max_hold_seconds: 240,- initials_out_multiple: null, // ladder off — a 4-minute ride full-exits+ // Owner directive 2026-07-25: EVERY arm sells its initial buy-in at 2x+ // and rides the rest. Even a 4-minute boost ride keeps the moon-bag.+ initials_out_multiple: 2,auto_fund_enabled: true,},};@@ -222,7 +224,7 @@ const KIMI_ARM = {trailing_stop_pct: 20,take_profit_pct: 60,max_hold_seconds: 1800,- initials_out_multiple: null,+ initials_out_multiple: 2, // owner directive: initials out at 2x, ride the restauto_fund_enabled: true,},};diff --git a/src/trader.css b/src/trader.cssindex de8cf54ca..e4b950339 100644--- a/src/trader.css+++ b/src/trader.css@@ -164,6 +164,7 @@.tp-tag { display: inline-block; margin-left: var(--space-2xs); font-size: var(--text-2xs); padding: 1px var(--space-2xs); border-radius: var(--radius-pill); border: 1px solid var(--stroke); white-space: nowrap; vertical-align: middle; }.tp-tag-snipe { color: var(--wallet-accent-strong, #a78bfa); border-color: color-mix(in srgb, var(--wallet-accent-strong, #a78bfa) 45%, transparent); background: color-mix(in srgb, var(--wallet-accent-strong, #a78bfa) 12%, transparent); }.tp-tag-self { color: var(--warn, #fbbf24); border-color: color-mix(in srgb, var(--warn, #fbbf24) 45%, transparent); background: color-mix(in srgb, var(--warn, #fbbf24) 12%, transparent); }+.tp-tag-moonbag { color: var(--pos, #4ade80); border-color: color-mix(in srgb, var(--pos, #4ade80) 45%, transparent); background: color-mix(in srgb, var(--pos, #4ade80) 12%, transparent); }.tp-row-muted td { opacity: 0.62; }.tp-row-muted:hover td { opacity: 0.85; }.tp-proof-link { color: var(--ink-dim); text-decoration: none; font-size: var(--text-2xs); border-bottom: 1px dotted var(--stroke-strong); white-space: nowrap; }diff --git a/src/trader.js b/src/trader.jsindex 6a08dbcb8..3bd28edfe 100644--- a/src/trader.js+++ b/src/trader.js@@ -129,6 +129,7 @@ function metricsGrid(m) {${metric('Coins traded', String(m.unique_coins), `${m.closed_count} closed trades`)}${snipe}${metric('Open exposure', m.open_count ? fmtSol(m.open_exposure_sol, { sign: false }) : '<span class="lb-muted">none</span>', m.open_count ? `${m.open_count} open · ${unreal}` : 'flat')}+ ${m.moonbags_held > 0 ? metric('Moon-bags riding', String(m.moonbags_held), `~${fmtSol(m.moonbag_value_sol, { sign: false })} at zero cost basis`) : ''}`;}@@ -266,11 +267,14 @@ function closedRows(closed) {t.self_dealing? '<span class="tp-tag tp-tag-self" title="Trade on a coin this account launched — excluded from the credited score">self-deal</span>': '',+ t.moonbag_held+ ? `<span class="tp-tag tp-tag-moonbag" title="Not a full exit: the initial buy-in was sold and ${t.moonbag_value_sol != null ? `~${fmtSol(t.moonbag_value_sol, { sign: false })} of` : ''} tokens still ride at zero cost basis">moon-bag held</span>`+ : '',].filter(Boolean).join('');return `<tr${t.self_dealing ? ' class="tp-row-muted"' : ''}><td><div class="tp-coin"><span class="tp-coin-sym">${escapeHtml(t.symbol || t.name || '—')}</span><span class="tp-coin-mint">${escapeHtml(shortAddr(t.mint, 4, 4))}</span>${tags}</div></td><td>${pnl}<div class="tp-metric-sub">${pct}</div></td>- <td><span class="tp-reason">${escapeHtml(t.exit_reason || '—')}</span></td>+ <td><span class="tp-reason">${escapeHtml(t.exit_reason || '—')}</span>${t.moonbag_held ? '<div class="tp-metric-sub">initials out, rest rides</div>' : ''}</td><td>${held}</td><td>${relTime(t.closed_at)}</td><td>${proof || '—'}</td>@@ -549,6 +553,9 @@ function downloadCard() {['ROI', fmtPct(m.roi_pct, { sign: true })],['TRADES', String(m.closed_count)],];+ // The moon-bag stat is the policy statement: sells recover the buy-in, the+ // rest rides. Only shown once at least one bag is actually held.+ if (m.moonbags_held > 0) stats.push(['MOON-BAGS', String(m.moonbags_held)]);const sx = 64, sy = 470, sw = (W - 128) / stats.length;stats.forEach(([label, val], i) => {const x = sx + i * sw;diff --git a/tests/trader-stats.test.js b/tests/trader-stats.test.jsindex fb3d13637..5227413ce 100644--- a/tests/trader-stats.test.js+++ b/tests/trader-stats.test.js@@ -354,3 +354,38 @@ describe('windowStartIso', () => {expect([...WINDOWS].sort()).toEqual(['24h', '30d', '7d', 'all']);});});++describe('moon-bag legibility (a closed row with a bag is NOT a 100% sell)', () => {+ const SOLL = 1e9;+ const bagged = {+ status: 'closed', mint: 'MOON', symbol: 'M', realized_pnl_lamports: String(1 * SOLL),+ realized_pnl_pct: 125, entry_quote_lamports: String(1 * SOLL), exit_quote_lamports: String(2 * SOLL),+ opened_at: '2026-01-02T00:00:00.000Z', closed_at: '2026-01-02T00:10:00.000Z', buy_sig: 'b9', sell_sig: 's9',+ moonbag_base_amount: '10224801450', moonbag_last_value_lamports: String(0.25 * SOLL), initials_recovered: true,+ };++ it('shapeClosed carries the held bag and its live value', async () => {+ const { shapeClosed } = await import('../api/_lib/trader-stats.js');+ const row = shapeClosed(bagged, 'mainnet');+ expect(row.moonbag_held).toBe(true);+ expect(row.moonbag_value_sol).toBeCloseTo(0.25);+ });++ it('shapeClosed reports no bag for a genuine full exit (and legacy rows)', async () => {+ const { shapeClosed } = await import('../api/_lib/trader-stats.js');+ expect(shapeClosed({ ...bagged, moonbag_base_amount: '0' }, 'mainnet').moonbag_held).toBe(false);+ expect(shapeClosed({ ...bagged, moonbag_base_amount: null, moonbag_last_value_lamports: null }, 'mainnet').moonbag_held).toBe(false);+ });++ it('metrics count bags held and sum their riding value', () => {+ const m = computeTraderMetrics([...FIXTURE, bagged], { solUsd: 200 });+ expect(m.moonbags_held).toBe(1);+ expect(m.moonbag_value_sol).toBeCloseTo(0.25);+ });++ it('a book with no bags reports zero, not null', () => {+ const m = computeTraderMetrics(FIXTURE, { solUsd: 200 });+ expect(m.moonbags_held).toBe(0);+ expect(m.moonbag_value_sol).toBe(0);+ });+});