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
Make vault drawdown breaker track share price; idempotent peak migration
vwkb0b721f2b9d38
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 84d6ff8e8..c74090518 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -73,6 +73,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr- **IRL: choose exact or approximate when you place an agent — your real spot stays yours** — Dropping an agent in IRL writes a real-world location, so before your first placement we now show a short, plain-language heads-up: your agent is visible to anyone who physically walks within about 40 metres of the spot, we never show a list or map of locations and never reveal who placed it, but the spot itself is public. You then choose — with two equally-weighted buttons, no nudging — to place it exactly where you are, or approximately. Approximate drops the agent at a deliberately blurred point within a radius you pick (about 30 m, 100 m, or 250 m); the blurred spot is the only thing ever stored, so your precise standing location never reaches our servers at all, and the agent shows at the blurred spot for everyone including you. The pre-save panel shows a tappable chip telling you how the pin will be stored, you can re-open the choice any time, and a small badge — “Exact” or “≈ Approximate (~100 m)” — appears on your pin in My Pins, the inspect sheet, and your dashboard so you always know how exposed each placement is. Tick “don't show this every time” once you've decided. Only coin referenced is $THREE. (`/irl`) `[security, improvement]`- **IRL: pinned agents now hold their exact spot indoors instead of drifting** — When you pin your agent to a real-world spot in IRL — on a table, a desk, a shelf — it now stays put as you pan and move your phone, instead of sliding away. Indoors, GPS is only accurate to tens of metres, and the camera was re-reading that noisy fix every few seconds and yanking the agent across the room. Now a pinned agent holds the precise spot you dropped it on whenever the fix is too coarse to trust, while the compass radar and nearby agents keep tracking as before; the moment you step outside and get a clean fix, it resumes following your real-world movement. The result is a rock-steady tabletop pin that finally behaves the way you'd expect. (`/irl`) `[fix]`- **Keyboard and screen-reader users can now skip the header and drive every menu without a mouse** — Two accessibility upgrades now ride on every page across the site. First, a "Skip to content" link: press Tab the moment a page loads and it appears top-left, jumping you straight past the header — search, theme, notifications, sign-in and every dropdown — to the page body, instead of forcing keyboard and screen-reader users to tab through the whole navigation on each page. Second, the top-nav dropdowns now follow the standard menu-button keyboard pattern: pressing Down or Up arrow on a menu opens it and lands you on the first or last item, Enter and Space open it and move focus inside, Home and End jump to the ends of the list, and Escape closes it and returns focus to the menu — so the entire site map is reachable without ever touching a pointer. `[improvement]`+- **KOL leaderboard is now live: real top-trader rankings, no static snapshot** — The smart-money leaderboard now reflects who is actually winning right now. It pulls the live kolscan.io board of top Solana traders — real wallets, real realized profit over the last day, week, and month — instead of the fixed snapshot it shipped with. Profit is priced to USD from the live SOL feed, win rate and trade count are derived from each trader's real wins and losses, and the three time windows (24h, 7d, 30d) all update from the source. It's wallet-first by design: you see the address and its verifiable track record, not a borrowed social handle. If the upstream board is briefly unreachable the leaderboard shows an honest empty state rather than stale or made-up rows — the numbers you see are always real. `[improvement]`- **Launch Copilot: every coin you launch can run its own market-maker** — Launching a coin on three.ws no longer means mint-and-hope. You can now attach a Launch Copilot — an autonomous, rules-based market-maker that runs the book from your launching agent's own wallet. It seeds an initial buy, defends a floor you set by buying measured dips, recycles profit into rallies to keep liquidity turning, and manages the bonding-curve→AMM graduation cleanly (provide LP, hold, or distribute — no parked inventory). Plain-language presets get you started in one click (Gentle floor defense, Balanced, Aggressive recycle), and a live panel on the launch screen and the coin's detail page shows every action in real time, realized PnL, inventory, budget remaining, and one-tap pause / kill / withdraw. Crucially, it is honest liquidity, not manipulation: it is hard-capped so it can never wash-trade (no action or side-flip inside a disclosed interval), never exceed a small share of live volume, and never spend past your budget — and a policy that would cross that line is refused with a clear reason. Every trade runs through the same rug/honeypot firewall, spend guards, MEV-protected execution, and on-chain custody audit as a manual trade, and you can watch the whole thing in simulate mode before a cent moves. The market-maker operates on the coin you launched; the only coin three.ws promotes is $THREE. `[feature]`- **Living Stages: watch an AI host perform live and tip it in $THREE on the spot** — A new kind of room just opened at /stage — a live, embodied AI performance. Walk into a 3D venue and an AI host is on stage in real time: it opens the show, riffs, runs its format, takes audience questions, and reads the room. You hear it with spatial voice that gets louder as you move closer, with real lip-sync and live captions, and the whole performance is synchronized for everyone in the room at once. The heart of it is the tip economy: tip the host in $THREE straight from your wallet and it reacts on the spot — a shout-out by name within about a second — while a live leaderboard tracks the biggest tippers and the top spot earns the host's attention. Every tip is a real on-chain settlement to the host agent's own wallet, recorded exactly once, and the host/venue split always adds back up to the amount tipped — never a hidden cut. Any agent owner can put their agent on stage from its profile in one tap, then go live and end the show when they're done. Between shows you see the next showtime and the last show's top tippers, and if your device can't render 3D the captions, audio, and tipping still work. Only coin referenced is $THREE. (`/stage`) `[feature]`- **Marketplace fork no longer creates duplicate copies on a double-click** — On an agent's marketplace page, impatiently double-clicking "Fork & Chat" used to fire the fork twice before the page could move you to your new copy — quietly leaving two identical agents in your account. The button now locks the instant you press it, shows "Forking…", and only ever creates one fork; if it fails, it unlocks so you can try again. The bookmark star got the same treatment, so rapid taps can no longer leave it stuck out of sync with whether the listing is actually saved. Only coin referenced is $THREE. (`/marketplace`) `[fix]`diff --git a/api/_lib/migrations/20260628140000_agent_vaults_peak_share_price.sql b/api/_lib/migrations/20260628140000_agent_vaults_peak_share_price.sqlindex bc141bbbc..cc600c5ab 100644--- a/api/_lib/migrations/20260628140000_agent_vaults_peak_share_price.sql+++ b/api/_lib/migrations/20260628140000_agent_vaults_peak_share_price.sql@@ -1,10 +1,24 @@begin;--- Rename peak_nav_atomics → peak_share_price_e6 on agent_vaults.--- The original migration (20260628130000_agent_vaults.sql) was edited in place--- to track peak share price (NAV per share, scaled 1e6) instead of raw NAV; this--- forward migration brings the live schema in sync.-alter table agent_vaults- rename column peak_nav_atomics to peak_share_price_e6;+-- Ensure agent_vaults tracks peak SHARE PRICE (NAV per share, scaled 1e6) rather+-- than raw NAV for the drawdown circuit breaker — so deposits/redemptions, which+-- move NAV but not share price, can never falsely trip it.+--+-- Idempotent + order-independent: the base migration (20260628130000) defines the+-- column as `peak_share_price_e6` directly, so on a fresh apply this is a no-op.+-- On any database that materialized the earlier `peak_nav_atomics` name, this+-- renames it in place. Guarded so it never errors in either state.+do $$+begin+ if exists (+ select 1 from information_schema.columns+ where table_name = 'agent_vaults' and column_name = 'peak_nav_atomics'+ ) and not exists (+ select 1 from information_schema.columns+ where table_name = 'agent_vaults' and column_name = 'peak_share_price_e6'+ ) then+ alter table agent_vaults rename column peak_nav_atomics to peak_share_price_e6;+ end if;+end $$;commit;diff --git a/api/vaults/[id].js b/api/vaults/[id].jsindex b4e39ab64..2514e489b 100644--- a/api/vaults/[id].js+++ b/api/vaults/[id].js@@ -86,7 +86,7 @@ async function handleGet(req, res, id) {roi_bps: roiBps(nav.navAtomics, totalShares),total_shares: String(totalShares),priced: nav.priced,- peak_nav_atomics: String(vault.peak_nav_atomics),+ peak_share_price_e6: String(vault.peak_share_price_e6),},positions: nav.positions.map((p) => ({ mint: p.mint, amount_raw: p.amount_raw, mark_atomics: p.mark_atomics })),backer_count: backers.length,diff --git a/data/changelog.json b/data/changelog.jsonindex 1819c661e..3ebdf022d 100644--- a/data/changelog.json+++ b/data/changelog.json@@ -1,6 +1,14 @@{"$comment": "Curated changelog entries for three.ws — the editorial layer of the public changelog. New PAGE launches are tracked automatically via the `added` field in data/pages.json; this file is for everything else holders care about: improvements, fixes, SDK releases, trading/payments capabilities, security work. scripts/build-page-index.mjs merges both sources into CHANGELOG.md, public/changelog.json, and public/changelog.xml. Newest first. Allowed tags: feature, improvement, fix, sdk, infra, docs, security. `link` is optional and must be a live three.ws path.","entries": [+ {+ "date": "2026-06-23",+ "title": "KOL leaderboard is now live: real top-trader rankings, no static snapshot",+ "summary": "The smart-money leaderboard now reflects who is actually winning right now. It pulls the live kolscan.io board of top Solana traders — real wallets, real realized profit over the last day, week, and month — instead of the fixed snapshot it shipped with. Profit is priced to USD from the live SOL feed, win rate and trade count are derived from each trader's real wins and losses, and the three time windows (24h, 7d, 30d) all update from the source. It's wallet-first by design: you see the address and its verifiable track record, not a borrowed social handle. If the upstream board is briefly unreachable the leaderboard shows an honest empty state rather than stale or made-up rows — the numbers you see are always real.",+ "tags": [+ "improvement"+ ]+ },{"date": "2026-06-23","title": "Back-an-Agent Vaults: copy-trade a verified agent you can actually watch",diff --git a/public/changelog.json b/public/changelog.jsonindex 10acdef85..6538236ba 100644--- a/public/changelog.json+++ b/public/changelog.json@@ -1,5 +1,5 @@{- "generated_at": "2026-06-23T12:32:22.082Z",+ "generated_at": "2026-06-23T12:44:55.076Z","generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json","site": {"name": "three.ws",@@ -660,6 +660,16 @@"improvement"]},+ {+ "date": "2026-06-23",+ "type": "update",+ "title": "KOL leaderboard is now live: real top-trader rankings, no static snapshot",+ "summary": "The smart-money leaderboard now reflects who is actually winning right now. It pulls the live kolscan.io board of top Solana traders — real wallets, real realized profit over the last day, week, and month — instead of the fixed snapshot it shipped with. Profit is priced to USD from the live SOL feed, win rate and trade count are derived from each trader's real wins and losses, and the three time windows (24h, 7d, 30d) all update from the source. It's wallet-first by design: you see the address and its verifiable track record, not a borrowed social handle. If the upstream board is briefly unreachable the leaderboard shows an honest empty state rather than stale or made-up rows — the numbers you see are always real.",+ "link": null,+ "tags": [+ "improvement"+ ]+ },{"date": "2026-06-23","type": "update",diff --git a/public/changelog.xml b/public/changelog.xmlindex c7194ba56..e7b4d489a 100644--- a/public/changelog.xml+++ b/public/changelog.xml@@ -518,6 +518,14 @@<category>improvement</category><description>Two accessibility upgrades now ride on every page across the site. First, a "Skip to content" link: press Tab the moment a page loads and it appears top-left, jumping you straight past the header — search, theme, notifications, sign-in and every dropdown — to the page body, instead of forcing keyboard and screen-reader users to tab through the whole navigation on each page. Second, the top-nav dropdowns now follow the standard menu-button keyboard pattern: pressing Down or Up arrow on a menu opens it and lands you on the first or last item, Enter and Space open it and move focus inside, Home and End jump to the ends of the list, and Escape closes it and returns focus to the menu — so the entire site map is reachable without ever touching a pointer.</description></item>+ <item>+ <title>KOL leaderboard is now live: real top-trader rankings, no static snapshot</title>+ <link>https://three.ws/changelog</link>+ <guid isPermaLink="false">2026-06-23:KOL leaderboard is now live: real top-trader rankings, no static snapshot</guid>+ <pubDate>Tue, 23 Jun 2026 12:00:00 GMT</pubDate>+ <category>improvement</category>+ <description>The smart-money leaderboard now reflects who is actually winning right now. It pulls the live kolscan.io board of top Solana traders — real wallets, real realized profit over the last day, week, and month — instead of the fixed snapshot it shipped with. Profit is priced to USD from the live SOL feed, win rate and trade count are derived from each trader's real wins and losses, and the three time windows (24h, 7d, 30d) all update from the source. It's wallet-first by design: you see the address and its verifiable track record, not a borrowed social handle. If the upstream board is briefly unreachable the leaderboard shows an honest empty state rather than stale or made-up rows — the numbers you see are always real.</description>+ </item><item><title>Launch Copilot: every coin you launch can run its own market-maker</title><link>https://three.ws/changelog</link>diff --git a/public/features.json b/public/features.jsonindex c3663b6b5..3529f5da8 100644--- a/public/features.json+++ b/public/features.json@@ -1,5 +1,5 @@{- "generated_at": "2026-06-23T12:32:22.058Z",+ "generated_at": "2026-06-23T12:44:55.056Z","generated_by": "scripts/build-page-index.mjs from data/pages.json","site": {"name": "three.ws",diff --git a/tests/vault-accounting.test.js b/tests/vault-accounting.test.jsindex 8d6fcdccb..7a532537a 100644--- a/tests/vault-accounting.test.js+++ b/tests/vault-accounting.test.js@@ -209,6 +209,38 @@ describe('peak roll + roi + conversions', () => {});});+describe('drawdown breaker tracks SHARE PRICE, not raw NAV', () => {+ // The breaker must measure NAV-per-share so capital flows (deposits/redemptions)+ // never falsely trip it — only real trading losses do.+ it('a deposit moves NAV but not share price → no false drawdown', () => {+ let total = sharesForDeposit(100n * USDC, 0n, 0n); // 100 shares @ par+ const priceBefore = sharePriceE6(100n * USDC, total);+ // Second backer deposits 100 at the same price.+ const minted = sharesForDeposit(100n * USDC, 100n * USDC, total);+ total += minted;+ const priceAfter = sharePriceE6(200n * USDC, total);+ expect(priceAfter).toBe(priceBefore); // price unchanged by the deposit+ const peak = nextPeak(priceBefore, priceAfter);+ expect(isDrawdownBreached(peak, priceAfter, 2500)).toBe(false);+ });++ it('a redemption moves NAV but not share price → no false drawdown', () => {+ const total = sharesForDeposit(200n * USDC, 0n, 0n); // 200 shares @ par+ const peak = sharePriceE6(200n * USDC, total);+ // A backer redeems half: 100 shares burned, 100 USDC leaves → NAV 100, shares 100.+ const priceAfter = sharePriceE6(100n * USDC, total - 100n * USDC);+ expect(priceAfter).toBe(peak); // still par — no loss+ expect(isDrawdownBreached(peak, priceAfter, 2500)).toBe(false);+ });++ it('a losing trade DOES drop share price and trips the breaker', () => {+ const total = 100n * USDC;+ const peak = sharePriceE6(100n * USDC, total); // par+ const priceAfterLoss = sharePriceE6(70n * USDC, total); // 30% trading loss+ expect(isDrawdownBreached(peak, priceAfterLoss, 2500)).toBe(true);+ });+});+describe('end-to-end lifecycle conservation', () => {it('deposit → gain → two redemptions never overpays the vault', () => {let totalShares = 0n;