Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

Add risk acknowledgment flow, secret scrubbing, token drift audit; refresh pages and generated artifacts

nirholas66057a9e1a67
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 12a6a962b..eb38f7f28 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr
- **Docs · Competitive & Pooled Trading** (`/docs/trading-arenas`) — Arena tournaments with on-chain $THREE payouts, the 3D Sniper Arena, the Live Trading Theater and its one-click mirror, backable Vaults, and consensus-driven Trading Swarms.
- **Docs · Custody You Can Verify** (`/docs/custody`) — Spend limits, the freeze switch, Merkle proof-of-custody with in-browser verification, and social recovery & inheritance for agent wallets.
- **Docs · The Trading Surfaces** (`/docs/trading-surfaces`) — The five-page solo trading stack — Coin Radar, Coin Intelligence, Live Trade Feed, Watchlist, and the Mission Control cockpit — where the numbers come from and how the surfaces chain together.
+- **Risk Disclosure** (`/legal/risk`) — Risk disclosure for real-funds features: experimental software, total-loss risk, autonomous agents, no liability.
- **Agents in the ring — platform agents now buy and sell services from each other** — The closed-loop x402 economy is no longer a scheduler paying itself: real platform agents with their own custodial wallets now do the buying. An endpoint-shopper hunts intel and health checks, an Agora citizen tips dancers and pays club cover after finishing work, and a curator buys marketplace listings and billboard slots — each purchase signed by the agent's own key, checked against its personal spend limits, logged to its custody trail, and attributed by agent in the activity feed. The treasury keeps every agent's small USDC float topped up between a floor and a ceiling and sweeps back the overflow, so the money still never leaves platform-controlled wallets. On a slower cadence the agents also touch the chain itself, emitting real on-chain agent-invocation events — visible, verifiable activity, not simulated volume. (`/docs/x402-ring-economy`) `[feature]`
- **Agents no longer buy pump.fun mayhem-mode coins** — Autonomous agent strategies and discretionary agent trades now refuse to buy pump.fun mayhem-mode coins — the high-volatility variant — and trade only regular coins. The check reads the mayhem flag straight off the on-chain bonding curve before any spend, so it can't be spoofed, and it's buy-only: an agent that already holds a mayhem coin can always sell to exit. Blocked buys show up as a clean skip in the activity feed, not an error. `[improvement]`
- **Autonomous trader safety gates now fail closed — no more buying what it can't verify** — We hardened the autonomous pump.fun trader so it refuses any coin it cannot prove is safe and in-band, instead of buying through the doubt. Three real holes are closed: (1) the $10k–$100k market-cap rule is now enforced at the single shared buy checkpoint, so every trigger path obeys it — previously some paths (and a mis-named field on one of them) skipped the ceiling entirely; (2) the rug/honeypot firewall now blocks a buy when the sell-back simulation couldn't run or the token's mint authority is still active (dev can print unlimited supply) — these were treated as soft warnings and bought anyway; (3) the Mayhem-token exclusion and the serial-launcher check now skip when the data can't be read, rather than assuming safe. Net effect: the bot buys fewer coins, but only ones it can actually verify are in the band and sellable. Every change is covered by tests. `[fix, security]`
@@ -19,14 +20,17 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr
- **Every paid endpoint now settles — full x402 catalog coverage** — The x402 ring economy now exercises every paid endpoint on the platform, not just a handful. A single canonical catalog covers all 46 paid endpoints — tips, services, market intel, health checks and settlements — each with the exact request it needs to actually go through, read straight from the endpoint that handles it. The autonomous rotation is wired to this catalog and weighted so every safe-to-buy endpoint is paid at least once an hour, with the ones that shouldn't be bought on a loop (real coin mints, AI calls, third-party payouts) held out and verified separately. Several endpoints that would have silently rejected or mis-charged a real payment were fixed at the root: three were reading the request the wrong way and failing every paid call, and the old rotation was calling tip and cosmetic endpoints with the wrong method entirely. The result is continuous, provable coverage — a new paid endpoint now fails the test suite until it's in the catalog. `[feature, improvement]`
- **Every platform wallet is now watched for leaks — and arming a sniper no longer moves money** — Two safety upgrades to how the platform handles money. First, a new on-chain leak scanner watches every wallet the platform controls — the funding masters, all treasuries, the x402 ring wallets — not just a subset, and pages ops within minutes if a single lamport or token ever leaves one of them to an address outside the controlled set. Second, we closed an implicit-funding footgun: previously, simply arming an autonomous trading strategy could cause a master wallet to start pushing real SOL to that agent on a schedule. Now that only happens if the strategy explicitly opts in, and it is off by default, so arming a strategy never moves money on its own. `[security, infra]`
- **Every ring settlement is now proven on-chain — reconciliation blind spot closed** — The closed-loop agent economy settles real USDC through the platform's own facilitator, and until now those settlements were trusted but never verified against the blockchain. A new reconciler runs every 30 minutes and holds the ring to the same standard the funding wallet already meets: every recorded settlement and every treasury→payer sweep from the last 72 hours is checked to exist and succeed on-chain, a sample of each is parsed to prove the exact dollar amount and recipient match the books, and the two internal ledgers are cross-checked so a settlement with no matching spend record — the tell-tale sign of value leaking through our own facilitator — is caught. It also runs a silence alarm: if the ring is switched on but goes quiet for 30 minutes, operators are paged, closing the gap where 'it was working, then it wasn't' used to pass unnoticed. Any missing, failed, or mismatched settlement raises an immediate alert; every finding lands on the finance-integrity board, tagged so ring issues stand apart from the rest. `[security, infra]`
+- **Fixed a Jito tip mis-route that could waste a slice of every batch of trades** — When our trading agents send transactions through Jito for MEV protection, they attach a tip to one of Jito's eight published tip accounts. Three of our code paths had a mistyped address in that list — so roughly one in eight of the affected trades paid its tip to a dead address instead of Jito, losing that tip and getting no MEV protection or priority for that transaction. We verified the correct eight addresses against Jito's own live endpoint, corrected all three, and added a test that checks every tip-account list in the codebase against the canonical set so a typo can never slip in again. No user action needed; trades now land protected as intended. `[fix]`
- **Fleet Command — run your whole swarm of trading agents from one deck** — Tuning one sniper bot is easy; commanding thirty of them was not. The new Fleet Command page puts every autonomous agent on a single mission-control deck: pooled wallet balance across the fleet, how many are armed, low-balance warnings, live open positions, and combined realized P&L and win rate at the top. Below that, a sortable, searchable roster — one row per agent with its status, wallet, open/closed trades, win rate and P&L — plus multi-select. Act on the whole fleet at once: Arm all, Disarm all, or one red Emergency Stop that trips every kill switch, each behind a confirmation and reporting honest results ("Armed 30/33 · 3 failed"). A live trade feed streams every buy and sell across the swarm as it happens. (`/dashboard/fleet`) `[feature]`
- **Full audit trail + breach monitoring on the economy's funding wallet** — The master wallet that fuels the platform's autonomous economy now keeps a tamper-evident accounting book of every move it makes. Each SOL transfer is recorded with the engine it funded, the amount, the on-chain signature, the running balance, and the US-dollar value at the moment of the transfer — cryptographically hash-chained so no past entry can be altered or deleted without detection. A monitor runs every 30 minutes and checks three things: that the book hasn't been tampered with, that every transfer we recorded really happened on-chain, and — most importantly — that no SOL ever left the wallet without a matching record, which is the tell-tale sign of a stolen key. Anything off raises an immediate operator alert and lands on the finance-integrity board. There's also a one-command accounting export (CSV or JSON, with running balance and dollar totals) for bookkeeping and review. `[security, infra, docs]`
+- **Leaderboard rows now show each trader's P&L trend at a glance** — Two traders can post the same realized P&L and have gotten there completely differently — one grinding steadily up, the other spiking once and giving it back. The Trader Leaderboard now draws a tiny cumulative-P&L sparkline on every row so you can read the shape of the run, not just the final number: green when they're up over the window, red when down, with a live pulse on the latest trade. The endpoint of the line always matches the row's headline P&L, so it can't tell a prettier story than the on-chain record. Win rate now carries a green/red distribution bar under it too. The sparkline is drawn from the same verified closed-position history the profile's equity curve uses — no new data, no estimates. (`/leaderboard`) `[improvement]`
- **Leak-proofing the closed-loop economy: fail-closed spend guards + an on-chain leak scanner** — The rule behind the closed-loop agent economy is simple: no dollar and no SOL ever leaves the wallets the platform controls. Until now the safeguards that enforced it were passive — a couple of configuration switches that, if flipped or forgotten, could quietly re-open spending to the outside world, and nothing actually watched the blockchain to confirm money wasn't leaving. Both gaps are now closed. Before the economy spends anything, it re-checks the three switches that keep the loop sealed — external spending off, no charity split, settlements routed only through the platform's own settlement service — and if any of them is wrong it stops spending entirely and pages operators, naming the switch that changed. Separately, a new monitor reads the chain itself every ten minutes: for each ring wallet it inspects every recent transaction and flags anything that moved value to an address the platform doesn't control — a stablecoin payment to a stranger, any non-stablecoin token leaving, an unexplained SOL debit, or a permission grant that would let someone else move funds later. Any such finding pages operators within minutes with the transaction, the counterparty, the amount, and the exact recovery steps, and is filed on the same financial-integrity board as the rest of the platform's money checks. It also tallies the network fees the wallets actually paid and cross-checks them against the books, so fees paid outside the accounting get caught too. The monitor only ever reads the chain — it never moves funds or touches keys. `[security]`
- **Live Trading Theater stages rigged avatars only** — The 3D trading stage now only casts avatars that can actually perform. Any agent whose model is a static forge prop, a non-humanoid mesh, or a broken rig is quietly swapped for the platform's rigged mannequin instead of being staged as-is — which fixes the stray blob of geometry that could sprawl across the floor. Every figure on stage can now idle and react to real on-chain events. (`/theater`) `[fix]`
- **Lowest fees always: self-pay settlement, a fee ceiling, and a nightly fee audit that reclaims rent** — The closed-loop agent economy now enforces its cheapest possible settlement everywhere. Payments inside the ring default to self-pay — the paying wallet covers its own one-signature network fee (about 5,000 lamports) instead of a two-signature sponsored payment (about 10,000), so the platform burns half the SOL per settlement. Sponsor mode is still available as a fallback for wallets that hold no SOL, but it is no longer the default. A hard per-payment fee ceiling now guards the floor from both sides: the payment builders are proven never to exceed it, and the payment client refuses at send time to broadcast anything whose fee configuration would cross it. A new nightly audit measures the real network fees the wallets actually paid — read straight from the blockchain, not estimated — and reports two plain numbers: the SOL burned per settlement and the SOL burned per $100 of volume moved. If either drifts above budget it pages operators. The same run reclaims the one-time account-rent deposits the ring locks up over time, safely closing only empty, non-active token accounts and returning the rent to the owner wallet. The live efficiency numbers are exposed on the ring's public net-position report. (`/api/x402-ring`) `[improvement, infra]`
- **Oracle folds copycat launch spam into one card** — When pump.fun gets flooded with copycat and bundle launches — dozens of distinct mints deployed under the exact same name and ticker, the "deploy 100 more" and "America 250" runs — the Oracle conviction feed used to show every one as its own card, so the same coin appeared to repeat ten or twenty times in a row and the feed read like it was broken. Each of those was genuinely a separate mint with its own conviction row, so nothing was actually duplicated — but the wall of identical cards buried the real, distinct launches. The feed now folds each cluster of same-name, same-ticker mints into a single card showing the highest-conviction one, tagged with a small ×N badge and a tooltip that spells out how many copies share that name. A coin you're tracking on your ★ watchlist is never folded away — it always keeps its own card — so nothing you care about disappears. (`/oracle`) `[improvement, fix]`
- **Paid endpoints never hand you a payment rail they can't complete** — We fixed a case where paying for an endpoint on Solana could fail with a server error after you had already built and signed the payment. The platform advertises which networks an endpoint accepts; it was offering the Solana rail based on the sponsor wallet's address alone, without checking that the co-signing key needed to actually complete the payment was in place. If that key was missing, you got a 502 at the last step. Now the Solana rail is only offered when settlement can genuinely complete — the same rule the platform already applied to Base — so you never pick a rail that dead-ends. The live payment challenge and the machine-readable service catalog now agree, and if the co-signing key is missing you get a clear, retryable "temporarily unavailable" instead of a hard error. The moment the key is configured, Solana payments resume on their own with no redeploy, and the platform health board now flags this specific gap so operators can fix it fast. `[fix, security]`
- **Payment audit writes now batch instead of hammering the database** — The ledger that records every x402 payment used to write one row to the database per paid request. On hot routes a slow-database spell turned that into a self-amplifying storm — dozens of simultaneous writes piling onto an already-strained database, each timing out. Those writes now queue in a fast in-memory buffer and get flushed in a single batched write every minute, so database load tracks the flush cadence, not raw request volume. Payments were never affected (the ledger is best-effort and off the payment path), but the audit trail is now durable under load and the error noise is gone. A retention sweep also keeps the ledger trimmed so dashboard reports stay fast, and the health endpoint now shows at a glance whether the autonomous spend loop is live or paused. `[fix, infra]`
+- **Real funds now require a one-time risk acknowledgment** — Before any feature that moves real money — trading, sniping, withdrawals, swaps, token launches, x402 payments, or buying USDC — three.ws now asks you to read and accept a plain-language risk acknowledgment: this is experimental software, losses can be total, autonomous agents act without asking again, and you use real funds entirely at your own risk. You accept it once per browser; if the disclosure ever changes materially, you'll be asked again before your next real-funds action. The full text lives at the new Risk Disclosure page, and devnet/simulation flows stay friction-free — the gate only guards real money. (`/legal/risk`) `[feature, security]`
- **Ring economy dashboard — watch the closed loop breathe** — The self-cycled x402 ring economy now has a live operator dashboard. A per-minute settlement pulse shows the heartbeat at a glance — a spark strip where any gap is instantly visible, plus a big “minutes since last settle” number that turns green, amber, then red as the tick slows or stops. A loop diagram traces payer → endpoint → treasury → sweep with live on-chain wallet balances and floor indicators; a streaming feed shows every paid call with the buying agent, endpoint, price, and its explorer link, and flags skips and failures with their exact reason instead of dropping them silently. Fee-burn efficiency, leak-scan and reconciliation integrity, and per-endpoint coverage each get a panel. It is admin-only and clearly labels all ring volume as internal dogfooding, not organic revenue — so “it stopped working” can never again go unnoticed for days. `[feature]`
- **Ring settlements stay in-house — routing made truthful, mis-config now caught** — The closed-loop agent economy is built so no third party ever touches a ring settlement — but the configuration used to say one thing while the code did another: the setup guide claimed the platform's own facilitator was 'always-on' while Solana payments still defaulted to an outside settlement service. That contradiction is gone. When the self-hosted facilitator is switched on, ring payments now settle through it by default, and an explicitly-set external facilitator is the only thing that overrides that — no other coin or user rail is affected. Just as important, a mis-configured deploy now says so loudly instead of silently sending volume elsewhere: the status and ring reports list every problem — facilitator disabled, settlement pointing at an outside service, a missing treasury or fee-payer key, a per-call price set above the per-run cap — so operators can confirm the whole envelope is correct before funding anything. A clean deploy shows an empty warnings list. `[fix, infra]`
- **Ring wallets: watched for drain, auto-refilled, and verifiable in one command** — The three platform wallets that power the closed-loop agent economy — the one that pays, the one that receives, and the one that covers network fees — are now monitored and self-healing so the loop can run unattended without silently stalling or draining. A balance monitor checks all three on-chain every ten minutes and pages operators before trouble: the fee and paying wallets alert when their SOL dips near the level where settlements would be refused, and the paying wallet alerts when its USDC float runs low. The receiving wallet is intentionally left unbounded — it fills up and gets swept back automatically, so a low balance there is healthy, not a problem. The fee and paying wallets are also registered with the platform's funding root, which now tops up their fee SOL automatically when they fall below floor — closing the failure where the fee wallet ran dry and the whole ring quietly halted. A new one-command check confirms every wallet is correctly configured, registered, and reachable, prints their live balances, and refuses to pass on any mismatch, without ever exposing a secret. A funding runbook documents exactly how much to send and how to confirm it landed. `[infra, security]`
@@ -37,6 +41,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr
- **The Live Trading Theater got more alive — and shows its guardrails** — A pass of polish across the 3D stage: performers now cast contact shadows so no one floats, the camera pushes in on a marquee fill, the celebration coin scales with the real size of the buy, and receipts show the coin ticker. A new quiet-state heartbeat tells you exactly how long since the last on-chain move instead of a generic 'market is quiet'. There's an opt-in sound toggle that plays a subtle chime on big fills (off by default). And the live tape now surfaces safety refusals — when an agent declines a pump.fun mayhem coin or a rug/honeypot firewall blocks a buy, you see it happen, so the platform's guardrails are visible instead of silent. (`/theater`) `[improvement]`
- **The Live Trading Theater is now a dealing room, not a stage** — The 3D theater has been rebuilt from an abstract stage into a trading dealing room: every agent now stands at its own workstation — a desk with a lit monitor — arranged in staggered rows like a trading pit. Agents without their own avatar are now dressed in a variety of distinct rigged bodies instead of all sharing one mannequin, so the floor reads as a room of individuals. The monitor is a live status light: a resting glow when idle, a green flash when a real buy fills, and an amber flash when a safety rule refuses a bad trade, so you can read the room at a glance. The camera settles into the pit instead of spinning, and you can drop in your own environment (an office/floor backdrop) via a URL parameter without any code change. A new self-healing guard also catches any avatar whose animation misbehaves and quietly swaps in a clean figure, so the floor never shows a broken model. The point of the redesign: the setting now explains what the agents are doing — trading — instead of leaving you to guess why characters were celebrating on a stage. (`/theater`) `[improvement]`
- **The trading stack is now fully documented** — Two new guides map the whole trading experience. Trading Surfaces covers the five solo pages — Coin Radar, Coin Intelligence, the Live Trade Feed, your Watchlist, and the keyboard-first Mission Control cockpit — including where every number comes from and how the pages chain together. Competitive & Pooled Trading covers the Arena tournaments with real on-chain $THREE payouts, the 3D Sniper Arena floor, the Live Trading Theater with one-click copy trading, backable Vaults, and consensus-driven Trading Swarms. Both are written for someone who has never opened the pages before. (`/docs/trading-surfaces`) `[docs]`
+- **Trading agents now stop themselves after a losing day — and the funder stops chasing them** — A per-trade rulebook can't catch a fleet that bleeds one bad entry at a time: every single buy passes its checks, yet the wallet still grinds down. Two new portfolio-level guardrails close that gap. First, a realized-loss circuit breaker: once an agent's net realized loss over the last 24 hours crosses a configurable cap, it stops opening new positions for the rest of the window — a profitable or break-even day never trips it, and an unpriceable coin fails closed rather than sneaking through. Second, the auto-funder is now loss-aware and per-agent capped: it will not keep topping up a wallet that has hit its loss cap, and no single agent can draw more than its daily refill ceiling from the treasury — so one wallet that only loses can't quietly drain the master or starve the healthy agents. Both ship with conservative defaults and are tunable per fleet. `[security, improvement]`
- **Treasury sweepback — every agent wallet cycles back to one root** — The economy's funding root now has a return leg. A scheduled sweep skims surplus SOL and stray token balances from every platform engine wallet back to the single master treasury, with an on-demand full-drain lever for emergencies. Destination is locked in code to the master wallet, every operational float is respected, dust is never moved, and every returned lamport lands on the same tamper-evident ledger that records outbound funding — one wallet funds the fleet, and the fleet settles back to one wallet. `[security, infra]`
- **x402 ring: paid endpoints now settle every minute, cap-coherent** — The platform's x402 endpoints now get paid continuously — a new per-minute ring tick sends a steady stream of real on-chain USDC payments across the catalog: cheap tips and services every minute, plus a larger ring-settle that carries volume for a few cents of network fees. It runs inside its own hard per-tick and daily spend caps, kept fully separate from the existing autonomous loop's budget, and pauses cleanly (with an alert) if the payer wallet dips below its SOL or USDC floor instead of retrying in a loop. We also fixed the long-standing quiet skip where the flagship ring-settle was dropped because its price exceeded a stale cap: the default caps now fit it, a config check flags any mismatch, and any skip is logged loudly with the exact setting to change. (`/docs/x402-ring-economy`) `[feature, infra]`
diff --git a/STRUCTURE.md b/STRUCTURE.md
index 62312da2c..bb7257eb4 100644
--- a/STRUCTURE.md
+++ b/STRUCTURE.md
@@ -44,6 +44,7 @@ bottom.
| Economy funding root (master wallet) | [api/_lib/economy-master.js](api/_lib/economy-master.js), cron [api/cron/treasury-topup.js](api/cron/treasury-topup.js), registry [api/_lib/solana-signers.js](api/_lib/solana-signers.js) | In-repo (inert until keyed) | One master wallet (`WwwuGbq…T3WwW`, `ECONOMY_MASTER_SECRET_BASE58`) auto-tops-up every other Solana engine below its floor. Funder-only — never trades/settles; reserve/per-engine/per-run guarded; allowlisted to registry wallets; fee-minimized. See [docs/economy-master.md](docs/economy-master.md) + [SOLANA-SIGNERS.md](tasks/onchain-deployment/SOLANA-SIGNERS.md) |
| Economy master audit ledger + breach monitor | ledger [api/_lib/economy-ledger.js](api/_lib/economy-ledger.js) ([schema](api/_lib/migrations/20260702010000_economy_master_ledger.sql)), reconcile cron [api/cron/economy-reconcile.js](api/cron/economy-reconcile.js), export [scripts/economy-ledger-export.mjs](scripts/economy-ledger-export.mjs) | In-repo | Tamper-evident (SHA-256 hash-chained) accounting book of every SOL movement from the master, with running balance + USD-at-transfer-time. The reconcile cron checks it every 30 min for tamper, unrecorded on-chain outbound (breach/key-compromise), and on-chain integrity; findings land in `payment_reconciliation`. Accounting CSV/JSON export. See [docs/economy-master.md](docs/economy-master.md#audit-accounting--breach-monitoring) |
| Autonomous trading experiment | policy [scripts/trading-experiment-setup.mjs](scripts/trading-experiment-setup.mjs), laddered exit [workers/agent-sniper/exit-logic.js](workers/agent-sniper/exit-logic.js) (`decideLadderedExit`), no-Mayhem gate [workers/agent-sniper/mayhem-gate.js](workers/agent-sniper/mayhem-gate.js), journal [workers/agent-sniper/journal.js](workers/agent-sniper/journal.js) → [api/sniper/journal.js](api/sniper/journal.js) | In-repo | One agent, ~10 SOL, newer pump.fun launches ($10k–$100k mcap, no Mayhem). Take-initials-at-2× laddered exit keeps a moon bag (never a 100% exit up), hard stop-loss underneath. Every decision journaled with its reasoning. UI-funded, simulate-first. See [docs/trading-experiment.md](docs/trading-experiment.md) |
+| Real-funds risk acknowledgment | gate [public/risk-ack.js](public/risk-ack.js) `→ /legal/risk`, app wrapper [src/shared/risk-ack.js](src/shared/risk-ack.js), record endpoint [api/legal/risk-ack.js](api/legal/risk-ack.js), disclosure [public/legal/risk.html](public/legal/risk.html) | In-repo | Versioned, once-per-browser acceptance dialog every money-committing surface awaits before executing (trade, snipe, withdraw, swap, launch, x402, onramp — devnet exempt). Acceptances persist in `audit_log` (`risk-ack-accept`). See [docs/risk-acknowledgment.md](docs/risk-acknowledgment.md) |
## npm workspaces
diff --git a/api/_lib/circulation.js b/api/_lib/circulation.js
index 31c05c48a..106cad4fa 100644
--- a/api/_lib/circulation.js
+++ b/api/_lib/circulation.js
@@ -19,6 +19,7 @@
import { sql } from './db.js';
import { env } from './env.js';
import { randomUUID } from 'node:crypto';
+import { scrubSecrets } from './scrub-secrets.js';
import {
ensureAgentWallet,
recoverSolanaAgentKeypair,
@@ -142,7 +143,7 @@ async function logAction(row) {
values (
${row.kind}, ${row.network ?? null}, ${row.actorAgentId ?? null}, ${row.counterpartyAgentId ?? null},
${row.signature ?? null}, ${row.amountLamports != null ? String(row.amountLamports) : null},
- ${row.status ?? 'ok'}, ${JSON.stringify(row.detail ?? {})}::jsonb
+ ${row.status ?? 'ok'}, ${JSON.stringify(scrubSecrets(row.detail ?? {}))}::jsonb
)
`;
} catch (e) {
diff --git a/api/_lib/scrub-secrets.js b/api/_lib/scrub-secrets.js
new file mode 100644
index 000000000..fd537e50e
--- /dev/null
+++ b/api/_lib/scrub-secrets.js
@@ -0,0 +1,51 @@
+// api/_lib/scrub-secrets.js
+//
+// Defense-in-depth for structured logs: recursively strip secret-bearing keys
+// from any object before it is persisted. Every money-moving log path
+// (circulation actions, custody events, ring reconciliation) writes a freeform
+// `detail` blob; call sites are curated today, but a future field rename or a
+// spread of a wallet/keypair object would otherwise silently write a private key
+// into the database. This makes that structurally impossible.
+//
+// Pure, dependency-free, and cheap — safe to run on every write.
+
+// Key names whose VALUE must never be logged, matched case-insensitively as a
+// substring so `solanaSecretKey`, `encrypted_solana_secret`, `mnemonicPhrase`,
+// etc. are all caught. Matching on the key (not the value) avoids false positives
+// on legitimate data that merely looks random (mints, signatures, addresses).
+const SECRET_KEY_PATTERNS = [
+ 'secret', 'privatekey', 'private_key', 'keypair', 'mnemonic', 'seed',
+ 'password', 'passphrase', 'apikey', 'api_key', 'token', 'bearer',
+ 'authorization', 'signingkey', 'signing_key',
+];
+
+const REDACTED = '[redacted]';
+
+function isSecretKey(key) {
+ const k = String(key).toLowerCase();
+ return SECRET_KEY_PATTERNS.some((p) => k.includes(p));
+}
+
+/**
+ * Return a deep copy of `value` with every secret-bearing key redacted at any
+ * nesting depth. Arrays are walked element-wise. Non-plain values (strings,
+ * numbers, BigInt, null) pass through untouched. Circular references are handled
+ * so a live object (e.g. a Keypair with back-references) can be scrubbed safely.
+ *
+ * @param {*} value
+ * @param {WeakSet} [seen] internal cycle guard
+ * @returns {*}
+ */
+export function scrubSecrets(value, seen = new WeakSet()) {
+ if (value == null || typeof value !== 'object') return value;
+ if (seen.has(value)) return undefined; // drop cycles rather than throw
+ seen.add(value);
+
+ if (Array.isArray(value)) return value.map((v) => scrubSecrets(v, seen));
+
+ const out = {};
+ for (const [k, v] of Object.entries(value)) {
+ out[k] = isSecretKey(k) ? REDACTED : scrubSecrets(v, seen);
+ }
+ return out;
+}
diff --git a/data/changelog.json b/data/changelog.json
index 9d1fed9fb..cd76f417f 100644
--- a/data/changelog.json
+++ b/data/changelog.json
@@ -1,6 +1,42 @@
{
"$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-07-03",
+ "title": "Real funds now require a one-time risk acknowledgment",
+ "summary": "Before any feature that moves real money — trading, sniping, withdrawals, swaps, token launches, x402 payments, or buying USDC — three.ws now asks you to read and accept a plain-language risk acknowledgment: this is experimental software, losses can be total, autonomous agents act without asking again, and you use real funds entirely at your own risk. You accept it once per browser; if the disclosure ever changes materially, you'll be asked again before your next real-funds action. The full text lives at the new Risk Disclosure page, and devnet/simulation flows stay friction-free — the gate only guards real money.",
+ "tags": [
+ "feature",
+ "security"
+ ],
+ "link": "/legal/risk"
+ },
+ {
+ "date": "2026-07-03",
+ "title": "Trading agents now stop themselves after a losing day — and the funder stops chasing them",
+ "summary": "A per-trade rulebook can't catch a fleet that bleeds one bad entry at a time: every single buy passes its checks, yet the wallet still grinds down. Two new portfolio-level guardrails close that gap. First, a realized-loss circuit breaker: once an agent's net realized loss over the last 24 hours crosses a configurable cap, it stops opening new positions for the rest of the window — a profitable or break-even day never trips it, and an unpriceable coin fails closed rather than sneaking through. Second, the auto-funder is now loss-aware and per-agent capped: it will not keep topping up a wallet that has hit its loss cap, and no single agent can draw more than its daily refill ceiling from the treasury — so one wallet that only loses can't quietly drain the master or starve the healthy agents. Both ship with conservative defaults and are tunable per fleet.",
+ "tags": [
+ "security",
+ "improvement"
+ ]
+ },
+ {
+ "date": "2026-07-03",
+ "title": "Leaderboard rows now show each trader's P&L trend at a glance",
+ "summary": "Two traders can post the same realized P&L and have gotten there completely differently — one grinding steadily up, the other spiking once and giving it back. The Trader Leaderboard now draws a tiny cumulative-P&L sparkline on every row so you can read the shape of the run, not just the final number: green when they're up over the window, red when down, with a live pulse on the latest trade. The endpoint of the line always matches the row's headline P&L, so it can't tell a prettier story than the on-chain record. Win rate now carries a green/red distribution bar under it too. The sparkline is drawn from the same verified closed-position history the profile's equity curve uses — no new data, no estimates.",
+ "tags": [
+ "improvement"
+ ],
+ "link": "/leaderboard"
+ },
+ {
+ "date": "2026-07-03",
+ "title": "Fixed a Jito tip mis-route that could waste a slice of every batch of trades",
+ "summary": "When our trading agents send transactions through Jito for MEV protection, they attach a tip to one of Jito's eight published tip accounts. Three of our code paths had a mistyped address in that list — so roughly one in eight of the affected trades paid its tip to a dead address instead of Jito, losing that tip and getting no MEV protection or priority for that transaction. We verified the correct eight addresses against Jito's own live endpoint, corrected all three, and added a test that checks every tip-account list in the codebase against the canonical set so a typo can never slip in again. No user action needed; trades now land protected as intended.",
+ "tags": [
+ "fix"
+ ]
+ },
{
"date": "2026-07-03",
"title": "Fleet Command — run your whole swarm of trading agents from one deck",
diff --git a/data/pages.json b/data/pages.json
index 5056b16ca..dcd45b41e 100644
--- a/data/pages.json
+++ b/data/pages.json
@@ -2122,6 +2122,14 @@
"priority": 0.2,
"changefreq": "yearly",
"added": "2026-04-27"
+ },
+ {
+ "path": "/legal/risk",
+ "title": "Risk Disclosure",
+ "description": "Risk disclosure for real-funds features: experimental software, total-loss risk, autonomous agents, no liability.",
+ "priority": 0.2,
+ "changefreq": "yearly",
+ "added": "2026-07-03"
}
]
},
diff --git a/docs/risk-acknowledgment.md b/docs/risk-acknowledgment.md
new file mode 100644
index 000000000..34a6d05ab
--- /dev/null
+++ b/docs/risk-acknowledgment.md
@@ -0,0 +1,97 @@
+# The real-funds risk acknowledgment
+
+Every feature on three.ws that can move real money is gated behind a one-time,
+versioned risk acknowledgment. Before a user's first real-funds action — a
+trade, a sniper arm, a withdrawal, a swap, a token launch, an x402 payment, a
+fiat onramp — a dialog asks them to read and accept the
+[Risk Disclosure](https://three.ws/legal/risk): three.ws is experimental
+software, losses can be total, autonomous agents act without asking again, and
+they use real funds entirely at their own risk. Decline and the money action
+simply doesn't run; everything else on the platform keeps working.
+
+## How it behaves
+
+- **Once per browser.** Acceptance is stored in `localStorage` under
+ `threews:risk-ack` as `{ version, acceptedAt, context }`. Every gated surface
+ shares the same record — accepting in the trade tab also satisfies the swap
+ modal, the launcher, and every other gate.
+- **Versioned.** The current disclosure version is `RISK_ACK_VERSION` in
+ [`public/risk-ack.js`](../public/risk-ack.js). If the disclosure changes
+ materially, bump that constant (and the version line on
+ [`public/legal/risk.html`](../public/legal/risk.html)) — every user is then
+ re-prompted before their next real-funds action. Stored acceptances with an
+ older version no longer count.
+- **Recorded server-side.** On accept, the client fires
+ `POST /api/legal/risk-ack` ([`api/legal/risk-ack.js`](../api/legal/risk-ack.js)),
+ which writes a `risk-ack-accept` row into `audit_log` — user id when signed
+ in (null otherwise), disclosure version, the feature context, path, IP, and
+ user agent. `audit_log` is not retention-pruned, so acceptance records
+ persist. The write is fire-and-forget: a failed network call never blocks the
+ user's accepted state.
+- **Devnet stays friction-free.** Surfaces that know their network only gate
+ when it isn't `devnet`. Simulation modes (e.g. Oracle arm's simulate mode)
+ are never gated.
+- **Fails closed.** If the gate can't render (no DOM) or the user never
+ accepts, `ensureRiskAck()` resolves `false` and the caller must abort the
+ money action.
+
+## Wiring a new money surface
+
+Any new feature that commits real funds MUST call the gate before executing.
+From bundled app code (`src/`):
+
+```js
+import { ensureRiskAck } from './shared/risk-ack.js'; // adjust the relative path
+
+async function onConfirm() {
+ if (!(await ensureRiskAck({ context: 'my-feature' }))) return; // declined
+ // … move real funds …
+}
+```
+
+From plain `public/` scripts or third-party embeds:
+
+```js
+import { ensureRiskAck } from './risk-ack.js'; // resolves on the three.ws origin
+```
+
+`context` is a short kebab-case slug of the gated action (`trade`, `snipe`,
+`withdraw`, `swap`, `launch`, `x402-pay`, `onramp`, …). It is stored with the
+acceptance record so the audit trail shows which feature prompted it. The call
+is idempotent — once accepted it resolves `true` instantly, so gating multiple
+layers of the same flow costs nothing.
+
+The canonical implementation lives in [`public/risk-ack.js`](../public/risk-ack.js)
+(dependency-free, served at `/risk-ack.js`); [`src/shared/risk-ack.js`](../src/shared/risk-ack.js)
+is a thin wrapper for bundled code. Pure logic (`parseAckRecord`,
+`isAckCurrent`) is covered by [`tests/risk-ack.test.js`](../tests/risk-ack.test.js).
+
+## Currently gated surfaces
+
+| Surface | Entry point | Context |
+|---|---|---|
+| Agent wallet — trade | `src/agent-wallet-hub/tabs/trade.js` | `trade` |
+| Agent wallet — withdraw | `src/agent-wallet-hub/tabs/withdraw.js` | `withdraw` |
+| Agent wallet — give | `src/agent-wallet-hub/tabs/give.js` | `give` |
+| Agent wallet — arm sniper | `src/agent-wallet-hub/tabs/snipe.js` | `snipe` |
+| Agent wallet — arm autopilot | `src/agent-wallet-hub/tabs/autopilot.js` | `autopilot` |
+| Agent wallet — x402 pay | `src/agent-wallet-hub/tabs/pay.js` | `x402-pay` |
+| Oracle arm (live mode only) | `src/arm.js` | `oracle-arm` |
+| Jupiter swap modal | `src/swap-jupiter.js` | `swap` |
+| pump.fun token launch | `src/pump/launch-token-modal.js` | `launch` |
+| Agent-home pump.fun buy/sell | `src/agent-home-pumpfun.js` | `pump-trade` |
+| pump.fun x402 access payment | `src/pump/pump-modals.js` | `x402-pay` |
+| Skill purchase modal | `src/payment-modal.js` | `skill-purchase` |
+| $THREE token payments | `src/token-pay.js` | `token-pay` |
+| Forge pay-per-generation | `src/forge-pay.js` | `forge-pay` |
+| Add funds / Coinbase onramp | `src/shared/add-funds.js` | `onramp` |
+| Drop-in x402 modal (incl. merchant embeds) | `public/x402.js` | `x402-pay` |
+
+If you add a surface, add its row here and its gate call in the code — both in
+the same change.
+
+## Related
+
+- [Risk Disclosure](https://three.ws/legal/risk) — the full legal text users accept
+- [Custody you can verify](./custody.md) — the spend-limit and freeze controls that bound what agents can do after acceptance
+- [Terms of Service](https://three.ws/legal/tos) — §8 Limitation of Liability, which this acknowledgment supplements
diff --git a/docs/start-here.md b/docs/start-here.md
index 53ec4128e..60c387270 100644
--- a/docs/start-here.md
+++ b/docs/start-here.md
@@ -66,6 +66,6 @@ If you're here to create and share agents rather than write code, follow this pa
- **Creating your first agent** → Go to [/start](/start) — a 5-step wizard walks you through it
- **Meeting avatars in the worlds?** → Press <kbd>I</kbd> on anyone in `/play`, `/city`, a coin world, or `/agora` to see who they are — the [avatar inspector](./avatar-inspector.md) shows their reputation, wallet, and profile
- **Trading?** → [The trading surfaces](./trading-surfaces.md) maps the solo stack (Radar, Coin Intelligence, Live Trade Feed, Watchlist, Mission Control); [trading arenas](./trading-arenas.md) covers tournaments, the theater, vaults, and swarms; [Oracle](./oracle.md) is the conviction engine underneath all of it
-- **Trusting an agent with money?** → [Custody you can verify](./custody.md) — spend limits, freeze, Merkle proof-of-custody, and social recovery; [claim your wallet](./trader-card.md) turns any pump.fun track record into a public, provable Trader Card
+- **Trusting an agent with money?** → [Custody you can verify](./custody.md) — spend limits, freeze, Merkle proof-of-custody, and social recovery; [claim your wallet](./trader-card.md) turns any pump.fun track record into a public, provable Trader Card. Every real-funds feature sits behind the [risk acknowledgment](./risk-acknowledgment.md) — read the [Risk Disclosure](https://three.ws/legal/risk) before committing anything
- **Developer docs** → Read the [Introduction](./introduction.md) for the full technical picture
- **Building UI?** → [ui-juice](./ui-juice.md) is the shared game-feel library (count-ups, sparklines, ring gauges, live dots, the "it shipped" ripple) every surface animates with
diff --git a/package.json b/package.json
index d6ded23df..8a6de2e6b 100644
--- a/package.json
+++ b/package.json
@@ -129,8 +129,9 @@
"audit:routes": "node scripts/verify-routes.mjs",
"audit:handlers": "node scripts/audit-empty-handlers.mjs",
"audit:x402-catalog": "node scripts/audit-x402-catalog.mjs",
- "gate": "npm run test:gate && npm run audit:mcp && npm run audit:routes && npm run audit:handlers && npm run audit:pages && npm run audit:hidden-guard && npm run audit:x402-catalog",
+ "gate": "npm run test:gate && npm run audit:mcp && npm run audit:routes && npm run audit:handlers && npm run audit:pages && npm run audit:hidden-guard && npm run audit:x402-catalog && npm run audit:tokens",
"audit:hidden-guard": "node scripts/audit-hidden-guard.mjs",
+ "audit:tokens": "node scripts/audit-token-drift.mjs",
"guard:hidden": "node scripts/inject-hidden-guard.mjs --write",
"check:images": "node scripts/audit-image-loading.mjs --strict",
"audit:web": "node scripts/page-audit.mjs",
diff --git a/packages/agent-sniper/bin/agent-sniper.js b/packages/agent-sniper/bin/agent-sniper.js
index 3a8a83e34..f647b0494 100755
--- a/packages/agent-sniper/bin/agent-sniper.js
+++ b/packages/agent-sniper/bin/agent-sniper.js
@@ -359,11 +359,18 @@ FLAGS
--db <path> Same as --sqlite with an explicit DB path.
--port <n> HTTP port for 'serve'. (default 8787)
--url <url> Remote base URL for 'status'.
+ --allow-mayhem Permit pump.fun Mayhem-mode tokens. Off by
+ default: Mayhem coins are skipped fleet-wide.
+ --mayhem-strict Also skip a mint when its bonding curve can't be
+ read (fail closed). Default allows-on-unknown.
SAFETY
Default mode is SIMULATE — no funds are ever moved. Pass '--mode live' to
trade REAL SOL from the agent wallet. There is no confirmation prompt; live
means live. A mandatory stop_loss_pct is enforced on every armed strategy.
+ Pump.fun Mayhem-mode tokens are filtered out by default (--allow-mayhem to
+ opt in). Set SNIPER_MIN_MC_FLOOR_USD / SNIPER_MAX_MC_CEIL_USD to enforce a
+ market-cap band so a bare strategy can't buy freshly-launched dust.
WALLETS
Single agent: --keypair <secret> (or SOLANA_SECRET_KEY).
diff --git a/pages/a-edit.html b/pages/a-edit.html
index 45995b49c..dc0e7fc81 100644
--- a/pages/a-edit.html
+++ b/pages/a-edit.html
@@ -97,11 +97,11 @@
}
.ce-status--error {
- color: #f87171;
+ color: var(--danger);
}
.ce-status--success {
- color: #4ade80;
+ color: var(--success);
}
.ce-link {
@@ -236,13 +236,13 @@
}
.ce-btn--connected {
- color: #4ade80;
+ color: var(--success);
border-color: rgba(74, 222, 128, 0.3);
}
/* ── Error ───────────────────────────────────────────────────────── */
.ce-error {
- color: #f87171;
+ color: var(--danger);
font-size: 0.85rem;
padding: 3rem 0;
text-align: center;
diff --git a/pages/activity.html b/pages/activity.html
index 079ae438b..517d5f7f1 100644
--- a/pages/activity.html
+++ b/pages/activity.html
@@ -35,8 +35,8 @@
--ac-faint: #5c6273;
--ac-accent: #8b5cf6;
--ac-up: #34d399;
- --ac-dn: #f87171;
- --ac-warn: #fbbf24;
+ --ac-dn: var(--danger);
+ --ac-warn: var(--warn);
--ac-neutral: #818cf8;
/* tier palette */
--tier-prime: #c084fc;
diff --git a/pages/admin/ops.html b/pages/admin/ops.html
index 57064e678..2ea4b0256 100644
--- a/pages/admin/ops.html
+++ b/pages/admin/ops.html
@@ -29,7 +29,7 @@
.auth-gate input { width: 100%; font: inherit; font-size: 13.5px; padding: 10px 14px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.05); color: #fff; box-sizing: border-box; margin-bottom: 0.75rem; }
.auth-gate input:focus { outline: none; border-color: rgba(124,92,255,0.5); }
.auth-gate button { width: 100%; font: inherit; font-size: 13.5px; font-weight: 600; padding: 11px; border-radius: 10px; border: none; background: linear-gradient(135deg,#7c5cff,#6144e0); color: #fff; cursor: pointer; }
- .auth-err { font-size: 12.5px; color: #f87171; margin-top: 0.5rem; }
+ .auth-err { font-size: 12.5px; color: var(--danger); margin-top: 0.5rem; }
/* Overall status banner */
.ops-banner { border-radius: 14px; padding: 1.1rem 1.5rem; margin-bottom: 2rem; display: flex; align-items: center; gap: 1rem; border: 1px solid; }
@@ -39,7 +39,7 @@
.banner-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.ok .banner-dot { background: #2fbf71; box-shadow: 0 0 8px rgba(47,191,113,0.6); }
.warn .banner-dot { background: #f0a93b; box-shadow: 0 0 8px rgba(240,169,59,0.6); }
- .down .banner-dot { background: #f87171; box-shadow: 0 0 8px rgba(248,113,113,0.6); }
+ .down .banner-dot { background: var(--danger); box-shadow: 0 0 8px rgba(248,113,113,0.6); }
.banner-text { font-size: 14.5px; font-weight: 600; }
.banner-sub { font-size: 12.5px; color: rgba(255,255,255,0.45); margin-left: auto; }
@@ -50,7 +50,7 @@
.sum-card .val { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.03em; }
.sum-card .val.ok { color: #2fbf71; }
.sum-card .val.warn { color: #f0a93b; }
- .sum-card .val.bad { color: #f87171; }
+ .sum-card .val.bad { color: var(--danger); }
.sum-card .sub { font-size: 11px; color: rgba(255,255,255,0.3); margin-top: 2px; }
/* Sections */
@@ -67,13 +67,13 @@
.p-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.p-ok .p-dot { background: #2fbf71; }
.p-warn .p-dot { background: #f0a93b; }
- .p-bad .p-dot { background: #f87171; animation: pulse-red 1.5s ease-in-out infinite; }
+ .p-bad .p-dot { background: var(--danger); animation: pulse-red 1.5s ease-in-out infinite; }
.p-loading .p-dot { background: rgba(255,255,255,0.2); }
@keyframes pulse-red { 0%,100% { box-shadow: 0 0 0 0 rgba(248,113,113,0.4); } 50% { box-shadow: 0 0 0 4px rgba(248,113,113,0); } }
.p-label { font-size: 13px; font-weight: 500; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-status { font-size: 11px; font-weight: 700; color: rgba(255,255,255,0.3); flex-shrink: 0; }
.p-ok .p-status { color: #2fbf71; }
- .p-bad .p-status { color: #f87171; }
+ .p-bad .p-status { color: var(--danger); }
.p-warn .p-status { color: #f0a93b; }
.p-ms { font-size: 10.5px; color: rgba(255,255,255,0.25); flex-shrink: 0; }
@@ -84,15 +84,15 @@
.cron-table tr:hover td { background: rgba(255,255,255,0.02); }
.cron-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 6px; }
.cron-badge.ok { background: rgba(47,191,113,0.1); color: #2fbf71; border: 1px solid rgba(47,191,113,0.2); }
- .cron-badge.fail { background: rgba(248,113,113,0.1); color: #f87171; border: 1px solid rgba(248,113,113,0.2); }
+ .cron-badge.fail { background: rgba(248,113,113,0.1); color: var(--danger); border: 1px solid rgba(248,113,113,0.2); }
.cron-badge.stale { background: rgba(240,169,59,0.1); color: #f0a93b; border: 1px solid rgba(240,169,59,0.2); }
.cron-badge.never { background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.3); border: 1px solid rgba(255,255,255,0.08); }
.cron-ago { color: rgba(255,255,255,0.4); font-size: 12px; }
- .cron-err { color: #f87171; font-size: 11.5px; font-family: monospace; max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
+ .cron-err { color: var(--danger); font-size: 11.5px; font-family: monospace; max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Failing spotlight */
.fail-section { background: rgba(248,113,113,0.06); border: 1px solid rgba(248,113,113,0.15); border-radius: 14px; padding: 1.25rem 1.5rem; margin-bottom: 2rem; }
- .fail-section-hd { font-size: 12px; font-weight: 700; color: #f87171; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 1rem; }
+ .fail-section-hd { font-size: 12px; font-weight: 700; color: var(--danger); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 1rem; }
.fail-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.fail-item { display: flex; align-items: baseline; gap: 0.75rem; font-size: 13px; }
.fail-item-label { font-weight: 600; min-width: 180px; }
diff --git a/pages/agent-edit.html b/pages/agent-edit.html
index 732b20e29..1b8a009ea 100644
--- a/pages/agent-edit.html
+++ b/pages/agent-edit.html
@@ -873,7 +873,7 @@
.voice-range-val { font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, 0.55); font-weight: 400; }
.voice-check { grid-column: 1 / -1; display: flex; align-items: center; gap: 0.5rem; font-size: 0.82rem; color: rgba(255, 255, 255, 0.75); cursor: pointer; }
.voice-check input { accent-color: #3b82f6; }
- .voice-tile-play.playing { color: #f87171; }
+ .voice-tile-play.playing { color: var(--danger); }
.voice-unconfigured {
display: flex; flex-direction: column; align-items: center; gap: 0.75rem;
padding: 2rem 1.5rem; text-align: center;
diff --git a/pages/agent-screen.html b/pages/agent-screen.html
index 2cbe9f6f7..ccb54958a 100644
--- a/pages/agent-screen.html
+++ b/pages/agent-screen.html
@@ -163,8 +163,8 @@
padding-left: 0.45rem;
border-left: 1px solid rgba(255,255,255,0.14);
}
- .asc-pnl.pos .asc-pnl-value { color: var(--screen-live, #4ade80); }
- .asc-pnl.neg .asc-pnl-value { color: #f87171; }
+ .asc-pnl.pos .asc-pnl-value { color: var(--screen-live, var(--success)); }
+ .asc-pnl.neg .asc-pnl-value { color: var(--danger); }
.asc-pnl.pos { border-color: rgba(74,222,128,0.35); background: rgba(74,222,128,0.08); }
.asc-pnl.neg { border-color: rgba(248,113,113,0.35); background: rgba(248,113,113,0.08); }
/* brief flash when a fresh fill moves the number */
@@ -560,8 +560,8 @@
/* realized-exit lines tint by sign so a green/red scan reads as a P&L tape */
.asc-log-entry.pnl-pos .asc-log-text { color: #6ee7a0; }
.asc-log-entry.pnl-neg .asc-log-text { color: #f9a8a8; }
- .asc-log-entry.pnl-pos .asc-log-type.trade { background: rgba(74,222,128,0.18); color: #6ee7a0; box-shadow: inset 2px 0 0 #4ade80; }
- .asc-log-entry.pnl-neg .asc-log-type.trade { background: rgba(248,113,113,0.18); color: #f9a8a8; box-shadow: inset 2px 0 0 #f87171; }
+ .asc-log-entry.pnl-pos .asc-log-type.trade { background: rgba(74,222,128,0.18); color: #6ee7a0; box-shadow: inset 2px 0 0 var(--success); }
+ .asc-log-entry.pnl-neg .asc-log-type.trade { background: rgba(248,113,113,0.18); color: #f9a8a8; box-shadow: inset 2px 0 0 var(--danger); }
/* ── cinematic activity rows: icon + colour-graded chip + severity ring ── */
.asc-log-entry { --asc-accent: rgba(255,255,255,0.55); position: relative; box-shadow: inset 2px 0 0 transparent; transition: background 0.18s ease; }
.asc-log-icon { flex: none; font-size: 0.86rem; line-height: 1.3; filter: saturate(1.1); }
@@ -1732,8 +1732,8 @@
/* ── Portfolio / PnL HUD panel ── */
.asc-panel--hud { width: 288px; }
.asc-hud {
- --success: #4ade80;
- --danger: #f87171;
+ --success: var(--success);
+ --danger: var(--danger);
display: flex; flex-direction: column; gap: 0.6rem;
padding: 0.7rem 0.8rem 0.85rem;
min-height: 0; height: 100%; overflow-y: auto; position: relative;
@@ -1766,11 +1766,11 @@
.asc-hud-delta-meta, .asc-hud-delta-na { font-size: 0.6rem; font-weight: 600; color: rgba(255,255,255,0.4); }
.asc-hud-stale {
font: 700 0.55rem/1 var(--font-mono, ui-monospace, Menlo, monospace);
- text-transform: uppercase; letter-spacing: 0.05em; color: #fbbf24;
+ text-transform: uppercase; letter-spacing: 0.05em; color: var(--warn);
background: rgba(251,191,36,0.12); border-radius: 999px; padding: 2px 6px;
}
.asc-hud-livedot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 6px var(--success); }
- .asc-hud-livedot[data-state="reconnecting"] { background: #fbbf24; box-shadow: 0 0 6px #fbbf24; animation: asc-hud-blink 1s steps(2) infinite; }
+ .asc-hud-livedot[data-state="reconnecting"] { background: var(--warn); box-shadow: 0 0 6px var(--warn); animation: asc-hud-blink 1s steps(2) infinite; }
@keyframes asc-hud-blink { 50% { opacity: 0.25; } }
.asc-hud-spark-wrap { position: relative; height: 48px; }
.asc-hud-spark { width: 100%; height: 48px; display: block; }
@@ -1902,7 +1902,7 @@
.asc-hire-step { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; flex: 1; min-width: 0; }
.asc-hire-step .dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,0.18); transition: background 0.2s, box-shadow 0.2s; }
.asc-hire-step .lbl { font-size: 0.56rem; color: rgba(255,255,255,0.32); text-transform: uppercase; letter-spacing: 0.03em; white-space: nowrap; }
- .asc-hire-step.done .dot { background: #4ade80; }
+ .asc-hire-step.done .dot { background: var(--success); }
.asc-hire-step.done .lbl { color: rgba(255,255,255,0.5); }
.asc-hire-step.active .dot { background: #7ca0ff; box-shadow: 0 0 0 4px rgba(124,160,255,0.22); animation: asc-hire-pulse 1.3s ease-in-out infinite; }
.asc-hire-step.active .lbl { color: #cdd8ff; }
@@ -1911,7 +1911,7 @@
.asc-hire-coinrail .wallet { display: inline-flex; align-items: center; gap: 0.28rem; font-size: 0.68rem; color: rgba(255,255,255,0.6); white-space: nowrap; }
.asc-hire-coinrail .wallet .dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,0.35); }
.asc-hire-coinrail .wallet.from .dot { background: #f0b450; }
- .asc-hire-coinrail .wallet.to .dot { background: #4ade80; }
+ .asc-hire-coinrail .wallet.to .dot { background: var(--success); }
.asc-hire-coinrail .rail { position: relative; flex: 1; height: 2px; background: linear-gradient(90deg, rgba(240,180,80,0.4), rgba(74,222,128,0.4)); border-radius: 2px; }
.asc-hire-coinrail .coin {
position: absolute; top: 50%; left: 0; transform: translate(0,-50%);
@@ -1941,7 +1941,7 @@
.asc-hire-receipt.resolved { border-color: rgba(74,222,128,0.4); }
.asc-hire-receipt:hover, .asc-hire-receipt:focus-visible { transform: translateY(-1px); border-color: rgba(74,222,128,0.6); }
.asc-hire-receipt-head { display: flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; color: #d8ffe6; }
- .asc-hire-receipt-head .ico { color: #4ade80; }
+ .asc-hire-receipt-head .ico { color: var(--success); }
.asc-hire-receipt-tag { margin-left: auto; font-size: 0.58rem; letter-spacing: 0.06em; text-transform: uppercase; color: #8fe6b0; border: 1px solid rgba(74,222,128,0.3); border-radius: 5px; padding: 0.08rem 0.32rem; }
.asc-hire-receipt-summary { margin-top: 0.35rem; font-size: 0.72rem; color: rgba(255,255,255,0.6); }
.asc-hire-receipt-links { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.45rem; }
@@ -1961,13 +1961,13 @@
.asc-hire-result.amber { background: rgba(240,180,80,0.1); border: 1px solid rgba(240,180,80,0.3); }
.asc-hire-result.amber strong, .asc-hire-result.amber .ico { color: #f0b450; }
.asc-hire-result.red { background: rgba(248,113,113,0.1); border: 1px solid rgba(248,113,113,0.3); }
- .asc-hire-result.red strong, .asc-hire-result.red .ico { color: #f87171; }
+ .asc-hire-result.red strong, .asc-hire-result.red .ico { color: var(--danger); }
.asc-hire-history { display: flex; flex-direction: column; gap: 0.25rem; margin-top: 0.15rem; }
.asc-hire-hrow { display: flex; align-items: center; gap: 0.4rem; font-size: 0.68rem; padding: 0.25rem 0.35rem; border-radius: 7px; background: rgba(255,255,255,0.03); color: rgba(255,255,255,0.55); }
.asc-hire-hrow .t { width: 0.9rem; text-align: center; }
- .asc-hire-hrow.ok .t { color: #4ade80; }
+ .asc-hire-hrow.ok .t { color: var(--success); }
.asc-hire-hrow.amber .t { color: #f0b450; }
- .asc-hire-hrow.red .t { color: #f87171; }
+ .asc-hire-hrow.red .t { color: var(--danger); }
.asc-hire-hrow .m { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asc-hire-hrow .m code { color: rgba(255,255,255,0.45); }
.asc-hire-hrow .u { font-variant-numeric: tabular-nums; color: #d8ffe6; }
diff --git a/pages/agent-studio.html b/pages/agent-studio.html
index fd2c94f3b..076dceb97 100644
--- a/pages/agent-studio.html
+++ b/pages/agent-studio.html
@@ -99,8 +99,8 @@
width: 7px;
height: 7px;
border-radius: 50%;
- background: var(--success, #4ade80);
- box-shadow: 0 0 8px var(--success, #4ade80);
+ background: var(--success, var(--success));
+ box-shadow: 0 0 8px var(--success, var(--success));
animation: studio-pulse 2s ease-in-out infinite;
}
@keyframes studio-pulse {
@@ -177,9 +177,9 @@
transition: color var(--duration-fast) var(--ease-standard);
white-space: nowrap;
}
- .studio-save[data-state='pending'] { color: var(--warn, #fbbf24); }
- .studio-save[data-state='saved'] { color: var(--success, #4ade80); }
- .studio-save[data-state='error'] { color: var(--danger, #f87171); }
+ .studio-save[data-state='pending'] { color: var(--warn, var(--warn)); }
+ .studio-save[data-state='saved'] { color: var(--success, var(--success)); }
+ .studio-save[data-state='error'] { color: var(--danger, var(--danger)); }
/* Tabs */
.studio-tabs {
diff --git a/pages/animations.html b/pages/animations.html
index 75b144515..3be93bd8f 100644
--- a/pages/animations.html
+++ b/pages/animations.html
@@ -71,7 +71,7 @@
width: 6px;
height: 6px;
border-radius: 50%;
- background: #4ade80;
+ background: var(--success);
animation: ag-pulse 2.4s ease-out infinite;
}
@keyframes ag-pulse {
@@ -322,7 +322,7 @@
color: var(--text-2, #a1a1aa);
}
.ag-badge--loop { color: #34d399; background: rgba(52,211,153,0.12); }
- .ag-badge--once { color: #fbbf24; background: rgba(251,191,36,0.12); }
+ .ag-badge--once { color: var(--warn); background: rgba(251,191,36,0.12); }
.ag-badge--price { color: #60a5fa; background: rgba(96,165,250,0.12); }
.ag-badge--source { color: var(--text-3, #71717a); background: rgba(255,255,255,0.05); }
.ag-card-tags {
diff --git a/pages/avatar-edit.html b/pages/avatar-edit.html
index 89cbd9c18..182491cb2 100644
--- a/pages/avatar-edit.html
+++ b/pages/avatar-edit.html
@@ -687,8 +687,8 @@
.ae-rig-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); }
.ae-rig-pill.ok { color: #34d399; border-color: rgba(52, 211, 153, 0.35); }
.ae-rig-pill.ok .ae-rig-dot { background: #34d399; box-shadow: 0 0 8px rgba(52, 211, 153, 0.6); }
- .ae-rig-pill.warn { color: #fbbf24; border-color: rgba(251, 191, 36, 0.35); }
- .ae-rig-pill.warn .ae-rig-dot { background: #fbbf24; }
+ .ae-rig-pill.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
+ .ae-rig-pill.warn .ae-rig-dot { background: var(--warn); }
.ae-rig-pill.unknown { color: var(--text-3); }
.ae-rig-detail { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text-2); }
.ae-rig-action { display: flex; flex-direction: column; gap: 10px; }
diff --git a/pages/avatar-engines.html b/pages/avatar-engines.html
index 0ccdff5a7..9f3fa3b39 100644
--- a/pages/avatar-engines.html
+++ b/pages/avatar-engines.html
@@ -64,7 +64,7 @@
width: 6px;
height: 6px;
border-radius: 50%;
- background: #4ade80;
+ background: var(--success);
animation: ae-pulse 2.4s ease-out infinite;
}
@keyframes ae-pulse {
@@ -262,7 +262,7 @@
flex: 0 0 auto; font-size: 10px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
padding: 3px 8px; border-radius: 6px;
}
- .ae-int-badge[data-tone='live'], .ae-int-badge[data-tone='forge'] { background: rgba(74,222,128,0.14); color: #4ade80; }
+ .ae-int-badge[data-tone='live'], .ae-int-badge[data-tone='forge'] { background: rgba(74,222,128,0.14); color: var(--success); }
.ae-int-badge[data-tone='splat'] { background: rgba(124,93,243,0.16); color: #c4b5fd; }
.ae-int-badge[data-tone='interop'] { background: rgba(234,179,8,0.14); color: #fcd34d; }
.ae-int-badge[data-tone='reference'] { background: rgba(255,255,255,0.06); color: var(--text-3, #8a8a8a); }
diff --git a/pages/club.html b/pages/club.html
index 51c4cd4ef..42bdd68d4 100644
--- a/pages/club.html
+++ b/pages/club.html
@@ -52,9 +52,7 @@
--accent: #ff3bd6;
--accent-2: #4ad6ff;
--accent-3: #ff8a3b;
- --ok: #4ade80;
- --warn: #fbbf24;
- --danger: #f87171;
+ --ok: var(--success);
}
* { box-sizing: border-box; }
html, body {
diff --git a/pages/coin-intel.html b/pages/coin-intel.html
index 0ba943492..0d737025f 100644
--- a/pages/coin-intel.html
+++ b/pages/coin-intel.html
@@ -26,12 +26,12 @@
--ci-faint: #5c6273;
--ci-accent: #8b5cf6;
--ci-success: #34d399;
- --ci-warn: #fbbf24;
- --ci-danger: #f87171;
+ --ci-warn: var(--warn);
+ --ci-danger: var(--danger);
--ci-neutral: #818cf8;
/* category palette */
- --cat-meme: #fbbf24; --cat-ai: #22d3ee; --cat-tech: #818cf8;
- --cat-culture: #f472b6; --cat-community: #34d399; --cat-political: #f87171;
+ --cat-meme: var(--warn); --cat-ai: #22d3ee; --cat-tech: #818cf8;
+ --cat-culture: #f472b6; --cat-community: #34d399; --cat-political: var(--danger);
--cat-news: #fb923c; --cat-animal: #a3e635; --cat-celebrity: #c084fc;
--cat-utility: #94a3b8; --cat-unknown: #64748b;
}
diff --git a/pages/create-agent.html b/pages/create-agent.html
index 06504482e..97701fd37 100644
--- a/pages/create-agent.html
+++ b/pages/create-agent.html
@@ -61,8 +61,8 @@
--text: #e8e8e8;
--muted: #888888;
--faint: rgba(255, 255, 255, 0.45);
- --ok: #4ade80;
- --err: #f87171;
+ --ok: var(--success);
+ --err: var(--danger);
--font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
--header-h: 3.5rem;
}
diff --git a/pages/create.html b/pages/create.html
index 91d7db2a4..71cc3d75a 100644
--- a/pages/create.html
+++ b/pages/create.html
@@ -981,7 +981,7 @@
width: 6px;
height: 6px;
border-radius: 50%;
- background: #4ade80;
+ background: var(--success);
flex-shrink: 0;
}
.nav-user:hover {
diff --git a/pages/create/video.html b/pages/create/video.html
index 82c9c38a6..a9b4785bc 100644
--- a/pages/create/video.html
+++ b/pages/create/video.html
@@ -187,7 +187,7 @@
width: 6px;
height: 6px;
border-radius: 50%;
- background: #4ade80;
+ background: var(--success);
flex-shrink: 0;
}
#btn-wallet-signin {
diff --git a/pages/events/build-3d-agents-live.html b/pages/events/build-3d-agents-live.html
index d2652da40..62d0c24af 100644
--- a/pages/events/build-3d-agents-live.html
+++ b/pages/events/build-3d-agents-live.html
@@ -87,7 +87,7 @@
border:1px solid var(--stroke, #2a2a2a);border-radius:var(--radius-pill, 999px);
padding:6px 12px;background:var(--surface-1, rgba(255,255,255,.03));
}
- .eyebrow .dot{width:6px;height:6px;border-radius:50%;background:var(--success, #4ade80);box-shadow:0 0 8px var(--success, #4ade80)}
+ .eyebrow .dot{width:6px;height:6px;border-radius:50%;background:var(--success, var(--success));box-shadow:0 0 8px var(--success, var(--success))}
h1{
font-family:var(--font-display, 'Space Grotesk', sans-serif);
font-size:clamp(2.1rem,5vw,3.4rem);line-height:1.05;font-weight:var(--weight-bold, 700);
@@ -163,8 +163,8 @@
}
.rsvp input[type=email]:focus{outline:none;border-color:var(--stroke-strong, #3e3e3e)}
.rsvp .msg{margin-top:var(--space-md, 16px);font-size:var(--text-ui, 14px);min-height:1.2em}
- .rsvp .msg.is-success{color:var(--success, #4ade80)}
- .rsvp .msg.is-error{color:var(--danger, #f87171)}
+ .rsvp .msg.is-success{color:var(--success, var(--success))}
+ .rsvp .msg.is-error{color:var(--danger, var(--danger))}
.rsvp .fine{margin-top:var(--space-sm, 12px);font-size:var(--text-2xs, 11px);color:var(--ink-faint, #5c5c66)}
/* ── reveal ── */
diff --git a/pages/features.html b/pages/features.html
index 126657af1..76b184cb9 100644
--- a/pages/features.html
+++ b/pages/features.html
@@ -299,7 +299,7 @@
}
.feat-walk-demo-card-status--copied {
- color: #4ade80;
+ color: var(--success);
}
@media screen and (max-width: 900px) {
diff --git a/pages/features/studio.html b/pages/features/studio.html
index 2cfbaaaa8..b2a671f2b 100644
--- a/pages/features/studio.html
+++ b/pages/features/studio.html
@@ -64,7 +64,7 @@
}
.studio-code-block .tok-tag { color: #7dd3fc; }
.studio-code-block .tok-attr { color: #86efac; }
- .studio-code-block .tok-str { color: #fbbf24; }
+ .studio-code-block .tok-str { color: var(--warn); }
.studio-code-block .tok-comment { color: #4b5563; font-style: italic; }
</style>
diff --git a/pages/forge-studio.html b/pages/forge-studio.html
index 192caee0f..00a16f616 100644
--- a/pages/forge-studio.html
+++ b/pages/forge-studio.html
@@ -223,7 +223,7 @@
line-height: 1.5;
vertical-align: 0.08em;
/* Dark theme is the default — a bright mint reads on the dark button. */
- color: #4ade80;
+ color: var(--success);
background: rgba(34, 197, 94, 0.14);
border: 1px solid rgba(74, 222, 128, 0.38);
}
@@ -257,7 +257,7 @@
font-size: 0.85em;
font-weight: 700;
letter-spacing: 0.04em;
- color: #4ade80;
+ color: var(--success);
background: rgba(34, 197, 94, 0.14);
border: 1px solid rgba(74, 222, 128, 0.38);
}
@@ -2698,7 +2698,7 @@
--muted: #888888;
--accent: #ffffff;
--accent-ink: #000000;
- --danger: #f87171;
+ --danger: var(--danger);
--danger-dim: #4a1a1a;
max-width: 760px;
margin: 0 auto;
diff --git a/pages/forge.html b/pages/forge.html
index b32dfad73..fdd8588b6 100644
--- a/pages/forge.html
+++ b/pages/forge.html
@@ -223,7 +223,7 @@
line-height: 1.5;
vertical-align: 0.08em;
/* Dark theme is the default — a bright mint reads on the dark button. */
- color: #4ade80;
+ color: var(--success);
background: rgba(34, 197, 94, 0.14);
border: 1px solid rgba(74, 222, 128, 0.38);
}
@@ -257,7 +257,7 @@
font-size: 0.85em;
font-weight: 700;
letter-spacing: 0.04em;
- color: #4ade80;
+ color: var(--success);
background: rgba(34, 197, 94, 0.14);
border: 1px solid rgba(74, 222, 128, 0.38);
}
diff --git a/pages/home.html b/pages/home.html
index eaab79d9a..2ba5c8e65 100644
--- a/pages/home.html
+++ b/pages/home.html
@@ -2874,8 +2874,8 @@
box-shadow: 0 0 0 0 rgba(52,211,153,0.5); flex: none;
}
#home-sniper .snipe-dot.live { background: var(--success); animation: snipe-pulse 2s ease-out infinite; }
- #home-sniper .snipe-dot.degraded { background: #fbbf24; }
- #home-sniper .snipe-dot.down { background: #f87171; }
+ #home-sniper .snipe-dot.degraded { background: var(--warn); }
+ #home-sniper .snipe-dot.down { background: var(--danger); }
@keyframes snipe-pulse {
0% { box-shadow: 0 0 0 0 rgba(52,211,153,0.5); }
70% { box-shadow: 0 0 0 7px rgba(52,211,153,0); }
@@ -2978,7 +2978,7 @@
}
#home-sniper .snipe-rpnl { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
#home-sniper .snipe-rpnl.up { color: var(--success); }
- #home-sniper .snipe-rpnl.down { color: #f87171; }
+ #home-sniper .snipe-rpnl.down { color: var(--danger); }
#home-sniper .snipe-rpnl.flat { color: var(--text-3); }
#home-sniper .snipe-tape-msg { padding: 40px 16px; text-align: center; color: var(--text-3); font-size: 13px; line-height: 1.5; }
#home-sniper .snipe-skel {
diff --git a/pages/integrations.html b/pages/integrations.html
index 9446aa52e..dbd1cc365 100644
--- a/pages/integrations.html
+++ b/pages/integrations.html
@@ -49,10 +49,10 @@
--text-3: #52525b;
--accent: #fff;
--accent-ink: #000;
- --green: #4ade80;
+ --green: var(--success);
--blue: #60a5fa;
--purple: #a78bfa;
- --amber: #fbbf24;
+ --amber: var(--warn);
--pink: #f472b6;
--radius: 12px;
--radius-lg: 16px;
@@ -611,7 +611,7 @@
pre.code-block .a { color: #c4b5fd; }
pre.code-block .s { color: #86efac; }
pre.code-block .c { color: #52525b; }
- pre.code-block .p { color: #fbbf24; }
+ pre.code-block .p { color: var(--warn); }
/* ── Live demo modal ──────────────────────────────── */
.modal-backdrop {
diff --git a/pages/integrity.html b/pages/integrity.html
index 1f193f622..f55b76e91 100644
--- a/pages/integrity.html
+++ b/pages/integrity.html
@@ -30,7 +30,7 @@
.intg-shell { max-width: 880px; margin: 0 auto; padding: clamp(20px, 5vw, 44px) 18px 80px; }
.intg-hero { margin-bottom: 26px; }
.intg-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-dim, #888); margin: 0 0 10px; }
- .intg-kicker::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--success, #4ade80); box-shadow: 0 0 8px color-mix(in srgb, var(--success,#4ade80) 60%, transparent); }
+ .intg-kicker::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--success, var(--success)); box-shadow: 0 0 8px color-mix(in srgb, var(--success,var(--success)) 60%, transparent); }
.intg-title { font-family: var(--font-display, system-ui); font-size: clamp(1.8rem, 5vw, 2.6rem); font-weight: 700; color: var(--ink-bright, #fff); margin: 0 0 10px; line-height: 1.08; }
.intg-sub { color: var(--ink-dim, #888); font-size: 1rem; line-height: 1.6; margin: 0; max-width: 64ch; }
.intg-sub a { color: var(--ink, #e8e8e8); }
@@ -38,9 +38,9 @@
.intg-status { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.intg-seal { width: 52px; height: 52px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 24px; background: var(--surface-3, rgba(255,255,255,.08)); }
.intg-status.is-verified { }
- .intg-status.is-verified .intg-seal { background: color-mix(in srgb, var(--success,#4ade80) 18%, transparent); color: var(--success, #4ade80); }
- .intg-status.is-failed .intg-seal { background: color-mix(in srgb, var(--danger,#f87171) 18%, transparent); color: var(--danger, #f87171); }
- .intg-status.is-pending .intg-seal { background: color-mix(in srgb, var(--warn,#fbbf24) 18%, transparent); color: var(--warn, #fbbf24); }
+ .intg-status.is-verified .intg-seal { background: color-mix(in srgb, var(--success,var(--success)) 18%, transparent); color: var(--success, var(--success)); }
+ .intg-status.is-failed .intg-seal { background: color-mix(in srgb, var(--danger,var(--danger)) 18%, transparent); color: var(--danger, var(--danger)); }
+ .intg-status.is-pending .intg-seal { background: color-mix(in srgb, var(--warn,var(--warn)) 18%, transparent); color: var(--warn, var(--warn)); }
.intg-status-main { min-width: 0; flex: 1; }
.intg-status-title { font-size: 1.2rem; font-weight: 700; color: var(--ink-bright, #fff); font-family: var(--font-display, system-ui); line-height: 1.15; }
.intg-status-sub { font-size: .85rem; color: var(--ink-dim, #888); margin-top: 4px; line-height: 1.5; }
@@ -50,7 +50,7 @@
.intg-stat-k { font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-dim, #888); }
.intg-stat-v { font-family: var(--font-mono, ui-monospace, monospace); font-size: 1.05rem; color: var(--ink-bright, #fff); margin-top: 5px; word-break: break-all; }
.intg-stat-v a { color: inherit; }
- .intg-spin { width: 20px; height: 20px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--warn,#fbbf24) 30%, transparent); border-top-color: var(--warn,#fbbf24); animation: intg-spin 0.7s linear infinite; }
+ .intg-spin { width: 20px; height: 20px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--warn,var(--warn)) 30%, transparent); border-top-color: var(--warn,var(--warn)); animation: intg-spin 0.7s linear infinite; }
@keyframes intg-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .intg-spin { animation: none; } }
.intg-h2 { font-family: var(--font-display, system-ui); font-size: 1.1rem; font-weight: 600; color: var(--ink-bright, #fff); margin: 0 0 4px; }
@@ -63,9 +63,9 @@
.intg-table tr:last-child td { border-bottom: none; }
.intg-table a { color: var(--ink, #c8c8c8); }
.intg-pill { display: inline-block; font-size: .66rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
- .intg-pill.anchored { color: var(--success, #4ade80); background: color-mix(in srgb, var(--success,#4ade80) 12%, transparent); }
- .intg-pill.pending { color: var(--warn, #fbbf24); background: color-mix(in srgb, var(--warn,#fbbf24) 12%, transparent); }
- .intg-pill.failed { color: var(--danger, #f87171); background: color-mix(in srgb, var(--danger,#f87171) 12%, transparent); }
+ .intg-pill.anchored { color: var(--success, var(--success)); background: color-mix(in srgb, var(--success,var(--success)) 12%, transparent); }
+ .intg-pill.pending { color: var(--warn, var(--warn)); background: color-mix(in srgb, var(--warn,var(--warn)) 12%, transparent); }
+ .intg-pill.failed { color: var(--danger, var(--danger)); background: color-mix(in srgb, var(--danger,var(--danger)) 12%, transparent); }
.intg-btn { appearance: none; font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; color: var(--ink, #e8e8e8); background: transparent; border: 1px solid var(--stroke, rgba(255,255,255,.14)); border-radius: var(--radius-md, 10px); padding: 9px 16px; text-decoration: none; display: inline-flex; align-items: center; gap: 7px; transition: background var(--duration-fast,140ms); }
.intg-btn:hover { background: var(--surface-2, rgba(255,255,255,.05)); }
.intg-btn:focus-visible { outline: 2px solid var(--focus-ring-color, #fff); outline-offset: 2px; }
@@ -74,7 +74,7 @@
@media (prefers-reduced-motion: reduce) { .intg-skel span { animation: none; } }
.intg-explain { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-top: 6px; }
.intg-step { padding: 14px; border: 1px solid var(--stroke, rgba(255,255,255,.08)); border-radius: var(--radius-md, 10px); background: var(--surface-1, rgba(255,255,255,.03)); }
- .intg-step-n { font-family: var(--font-mono, ui-monospace, monospace); font-size: .7rem; color: var(--success, #4ade80); }
+ .intg-step-n { font-family: var(--font-mono, ui-monospace, monospace); font-size: .7rem; color: var(--success, var(--success)); }
.intg-step-t { color: var(--ink-bright, #fff); font-weight: 600; font-size: .9rem; margin: 4px 0; }
.intg-step-d { color: var(--ink-dim, #888); font-size: .82rem; line-height: 1.5; }
</style>
diff --git a/pages/irl-privacy.html b/pages/irl-privacy.html
index 147d2a6fe..32e42e949 100644
--- a/pages/irl-privacy.html
+++ b/pages/irl-privacy.html
@@ -110,8 +110,8 @@
color: #7ec8e3;
}
.ip-card .ip-ic svg { width: 21px; height: 21px; }
- .ip-card.is-deny .ip-ic { background: rgba(248, 113, 113, 0.10); color: #f87171; }
- .ip-card.is-allow .ip-ic { background: rgba(74, 222, 128, 0.10); color: #4ade80; }
+ .ip-card.is-deny .ip-ic { background: rgba(248, 113, 113, 0.10); color: var(--danger); }
+ .ip-card.is-allow .ip-ic { background: rgba(74, 222, 128, 0.10); color: var(--success); }
.ip-card h3 {
font-size: 15px; font-weight: var(--weight-semibold);
color: var(--ink, #eef1f7); margin: 1px 0 4px;
@@ -136,8 +136,8 @@
letter-spacing: 0.04em; text-transform: uppercase;
margin: 0 0 12px;
}
- .ip-col.is-yes h3 { color: #4ade80; }
- .ip-col.is-no h3 { color: #f87171; }
+ .ip-col.is-yes h3 { color: var(--success); }
+ .ip-col.is-no h3 { color: var(--danger); }
.ip-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ip-col li {
font-size: var(--text-md); line-height: 1.5;
@@ -148,8 +148,8 @@
position: absolute; left: 0; top: 0;
font-weight: 700;
}
- .ip-col.is-yes li::before { content: "✓"; color: #4ade80; }
- .ip-col.is-no li::before { content: "✕"; color: #f87171; }
+ .ip-col.is-yes li::before { content: "✓"; color: var(--success); }
+ .ip-col.is-no li::before { content: "✕"; color: var(--danger); }
/* ── Sensor rows ── */
.ip-sensors { display: flex; flex-direction: column; gap: 12px; }
@@ -174,7 +174,7 @@
display: inline-block; margin-top: 8px;
font: var(--weight-medium) 11px/1 var(--font-body);
letter-spacing: 0.04em;
- color: #4ade80;
+ color: var(--success);
background: rgba(74, 222, 128, 0.10);
border: 1px solid rgba(74, 222, 128, 0.22);
border-radius: var(--radius-pill);
diff --git a/pages/labs.html b/pages/labs.html
index 41896c79e..48f696dc4 100644
--- a/pages/labs.html
+++ b/pages/labs.html
@@ -268,16 +268,16 @@
}
.gem-status[data-state="live"] {
background: rgba(74,222,128,.1);
- color: var(--success, #4ade80);
+ color: var(--success, var(--success));
border: 1px solid rgba(74,222,128,.2);
}
- .gem-status[data-state="live"]::before { background: var(--success, #4ade80); }
+ .gem-status[data-state="live"]::before { background: var(--success, var(--success)); }
.gem-status[data-state="offline"] {
background: rgba(248,113,113,.1);
- color: var(--danger, #f87171);
+ color: var(--danger, var(--danger));
border: 1px solid rgba(248,113,113,.2);
}
- .gem-status[data-state="offline"]::before { background: var(--danger, #f87171); }
+ .gem-status[data-state="offline"]::before { background: var(--danger, var(--danger)); }
.gem-status[data-state="checking"] {
background: var(--surface-2, rgba(255,255,255,.05));
color: var(--ink-dim, #888);
diff --git a/pages/leaderboard.html b/pages/leaderboard.html
index 58561833e..760fafa7e 100644
--- a/pages/leaderboard.html
+++ b/pages/leaderboard.html
@@ -47,18 +47,18 @@
gap: 8px;
margin: 0 0 12px;
padding: 7px 12px;
- border: 1px solid color-mix(in srgb, #fbbf24 36%, var(--line));
- background: color-mix(in srgb, #fbbf24 9%, transparent);
+ border: 1px solid color-mix(in srgb, var(--warn) 36%, var(--line));
+ background: color-mix(in srgb, var(--warn) 9%, transparent);
border-radius: var(--r, 10px);
font: 600 12px/1.3 var(--mono);
- color: #fbbf24;
+ color: var(--warn);
animation: lb-stale-in .2s ease both;
}
.lb-stale-dot {
width: 7px;
height: 7px;
border-radius: 50%;
- background: #fbbf24;
+ background: var(--warn);
flex: none;
box-shadow: 0 0 0 0 rgba(251, 191, 36, .6);
animation: lb-stale-pulse 1.6s ease infinite;
diff --git a/pages/marketplace-walk.html b/pages/marketplace-walk.html
index c073419af..cce3b4b47 100644
--- a/pages/marketplace-walk.html
+++ b/pages/marketplace-walk.html
@@ -85,7 +85,7 @@
--text: #fafafa;
--text-2: #a1a1aa;
--accent: #ffffff;
- --danger: #f87171;
+ --danger: var(--danger);
}
html, body {
@@ -395,7 +395,7 @@
}
#walk-online[data-status="connecting"] .dot,
#walk-online[data-status="offline"] .dot {
- background: #fbbf24;
+ background: var(--warn);
}
#walk-online[data-status="unavailable"] {
cursor: default;
@@ -480,7 +480,7 @@
width: 8px;
height: 8px;
border-radius: 50%;
- background: #f87171;
+ background: var(--danger);
box-shadow: 0 0 0 0 rgba(248, 113, 113, 0.6);
animation: walk-cta-pulse 1.6s infinite;
}
@@ -787,7 +787,7 @@
/* ── Recording UI ──────────────────────────────────────────── */
#walk-record-btn .dot { transition: background 0.15s ease, box-shadow 0.15s ease; }
#walk-record-btn[data-recording="true"] .dot {
- background: #f87171;
+ background: var(--danger);
box-shadow: 0 0 8px rgba(248, 113, 113, 0.8);
animation: walk-rec-pulse 0.9s infinite;
}
diff --git a/pages/marketplace.html b/pages/marketplace.html
index f9fd7419b..407bcb8ea 100644
--- a/pages/marketplace.html
+++ b/pages/marketplace.html
@@ -2417,7 +2417,7 @@
z-index: 1;
}
.mkt-top-pnl.pos { color: #34d399; }
- .mkt-top-pnl.neg { color: #f87171; }
+ .mkt-top-pnl.neg { color: var(--danger); }
/* Skeleton states */
.mkt-top-card.mkt-skel .mkt-top-av-wrap,
.mkt-top-card.mkt-skel .mkt-top-name,
diff --git a/pages/mocap-studio.html b/pages/mocap-studio.html
index fb07cd348..8087df5cf 100644
--- a/pages/mocap-studio.html
+++ b/pages/mocap-studio.html
@@ -48,7 +48,7 @@
--accent-glow: rgba(255, 255, 255, 0.15);
--rec: #f43f5e;
--rec-glow: rgba(244, 63, 94, 0.4);
- --ok: #4ade80;
+ --ok: var(--success);
--font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
--font-body: "Space Grotesk", "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
--font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
diff --git a/pages/partners.html b/pages/partners.html
index 20dd9ef37..acdd1667a 100644
--- a/pages/partners.html
+++ b/pages/partners.html
@@ -49,10 +49,10 @@
--text-3: #52525b;
--accent: #fff;
--accent-ink: #000;
- --green: #4ade80;
+ --green: var(--success);
--blue: #60a5fa;
--purple: #a78bfa;
- --amber: #fbbf24;
+ --amber: var(--warn);
--pink: #f472b6;
--radius: 12px;
--radius-lg: 16px;
diff --git a/pages/payments.html b/pages/payments.html
index bd5283351..437fefa91 100644
--- a/pages/payments.html
+++ b/pages/payments.html
@@ -49,7 +49,7 @@
.pw-stat .val.c-green { color: #2fbf71; }
.pw-stat .val.c-purple { color: #a78bfa; }
.pw-stat .val.c-blue { color: #7dd3fc; }
- .pw-stat .val.c-amber { color: #fbbf24; }
+ .pw-stat .val.c-amber { color: var(--warn); }
.pw-stat .sub { font-size: 11.5px; color: rgba(255,255,255,0.35); margin-top: 0.35rem; }
/* Skeleton loader */
@@ -77,9 +77,9 @@
.sc-head { display: flex; align-items: center; gap: 0.875rem; padding: 1rem 1.125rem; cursor: pointer; user-select: none; }
.sc-badge { font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: 99px; text-transform: uppercase; letter-spacing: 0.06em; flex-shrink: 0; }
.sc-badge.active { background: rgba(47,191,113,0.15); color: #2fbf71; border: 1px solid rgba(47,191,113,0.28); }
- .sc-badge.exhausted { background: rgba(251,191,36,0.12); color: #fbbf24; border: 1px solid rgba(251,191,36,0.25); }
+ .sc-badge.exhausted { background: rgba(251,191,36,0.12); color: var(--warn); border: 1px solid rgba(251,191,36,0.25); }
.sc-badge.expired { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.4); border: 1px solid rgba(255,255,255,0.1); }
- .sc-badge.cancelled { background: rgba(248,113,113,0.1); color: #f87171; border: 1px solid rgba(248,113,113,0.2); }
+ .sc-badge.cancelled { background: rgba(248,113,113,0.1); color: var(--danger); border: 1px solid rgba(248,113,113,0.2); }
.sc-net { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 6px; text-transform: uppercase; letter-spacing: 0.05em; flex-shrink: 0; }
.sc-net.sol { background: rgba(153,69,255,0.12); color: #c084fc; border: 1px solid rgba(153,69,255,0.2); }
.sc-label { font-weight: 600; font-size: 14.5px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@@ -87,8 +87,8 @@
.sc-amounts { display: flex; align-items: baseline; gap: 4px; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.sc-remain { font-size: 15.5px; font-weight: 700; }
.sc-remain.g { color: #2fbf71; }
- .sc-remain.y { color: #fbbf24; }
- .sc-remain.r { color: #f87171; }
+ .sc-remain.y { color: var(--warn); }
+ .sc-remain.r { color: var(--danger); }
.sc-remain.d { color: rgba(255,255,255,0.3); }
.sc-total { font-size: 13px; color: rgba(255,255,255,0.35); }
.sc-chevron { font-size: 16px; color: rgba(255,255,255,0.25); transition: transform .2s; flex-shrink: 0; }
@@ -98,13 +98,13 @@
.sc-bar { padding: 0 1.125rem 1rem; display: flex; align-items: center; gap: 0.75rem; }
.sc-bar-track { flex: 1; height: 4px; border-radius: 99px; background: rgba(255,255,255,0.07); overflow: hidden; }
.sc-bar-fill { height: 100%; border-radius: 99px; transition: width .5s cubic-bezier(0.16,1,0.3,1); }
- .sc-bar-fill.g { background: linear-gradient(90deg, #2fbf71, #4ade80); }
+ .sc-bar-fill.g { background: linear-gradient(90deg, #2fbf71, var(--success)); }
.sc-bar-fill.y { background: linear-gradient(90deg, #f59e0b, #fcd34d); }
- .sc-bar-fill.r { background: linear-gradient(90deg, #ef4444, #f87171); }
+ .sc-bar-fill.r { background: linear-gradient(90deg, #ef4444, var(--danger)); }
.sc-bar-pct { font-size: 11.5px; color: rgba(255,255,255,0.35); font-variant-numeric: tabular-nums; min-width: 32px; text-align: right; }
.sc-expiry { font-size: 11px; color: rgba(255,255,255,0.3); white-space: nowrap; }
- .sc-expiry.warn { color: #fbbf24; }
- .sc-expiry.danger { color: #f87171; }
+ .sc-expiry.warn { color: var(--warn); }
+ .sc-expiry.danger { color: var(--danger); }
/* Expanded detail */
.sc-body { display: none; padding: 1.25rem 1.125rem; border-top: 1px solid rgba(255,255,255,0.07); }
@@ -123,7 +123,7 @@
/* Action bar */
.sc-actions { display: flex; gap: 0.625rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.sc-act { font: inherit; font-size: 12px; font-weight: 600; padding: 6px 13px; border-radius: 8px; cursor: pointer; transition: opacity .15s, background .15s; display: inline-flex; align-items: center; gap: 5px; border: 1px solid transparent; }
- .sc-act.danger { background: rgba(248,113,113,0.1); border-color: rgba(248,113,113,0.22); color: #f87171; }
+ .sc-act.danger { background: rgba(248,113,113,0.1); border-color: rgba(248,113,113,0.22); color: var(--danger); }
.sc-act.danger:hover { opacity: 0.8; }
.sc-act.copy { background: rgba(167,139,250,0.1); border-color: rgba(167,139,250,0.22); color: #c4b5fd; }
.sc-act.copy:hover { background: rgba(167,139,250,0.18); }
@@ -145,8 +145,8 @@
.exec-table tr:last-child td { border-bottom: none; }
.exec-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.exec-dot.settled { background: #2fbf71; }
- .exec-dot.failed { background: #f87171; }
- .exec-dot.pending { background: #fbbf24; }
+ .exec-dot.failed { background: var(--danger); }
+ .exec-dot.pending { background: var(--warn); }
.exec-url { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgba(255,255,255,0.6); }
.exec-tx-link { color: #818cf8; text-decoration: none; font-family: monospace; font-size: 11px; }
.exec-tx-link:hover { text-decoration: underline; }
diff --git a/pages/playground.html b/pages/playground.html
index 5e2315477..5e5624cb6 100644
--- a/pages/playground.html
+++ b/pages/playground.html
@@ -36,7 +36,7 @@
--accent: #ffffff;
--accent-dim: rgba(255, 255, 255, 0.1);
--success: #e8e8e8;
- --err: #f87171;
+ --err: var(--danger);
}
html,
diff --git a/pages/pose.html b/pages/pose.html
index 9a67f7076..25620b89e 100644
--- a/pages/pose.html
+++ b/pages/pose.html
@@ -56,7 +56,7 @@
--text-3: #71717a;
--accent: #ffffff;
--accent-2: #cccccc;
- --danger: #f87171;
+ --danger: var(--danger);
--ok: #ffffff;
--nav-h: 69px;
}
diff --git a/pages/profile.html b/pages/profile.html
index 04cbe8f0a..9d03b3727 100644
--- a/pages/profile.html
+++ b/pages/profile.html
@@ -326,7 +326,7 @@
}
.profile-copy-btn.copied {
- color: #4ade80;
+ color: var(--success);
border-color: rgba(74, 222, 128, 0.3);
}
@@ -963,7 +963,7 @@
color: #fff;
background: rgba(255, 255, 255, 0.08);
}
- .up-wallet-copy.copied { color: #4ade80; }
+ .up-wallet-copy.copied { color: var(--success); }
/* ── NFT grid ────────────────────────────────────────────────────── */
.up-nft-grid {
diff --git a/pages/proof.html b/pages/proof.html
index a37cd48f8..fecb26910 100644
--- a/pages/proof.html
+++ b/pages/proof.html
@@ -21,7 +21,7 @@
.poc-shell { max-width: 760px; margin: 0 auto; padding: clamp(20px, 5vw, 44px) 18px 80px; }
.poc-hero { margin-bottom: 22px; }
.poc-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-dim, #888); margin: 0 0 10px; }
- .poc-kicker::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--success, #4ade80); box-shadow: 0 0 8px color-mix(in srgb, var(--success,#4ade80) 60%, transparent); }
+ .poc-kicker::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--success, var(--success)); box-shadow: 0 0 8px color-mix(in srgb, var(--success,var(--success)) 60%, transparent); }
.poc-title { font-family: var(--font-display, system-ui); font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 700; color: var(--ink-bright, #fff); margin: 0 0 8px; line-height: 1.1; }
.poc-sub { color: var(--ink-dim, #888); font-size: .95rem; line-height: 1.6; margin: 0; max-width: 60ch; }
.poc-sub a { color: var(--ink, #e8e8e8); }
diff --git a/pages/pump-visualizer.html b/pages/pump-visualizer.html
index 95eb306d1..c9ae0bccb 100644
--- a/pages/pump-visualizer.html
+++ b/pages/pump-visualizer.html
@@ -25,7 +25,7 @@
--vz-muted: #888888;
--vz-accent: #ffffff;
--vz-green: #34d399;
- --vz-red: #f87171;
+ --vz-red: var(--danger);
}
html, body { background: var(--vz-bg); color: var(--vz-text); overflow: hidden; height: 100%; }
body { margin: 0; }
diff --git a/pages/smart-money.html b/pages/smart-money.html
index 528051e97..c71c11641 100644
--- a/pages/smart-money.html
+++ b/pages/smart-money.html
@@ -24,7 +24,7 @@
:root {
--bg: #06070d; --panel: rgba(14,16,24,0.72); --panel-solid: #0d0f17; --line: rgba(255,255,255,0.09);
--ink: #e9edf6; --muted: #8b93a7; --faint: rgba(255,255,255,0.45);
- --cyan: #6ee7ff; --violet: #9a7bff; --gold: #fbbf24; --up: #34d399; --down: #f87171;
+ --cyan: #6ee7ff; --violet: #9a7bff; --gold: var(--warn); --up: #34d399; --down: var(--danger);
--r: 16px; --r-sm: 11px;
--mono: ui-monospace, "JetBrains Mono", SFMono-Regular, Menlo, monospace;
--shadow: 0 18px 50px -22px rgba(0,0,0,0.85), 0 1px 0 rgba(255,255,255,0.05) inset;
diff --git a/pages/temporary.html b/pages/temporary.html
index e153d0efd..674e64e5f 100644
--- a/pages/temporary.html
+++ b/pages/temporary.html
@@ -72,7 +72,7 @@
--text: #fafafa;
--text-2: #a1a1aa;
--accent: #ffffff;
- --danger: #f87171;
+ --danger: var(--danger);
}
html, body {
@@ -382,7 +382,7 @@
}
#walk-online[data-status="connecting"] .dot,
#walk-online[data-status="offline"] .dot {
- background: #fbbf24;
+ background: var(--warn);
}
#walk-online[data-status="unavailable"] {
cursor: default;
@@ -467,7 +467,7 @@
width: 8px;
height: 8px;
border-radius: 50%;
- background: #f87171;
+ background: var(--danger);
box-shadow: 0 0 0 0 rgba(248, 113, 113, 0.6);
animation: walk-cta-pulse 1.6s infinite;
}
@@ -774,7 +774,7 @@
/* ── Recording UI ──────────────────────────────────────────── */
#walk-record-btn .dot { transition: background 0.15s ease, box-shadow 0.15s ease; }
#walk-record-btn[data-recording="true"] .dot {
- background: #f87171;
+ background: var(--danger);
box-shadow: 0 0 8px rgba(248, 113, 113, 0.8);
animation: walk-rec-pulse 0.9s infinite;
}
diff --git a/pages/trades.html b/pages/trades.html
index a6b6d09d1..ed20f63cd 100644
--- a/pages/trades.html
+++ b/pages/trades.html
@@ -38,14 +38,14 @@
<style>
:root {
- --tt-up: #34d399;
- --tt-down: #f87171;
- --tt-warn: #fbbf24;
+ --tt-up: var(--success);
+ --tt-down: var(--danger);
+ --tt-warn: var(--warn);
--tt-prime: #c084fc;
--tt-rail: 340px;
--tt-gap: 14px;
/* tokens the reused Mission Control chart reads (it also has hard fallbacks) */
- --success: #34d399; --danger: #f87171; --warn: #fbbf24; --accent: #22d3ee;
+ --success: #4ade80; --danger: #f87171; --warn: #fbbf24; --accent: #22d3ee;
--ink-bright: var(--fg); --ink: var(--fg); --ink-dim: var(--muted); --ink-faint: var(--faint);
--stroke: var(--line); --surface-1: var(--panel); --surface-2: color-mix(in srgb, var(--fg) 5%, transparent);
--font-mono: var(--mono); --radius-sm: 6px; --radius-md: 10px; --radius-lg: 14px; --mc-radius: 12px;
@@ -62,8 +62,8 @@
flex: none;
}
.tt-brand { display: flex; align-items: center; gap: 9px; }
- .tt-live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--tt-up); box-shadow: 0 0 0 0 rgba(52,211,153,.6); animation: ttlive 2s ease infinite; flex: none; }
- @keyframes ttlive { 0%,100%{box-shadow:0 0 0 0 rgba(52,211,153,.6)} 70%{box-shadow:0 0 0 7px rgba(52,211,153,0)} }
+ .tt-live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--tt-up); box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 60%, transparent); animation: ttlive 2s ease infinite; flex: none; }
+ @keyframes ttlive { 0%,100%{box-shadow:0 0 0 0 color-mix(in srgb, var(--success) 60%, transparent)} 70%{box-shadow:0 0 0 7px transparent} }
.tt-title { font: 800 16px/1 var(--mono); letter-spacing: -.01em; color: var(--fg); }
.tt-title small { font: 600 10px/1 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--faint); margin-left: 8px; }
.tt-pulse { display: flex; gap: 16px; flex-wrap: wrap; margin-left: auto; }
@@ -113,7 +113,7 @@
.tt-row-name { font: 400 11px/1.1 var(--sans); color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-row-sub { font: 500 10.5px/1 var(--mono); color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-tier { font: 700 8.5px/1 var(--mono); text-transform: uppercase; letter-spacing: .05em; padding: 2px 4px; border-radius: 3px; flex: none; }
- .tt-tier.prime { color: var(--tt-prime); background: rgba(192,132,252,.14); } .tt-tier.strong { color: var(--tt-up); background: rgba(52,211,153,.12); }
+ .tt-tier.prime { color: var(--tt-prime); background: rgba(192,132,252,.14); } .tt-tier.strong { color: var(--tt-up); background: color-mix(in srgb, var(--success) 12%, transparent); }
.tt-tier.lean { color: var(--tt-warn); background: rgba(251,191,36,.12); } .tt-tier.watch { color: var(--faint); background: rgba(148,163,184,.12); }
.tt-row-pnl { font: 700 11px/1.3 var(--mono); text-align: right; }
.tt-row-score { font: 700 12px/1 var(--mono); color: var(--cyan); }
diff --git a/pages/tutorial.html b/pages/tutorial.html
index 55ed36f00..3504a18da 100644
--- a/pages/tutorial.html
+++ b/pages/tutorial.html
@@ -769,8 +769,8 @@
outline-offset: 2px;
}
.tdoc-copy-btn.is-copied {
- color: var(--success, #4ade80);
- border-color: color-mix(in srgb, var(--success, #4ade80) 50%, transparent);
+ color: var(--success, var(--success));
+ border-color: color-mix(in srgb, var(--success, var(--success)) 50%, transparent);
}
.tdoc-copy-btn svg {
width: 12px;
diff --git a/pages/voice.html b/pages/voice.html
index 93d26a5e1..c1d320c11 100644
--- a/pages/voice.html
+++ b/pages/voice.html
@@ -269,7 +269,7 @@
.vl-btn-danger {
background: rgba(239,68,68,0.12);
border: 1px solid rgba(239,68,68,0.3);
- color: #f87171;
+ color: var(--danger);
padding: 8px 14px;
font-size: 12px;
}
@@ -475,8 +475,8 @@
min-height: 38px;
}
.vl-status.ok { color: #ffffff; }
- .vl-status.err { color: #f87171; }
- .vl-status.warn { color: #fbbf24; }
+ .vl-status.err { color: var(--danger); }
+ .vl-status.warn { color: var(--warn); }
/* ── Section spacing ─────────────────────────── */
.vl-section {
diff --git a/public/agents/boot.js b/public/agents/boot.js
index 313c0f89e..e451e4269 100644
--- a/public/agents/boot.js
+++ b/public/agents/boot.js
@@ -62,12 +62,35 @@ function updateUrl() {
window.history.replaceState({}, '', `/agents/${path}`);
}
+/**
+ * Skeleton cards that mirror the real card layout (avatar + name/id + three
+ * description lines) so the grid keeps its shape while data loads instead of
+ * collapsing to a spinner.
+ */
+function skeletonCards(n = 8) {
+ return Array.from({ length: n }, () => `
+ <div class="agent-skel" aria-hidden="true">
+ <div class="skel-head">
+ <div class="skel skel-avatar"></div>
+ <div style="flex:1;min-width:0;display:flex;flex-direction:column;gap:0.35rem">
+ <div class="skel skel-line" style="width:70%"></div>
+ <div class="skel skel-line" style="width:35%;height:0.6rem"></div>
+ </div>
+ </div>
+ <div class="skel skel-line" style="width:100%"></div>
+ <div class="skel skel-line" style="width:85%"></div>
+ <div class="skel skel-line" style="width:55%"></div>
+ </div>`).join('');
+}
+
/**
* Load and render agents.
*/
async function render() {
loadingEl.style.display = 'block';
- agentsContainer.innerHTML = '';
+ agentsContainer.innerHTML = skeletonCards();
+ agentsContainer.setAttribute('aria-busy', 'true');
+ agentsContainer.style.display = 'grid';
emptyState.style.display = 'none';
paginationEl.style.display = 'none';
@@ -80,7 +103,9 @@ async function render() {
});
hideRetry();
+ agentsContainer.removeAttribute('aria-busy');
if (result.agents.length === 0) {
+ agentsContainer.innerHTML = '';
emptyState.querySelector('h2').textContent = emptyDefaults.title;
emptyState.querySelector('p').textContent = emptyDefaults.body;
emptyState.style.display = 'block';
@@ -104,6 +129,8 @@ async function render() {
} catch (err) {
console.error('Failed to load agents:', err);
loadingEl.style.display = 'none';
+ agentsContainer.removeAttribute('aria-busy');
+ agentsContainer.innerHTML = '';
emptyState.style.display = 'block';
emptyState.querySelector('h2').textContent = 'Error loading agents';
emptyState.querySelector('p').textContent = err.message || 'Please try again later.';
diff --git a/public/changelog.json b/public/changelog.json
index f02cef6b0..d175b25e2 100644
--- a/public/changelog.json
+++ b/public/changelog.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-07-03T18:04:04.232Z",
+ "generated_at": "2026-07-03T18:13:44.476Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json",
"site": {
"name": "three.ws",
@@ -46,6 +46,16 @@
"launch"
]
},
+ {
+ "date": "2026-07-03",
+ "type": "launch",
+ "title": "Risk Disclosure",
+ "summary": "Risk disclosure for real-funds features: experimental software, total-loss risk, autonomous agents, no liability.",
+ "link": "/legal/risk",
+ "tags": [
+ "launch"
+ ]
+ },
{
"date": "2026-07-03",
"type": "update",
@@ -140,6 +150,16 @@
"infra"
]
},
+ {
+ "date": "2026-07-03",
+ "type": "update",
+ "title": "Fixed a Jito tip mis-route that could waste a slice of every batch of trades",
+ "summary": "When our trading agents send transactions through Jito for MEV protection, they attach a tip to one of Jito's eight published tip accounts. Three of our code paths had a mistyped address in that list — so roughly one in eight of the affected trades paid its tip to a dead address instead of Jito, losing that tip and getting no MEV protection or priority for that transaction. We verified the correct eight addresses against Jito's own live endpoint, corrected all three, and added a test that checks every tip-account list in the codebase against the canonical set so a typo can never slip in again. No user action needed; trades now land protected as intended.",
+ "link": null,
+ "tags": [
+ "fix"
+ ]
+ },
{
"date": "2026-07-03",
"type": "update",
@@ -162,6 +182,16 @@
"docs"
]
},
+ {
+ "date": "2026-07-03",
+ "type": "update",
+ "title": "Leaderboard rows now show each trader's P&L trend at a glance",
+ "summary": "Two traders can post the same realized P&L and have gotten there completely differently — one grinding steadily up, the other spiking once and giving it back. The Trader Leaderboard now draws a tiny cumulative-P&L sparkline on every row so you can read the shape of the run, not just the final number: green when they're up over the window, red when down, with a live pulse on the latest trade. The endpoint of the line always matches the row's headline P&L, so it can't tell a prettier story than the on-chain record. Win rate now carries a green/red distribution bar under it too. The sparkline is drawn from the same verified closed-position history the profile's equity curve uses — no new data, no estimates.",
+ "link": "/leaderboard",
+ "tags": [
+ "improvement"
+ ]
+ },
{
"date": "2026-07-03",
"type": "update",
@@ -226,6 +256,17 @@
"infra"
]
},
+ {
+ "date": "2026-07-03",
+ "type": "update",
+ "title": "Real funds now require a one-time risk acknowledgment",
+ "summary": "Before any feature that moves real money — trading, sniping, withdrawals, swaps, token launches, x402 payments, or buying USDC — three.ws now asks you to read and accept a plain-language risk acknowledgment: this is experimental software, losses can be total, autonomous agents act without asking again, and you use real funds entirely at your own risk. You accept it once per browser; if the disclosure ever changes materially, you'll be asked again before your next real-funds action. The full text lives at the new Risk Disclosure page, and devnet/simulation flows stay friction-free — the gate only guards real money.",
+ "link": "/legal/risk",
+ "tags": [
+ "feature",
+ "security"
+ ]
+ },
{
"date": "2026-07-03",
"type": "update",
@@ -330,6 +371,17 @@
"docs"
]
},
+ {
+ "date": "2026-07-03",
+ "type": "update",
+ "title": "Trading agents now stop themselves after a losing day — and the funder stops chasing them",
+ "summary": "A per-trade rulebook can't catch a fleet that bleeds one bad entry at a time: every single buy passes its checks, yet the wallet still grinds down. Two new portfolio-level guardrails close that gap. First, a realized-loss circuit breaker: once an agent's net realized loss over the last 24 hours crosses a configurable cap, it stops opening new positions for the rest of the window — a profitable or break-even day never trips it, and an unpriceable coin fails closed rather than sneaking through. Second, the auto-funder is now loss-aware and per-agent capped: it will not keep topping up a wallet that has hit its loss cap, and no single agent can draw more than its daily refill ceiling from the treasury — so one wallet that only loses can't quietly drain the master or starve the healthy agents. Both ship with conservative defaults and are tunable per fleet.",
+ "link": null,
+ "tags": [
+ "security",
+ "improvement"
+ ]
+ },
{
"date": "2026-07-03",
"type": "update",
diff --git a/public/changelog.xml b/public/changelog.xml
index 33cf34534..780b28eab 100644
--- a/public/changelog.xml
+++ b/public/changelog.xml
@@ -38,6 +38,14 @@
<category>launch</category>
<description>The five-page solo trading stack — Coin Radar, Coin Intelligence, Live Trade Feed, Watchlist, and the Mission Control cockpit — where the numbers come from and how the surfaces chain together.</description>
</item>
+ <item>
+ <title>Risk Disclosure</title>
+ <link>https://three.ws/legal/risk</link>
+ <guid isPermaLink="false">2026-07-03:Risk Disclosure</guid>
+ <pubDate>Fri, 03 Jul 2026 12:00:00 GMT</pubDate>
+ <category>launch</category>
+ <description>Risk disclosure for real-funds features: experimental software, total-loss risk, autonomous agents, no liability.</description>
+ </item>
<item>
<title>Agents in the ring — platform agents now buy and sell services from each other</title>
<link>https://three.ws/docs/x402-ring-economy</link>
@@ -110,6 +118,14 @@
<category>security</category>
<description>The closed-loop agent economy settles real USDC through the platform's own facilitator, and until now those settlements were trusted but never verified against the blockchain. A new reconciler runs every 30 minutes and holds the ring to the same standard the funding wallet already meets: every recorded settlement and every treasury→payer sweep from the last 72 hours is checked to exist and succeed on-chain, a sample of each is parsed to prove the exact dollar amount and recipient match the books, and the two internal ledgers are cross-checked so a settlement with no matching spend record — the tell-tale sign of value leaking through our own facilitator — is caught. It also runs a silence alarm: if the ring is switched on but goes quiet for 30 minutes, operators are paged, closing the gap where 'it was working, then it wasn't' used to pass unnoticed. Any missing, failed, or mismatched settlement raises an immediate alert; every finding lands on the finance-integrity board, tagged so ring issues stand apart from the rest.</description>
</item>
+ <item>
+ <title>Fixed a Jito tip mis-route that could waste a slice of every batch of trades</title>
+ <link>https://three.ws/changelog</link>
+ <guid isPermaLink="false">2026-07-03:Fixed a Jito tip mis-route that could waste a slice of every batch of trades</guid>
+ <pubDate>Fri, 03 Jul 2026 12:00:00 GMT</pubDate>
+ <category>fix</category>
+ <description>When our trading agents send transactions through Jito for MEV protection, they attach a tip to one of Jito's eight published tip accounts. Three of our code paths had a mistyped address in that list — so roughly one in eight of the affected trades paid its tip to a dead address instead of Jito, losing that tip and getting no MEV protection or priority for that transaction. We verified the correct eight addresses against Jito's own live endpoint, corrected all three, and added a test that checks every tip-account list in the codebase against the canonical set so a typo can never slip in again. No user action needed; trades now land protected as intended.</description>
+ </item>
<item>
<title>Fleet Command — run your whole swarm of trading agents from one deck</title>
<link>https://three.ws/dashboard/fleet</link>
@@ -126,6 +142,14 @@
<category>security</category>
<description>The master wallet that fuels the platform's autonomous economy now keeps a tamper-evident accounting book of every move it makes. Each SOL transfer is recorded with the engine it funded, the amount, the on-chain signature, the running balance, and the US-dollar value at the moment of the transfer — cryptographically hash-chained so no past entry can be altered or deleted without detection. A monitor runs every 30 minutes and checks three things: that the book hasn't been tampered with, that every transfer we recorded really happened on-chain, and — most importantly — that no SOL ever left the wallet without a matching record, which is the tell-tale sign of a stolen key. Anything off raises an immediate operator alert and lands on the finance-integrity board. There's also a one-command accounting export (CSV or JSON, with running balance and dollar totals) for bookkeeping and review.</description>
</item>
+ <item>
+ <title>Leaderboard rows now show each trader's P&amp;L trend at a glance</title>
+ <link>https://three.ws/leaderboard</link>
+ <guid isPermaLink="false">2026-07-03:Leaderboard rows now show each trader's P&amp;L trend at a glance</guid>
+ <pubDate>Fri, 03 Jul 2026 12:00:00 GMT</pubDate>
+ <category>improvement</category>
+ <description>Two traders can post the same realized P&amp;L and have gotten there completely differently — one grinding steadily up, the other spiking once and giving it back. The Trader Leaderboard now draws a tiny cumulative-P&amp;L sparkline on every row so you can read the shape of the run, not just the final number: green when they're up over the window, red when down, with a live pulse on the latest trade. The endpoint of the line always matches the row's headline P&amp;L, so it can't tell a prettier story than the on-chain record. Win rate now carries a green/red distribution bar under it too. The sparkline is drawn from the same verified closed-position history the profile's equity curve uses — no new data, no estimates.</description>
+ </item>
<item>
<title>Leak-proofing the closed-loop economy: fail-closed spend guards + an on-chain leak scanner</title>
<link>https://three.ws/changelog</link>
@@ -174,6 +198,14 @@
<category>fix</category>
<description>The ledger that records every x402 payment used to write one row to the database per paid request. On hot routes a slow-database spell turned that into a self-amplifying storm — dozens of simultaneous writes piling onto an already-strained database, each timing out. Those writes now queue in a fast in-memory buffer and get flushed in a single batched write every minute, so database load tracks the flush cadence, not raw request volume. Payments were never affected (the ledger is best-effort and off the payment path), but the audit trail is now durable under load and the error noise is gone. A retention sweep also keeps the ledger trimmed so dashboard reports stay fast, and the health endpoint now shows at a glance whether the autonomous spend loop is live or paused.</description>
</item>
+ <item>
+ <title>Real funds now require a one-time risk acknowledgment</title>
+ <link>https://three.ws/legal/risk</link>
+ <guid isPermaLink="false">2026-07-03:Real funds now require a one-time risk acknowledgment</guid>
+ <pubDate>Fri, 03 Jul 2026 12:00:00 GMT</pubDate>
+ <category>feature</category>
+ <description>Before any feature that moves real money — trading, sniping, withdrawals, swaps, token launches, x402 payments, or buying USDC — three.ws now asks you to read and accept a plain-language risk acknowledgment: this is experimental software, losses can be total, autonomous agents act without asking again, and you use real funds entirely at your own risk. You accept it once per browser; if the disclosure ever changes materially, you'll be asked again before your next real-funds action. The full text lives at the new Risk Disclosure page, and devnet/simulation flows stay friction-free — the gate only guards real money.</description>
+ </item>
<item>
<title>Ring economy dashboard — watch the closed loop breathe</title>
<link>https://three.ws/changelog</link>
@@ -254,6 +286,14 @@
<category>docs</category>
<description>Two new guides map the whole trading experience. Trading Surfaces covers the five solo pages — Coin Radar, Coin Intelligence, the Live Trade Feed, your Watchlist, and the keyboard-first Mission Control cockpit — including where every number comes from and how the pages chain together. Competitive &amp; Pooled Trading covers the Arena tournaments with real on-chain $THREE payouts, the 3D Sniper Arena floor, the Live Trading Theater with one-click copy trading, backable Vaults, and consensus-driven Trading Swarms. Both are written for someone who has never opened the pages before.</description>
</item>
+ <item>
+ <title>Trading agents now stop themselves after a losing day — and the funder stops chasing them</title>
+ <link>https://three.ws/changelog</link>
+ <guid isPermaLink="false">2026-07-03:Trading agents now stop themselves after a losing day — and the funder stops chasing them</guid>
+ <pubDate>Fri, 03 Jul 2026 12:00:00 GMT</pubDate>
+ <category>security</category>
+ <description>A per-trade rulebook can't catch a fleet that bleeds one bad entry at a time: every single buy passes its checks, yet the wallet still grinds down. Two new portfolio-level guardrails close that gap. First, a realized-loss circuit breaker: once an agent's net realized loss over the last 24 hours crosses a configurable cap, it stops opening new positions for the rest of the window — a profitable or break-even day never trips it, and an unpriceable coin fails closed rather than sneaking through. Second, the auto-funder is now loss-aware and per-agent capped: it will not keep topping up a wallet that has hit its loss cap, and no single agent can draw more than its daily refill ceiling from the treasury — so one wallet that only loses can't quietly drain the master or starve the healthy agents. Both ship with conservative defaults and are tunable per fleet.</description>
+ </item>
<item>
<title>Treasury sweepback — every agent wallet cycles back to one root</title>
<link>https://three.ws/changelog</link>
diff --git a/public/demos-embed/agents.html b/public/demos-embed/agents.html
index 7a6cce250..065d5cd35 100644
--- a/public/demos-embed/agents.html
+++ b/public/demos-embed/agents.html
@@ -144,9 +144,15 @@
}
.card-see3d:hover { background: rgba(15,98,254,0.06); }
- .agents-loading { text-align: center; padding: 3rem 2rem; color: #525252; display: flex; align-items: center; justify-content: center; gap: 0.75rem; }
- .agents-loading::after { content: ''; display: inline-block; width: 1rem; height: 1rem; border: 2px solid rgba(15,98,254,0.2); border-top-color: #0f62fe; border-radius: 50%; animation: spin 0.8s linear infinite; }
- @keyframes spin { to { transform: rotate(360deg); } }
+ /* Skeleton cards — mirror the real card layout while the directory loads,
+ so the grid doesn't jump when data lands. */
+ .agent-skel { background: transparent; padding: 1.1rem 1.25rem 1.25rem; display: flex; flex-direction: column; gap: 0.6rem; }
+ .agent-skel .skel-head { display: flex; align-items: center; gap: 0.75rem; }
+ .skel { background: #e8e8e8; animation: skel-pulse 1.4s ease-in-out infinite; }
+ .skel-avatar { width: 48px; height: 48px; flex-shrink: 0; }
+ .skel-line { height: 0.8rem; }
+ @keyframes skel-pulse { 0%, 100% { opacity: 0.5; } 50% { opacity: 0.95; } }
+ @media (prefers-reduced-motion: reduce) { .skel { animation: none; } }
.agents-empty { text-align: center; padding: 4rem 2rem; background: transparent; }
.agents-empty h2 { font-size: 1.25rem; font-weight: 600; color: #161616; margin-bottom: 0.5rem; }
@@ -197,7 +203,7 @@
</div>
<div class="agents-wrap">
- <div id="loading" class="agents-loading" style="display:none">Loading agents</div>
+ <div id="loading" class="sr-only" role="status" aria-live="polite" style="display:none">Loading agents</div>
<div id="agents" class="agent-grid"></div>
<div id="empty-state" class="agents-empty" style="display:none">
<h2>No agents found</h2>
diff --git a/public/features.json b/public/features.json
index 8d4769943..a7d309891 100644
--- a/public/features.json
+++ b/public/features.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-07-03T18:04:04.123Z",
+ "generated_at": "2026-07-03T18:13:44.420Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json",
"site": {
"name": "three.ws",
@@ -2650,6 +2650,16 @@
"indexable": true,
"tags": [],
"showcase": false
+ },
+ {
+ "path": "/legal/risk",
+ "title": "Risk Disclosure",
+ "description": "Risk disclosure for real-funds features: experimental software, total-loss risk, autonomous agents, no liability.",
+ "added": "2026-07-03",
+ "auth": null,
+ "indexable": true,
+ "tags": [],
+ "showcase": false
}
]
},
diff --git a/public/legal/risk.html b/public/legal/risk.html
index fb77d3df1..a2be25fe4 100644
--- a/public/legal/risk.html
+++ b/public/legal/risk.html
@@ -41,13 +41,13 @@
<meta property="og:title" content="Risk Disclosure · three.ws">
<meta property="og:description" content="Risk disclosure for real-funds features on three.ws: experimental software, total-loss risk, autonomous agents, no liability.">
<meta property="og:url" content="https://three.ws/legal/risk">
- <meta property="og:image" content="https://three.ws/api/page-og?s=legal&amp;t=Risk+Disclosure&amp;d=Risk+disclosure+for+real-funds+features+on+three.ws.&amp;p=%2Flegal%2Frisk">
+ <meta property="og:image" content="https://three.ws/api/page-og?s=legal&amp;t=Risk+Disclosure&amp;d=Risk+disclosure+for+real-funds+features%3A+experimental+software%2C+total-loss+risk%2C+autonomous+agents%2C+no+liability.&amp;p=%2Flegal%2Frisk">
<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:title" content="Risk Disclosure · three.ws">
<meta name="twitter:description" content="Risk disclosure for real-funds features on three.ws: experimental software, total-loss risk, autonomous agents, no liability.">
- <meta name="twitter:image" content="https://three.ws/api/page-og?s=legal&amp;t=Risk+Disclosure&amp;d=Risk+disclosure+for+real-funds+features+on+three.ws.&amp;p=%2Flegal%2Frisk">
+ <meta name="twitter:image" content="https://three.ws/api/page-og?s=legal&amp;t=Risk+Disclosure&amp;d=Risk+disclosure+for+real-funds+features%3A+experimental+software%2C+total-loss+risk%2C+autonomous+agents%2C+no+liability.&amp;p=%2Flegal%2Frisk">
<script type="application/ld+json">{"@context":"https://schema.org","@type":"WebPage","name":"Risk Disclosure","description":"Risk disclosure for real-funds features on three.ws.","url":"https://three.ws/legal/risk","isPartOf":{"@type":"WebSite","name":"three.ws","url":"https://three.ws"}}</script>
<meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1">
diff --git a/public/llms-full.txt b/public/llms-full.txt
index e1619e13b..a1ce5aade 100644
--- a/public/llms-full.txt
+++ b/public/llms-full.txt
@@ -1612,6 +1612,12 @@ URL: https://three.ws/legal/tos
Terms of service for three.ws.
+### Risk Disclosure
+
+URL: https://three.ws/legal/risk
+
+Risk disclosure for real-funds features: experimental software, total-loss risk, autonomous agents, no liability.
+
## Machine-readable
Indexes and well-known files for crawlers and AI agents.
diff --git a/public/llms.txt b/public/llms.txt
index 49fb3b03f..0364ac7c0 100644
--- a/public/llms.txt
+++ b/public/llms.txt
@@ -296,6 +296,7 @@ Long-form announcements, launches, and writing from three.ws.
- [Privacy Policy](https://three.ws/legal/privacy): How three.ws handles user data.
- [Terms of Use](https://three.ws/legal/tos): Terms of service for three.ws.
+- [Risk Disclosure](https://three.ws/legal/risk): Risk disclosure for real-funds features: experimental software, total-loss risk, autonomous agents, no liability.
## News
diff --git a/public/sitemap/index.html b/public/sitemap/index.html
index e8f4e53df..b3b08a10a 100644
--- a/public/sitemap/index.html
+++ b/public/sitemap/index.html
@@ -65,7 +65,7 @@
<main class="sm-wrap">
<div class="sm-hero">
<h1>Sitemap</h1>
- <p>All 374 pages on three.ws, grouped by purpose. Looking for the machine-readable versions?</p>
+ <p>All 375 pages on three.ws, grouped by purpose. Looking for the machine-readable versions?</p>
<div class="sm-formats">
<a href="/sitemap.xml"><code>sitemap.xml</code> · for search engines</a>
<a href="/llms.txt"><code>llms.txt</code> · for AI agents</a>
@@ -77,7 +77,7 @@
</div>
<div class="sm-filter">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><circle cx="11" cy="11" r="7"/><path d="m21 21-4.3-4.3"/></svg>
- <input id="sm-filter-input" type="search" placeholder="Filter 374 pages by name, path, or description…" aria-label="Filter pages" autocomplete="off" spellcheck="false" />
+ <input id="sm-filter-input" type="search" placeholder="Filter 375 pages by name, path, or description…" aria-label="Filter pages" autocomplete="off" spellcheck="false" />
<kbd aria-hidden="true">/</kbd>
</div>
<p class="sm-filter-count" id="sm-filter-count" role="status" aria-live="polite"></p>
@@ -1960,7 +1960,7 @@
<section class="sm-section" id="legal">
<header>
- <h2>Legal<span class="sm-count" data-count>2</span></h2>
+ <h2>Legal<span class="sm-count" data-count>3</span></h2>
</header>
<ul class="sm-list">
@@ -1978,6 +1978,13 @@
<span class="sm-desc">Terms of service for three.ws.</span>
</a>
</li>
+ <li>
+ <a href="/legal/risk">
+ <span class="sm-title">Risk Disclosure</span>
+ <span class="sm-path">/legal/risk</span>
+ <span class="sm-desc">Risk disclosure for real-funds features: experimental software, total-loss risk, autonomous agents, no liability.</span>
+ </a>
+ </li>
</ul>
</section>
diff --git a/public/x402.js b/public/x402.js
index 473babec7..b3d6ec537 100644
--- a/public/x402.js
+++ b/public/x402.js
@@ -33,6 +33,11 @@
const VERSION = '0.1.0';
+// Real-funds gate: before the first payment, the user must accept the three.ws
+// Risk Disclosure. Resolved relative to this module's URL, so merchant-site
+// embeds load it from the three.ws origin.
+import { ensureRiskAck } from './risk-ack.js';
+
// SIWX ("Sign-In-With-X" / CAIP-122) lets a wallet that has already paid for
// an endpoint re-enter it by signing a challenge instead of paying again. The
// server advertises support by including `extensions['sign-in-with-x']` in the
@@ -1359,6 +1364,7 @@ class CheckoutModal {
}
async runSolana(accept) {
+ if (!(await ensureRiskAck({ context: 'x402-pay' }))) { this.close('cancelled'); return; }
this.accept = accept;
this.setPrice(accept);
const provider = detectSolanaProvider();
@@ -1428,6 +1434,7 @@ class CheckoutModal {
}
async runEvm(accept) {
+ if (!(await ensureRiskAck({ context: 'x402-pay' }))) { this.close('cancelled'); return; }
this.accept = accept;
this.setPrice(accept);
this.renderProgress('connect', { text: 'Opening browser wallet…' });
diff --git a/scripts/audit-token-drift.baseline.json b/scripts/audit-token-drift.baseline.json
new file mode 100644
index 000000000..dcfc18ee9
--- /dev/null
+++ b/scripts/audit-token-drift.baseline.json
@@ -0,0 +1,4 @@
+{
+ "total": 0,
+ "perFile": {}
+}
diff --git a/scripts/audit-token-drift.mjs b/scripts/audit-token-drift.mjs
new file mode 100644
index 000000000..466d498ff
--- /dev/null
+++ b/scripts/audit-token-drift.mjs
@@ -0,0 +1,120 @@
+#!/usr/bin/env node
+/**
+ * Design-token drift ratchet — keeps hardcoded token-equivalent hexes from creeping back.
+ *
+ * public/tokens.css is the single source of truth for colour primitives, but the
+ * platform accumulated hundreds of hardcoded hexes that literally equal a token
+ * value (#4ade80 IS --success, #f87171 IS --danger, …). Those were migrated to
+ * var(--token) on every token-covered page in B13; this audit is the ratchet that
+ * stops regressions without demanding a big-bang cleanup of the long tail:
+ *
+ * - It counts hardcoded occurrences of the canonical status/base hexes inside
+ * <style> blocks of pages/ *.html files that load the token vocabulary
+ * (via /style.css, /nav.css, or /tokens.css).
+ * - The count may only go DOWN. If it exceeds the recorded baseline the audit
+ * fails and names each offending file so the author swaps the hex for the var.
+ * - When the count drops, the audit tells you to lower the baseline so the
+ * improvement is locked in.
+ *
+ * Baseline lives next to this script in audit-token-drift.baseline.json.
+ * JS/canvas literals and pages that deliberately re-theme a token (they define
+ * their own --success/--danger/--warn) are out of scope — the ratchet only sees
+ * CSS on pages where the canonical var is the unambiguous right answer.
+ *
+ * Usage:
+ * node scripts/audit-token-drift.mjs # exit 1 if drift increased
+ * node scripts/audit-token-drift.mjs --update # rewrite baseline to current counts
+ */
+import { readFileSync, writeFileSync, readdirSync, statSync } from 'node:fs';
+import { join, relative, dirname } from 'node:path';
+import { fileURLToPath } from 'node:url';
+
+const ROOT = join(dirname(fileURLToPath(import.meta.url)), '..');
+const BASELINE_PATH = join(ROOT, 'scripts', 'audit-token-drift.baseline.json');
+
+/** Hexes that are literally a canonical token value (see public/tokens.css). */
+const TOKEN_HEXES = [
+ { hex: '#4ade80', token: '--success' },
+ { hex: '#f87171', token: '--danger' },
+ { hex: '#fbbf24', token: '--warn' },
+];
+
+/** A page that redefines a status token is a sanctioned theme layer — skip it
+ * for that token: the literal there may intentionally differ from the local var. */
+const LOCAL_DEF = (css, token) => new RegExp(`${token}\\s*:`).test(css);
+
+const STYLE_BLOCK = /<style[^>]*>([\s\S]*?)<\/style>/gi;
+
+function collectPages(dir) {
+ const out = [];
+ for (const entry of readdirSync(dir)) {
+ const p = join(dir, entry);
+ if (statSync(p).isDirectory()) out.push(...collectPages(p));
+ else if (entry.endsWith('.html')) out.push(p);
+ }
+ return out;
+}
+
+function countDrift() {
+ const perFile = {};
+ let total = 0;
+ for (const page of collectPages(join(ROOT, 'pages'))) {
+ const html = readFileSync(page, 'utf8');
+ // Only pages that actually load the token vocabulary are in scope.
+ if (!/\/(style|nav|tokens)\.css/.test(html)) continue;
+ let css = '';
+ for (const m of html.matchAll(STYLE_BLOCK)) css += m[1];
+ if (!css) continue;
+ let n = 0;
+ for (const { hex, token } of TOKEN_HEXES) {
+ if (LOCAL_DEF(css, token)) continue;
+ // Negative lookahead: #4ade80 must not match inside #4ade8088.
+ n += (css.match(new RegExp(`${hex}(?![0-9a-fA-F])`, 'gi')) || []).length;
+ }
+ if (n > 0) {
+ perFile[relative(ROOT, page)] = n;
+ total += n;
+ }
+ }
+ return { total, perFile };
+}
+
+const { total, perFile } = countDrift();
+
+if (process.argv.includes('--update')) {
+ writeFileSync(BASELINE_PATH, JSON.stringify({ total, perFile }, null, '\t') + '\n');
+ console.log(`✓ token-drift baseline updated: ${total} hardcoded token-hex(es).`);
+ process.exit(0);
+}
+
+let baseline;
+try {
+ baseline = JSON.parse(readFileSync(BASELINE_PATH, 'utf8'));
+} catch {
+ console.error(`✗ missing baseline — run: node scripts/audit-token-drift.mjs --update`);
+ process.exit(1);
+}
+
+if (total > baseline.total) {
+ console.error(`\n✗ design-token drift increased: ${total} hardcoded token-hexes (baseline ${baseline.total}).\n`);
+ for (const [file, n] of Object.entries(perFile)) {
+ const was = baseline.perFile[file] || 0;
+ if (n > was) console.error(` ${file}: ${n} (was ${was})`);
+ }
+ console.error(
+ '\nThese hexes literally equal a canonical token — use the var instead:\n' +
+ TOKEN_HEXES.map(({ hex, token }) => ` ${hex} → var(${token})`).join('\n') +
+ '\nSee DESIGN-TOKENS.md. If a page deliberately re-themes a token, define the\n' +
+ 'token locally (a theme layer) rather than hardcoding the raw hex.\n',
+ );
+ process.exit(1);
+}
+
+if (total < baseline.total) {
+ console.log(
+ `✓ token drift: ${total} (baseline ${baseline.total}) — improved! Lock it in with:\n` +
+ ' node scripts/audit-token-drift.mjs --update',
+ );
+} else {
+ console.log(`✓ token drift unchanged: ${total} hardcoded token-hex(es) (baseline ${baseline.total}).`);
+}
diff --git a/src/dashboard-next/pages/fleet.js b/src/dashboard-next/pages/fleet.js
index eaaadfa1e..96220b35e 100644
--- a/src/dashboard-next/pages/fleet.js
+++ b/src/dashboard-next/pages/fleet.js
@@ -449,7 +449,6 @@ function refreshBar() {
tmp.innerHTML = actionBar();
bar.replaceWith(tmp.firstElementChild);
// re-wire the fresh bar
- const root = document.getElementById('fc-root');
const nb = document.querySelector('.fc-bar');
nb.querySelector('[data-act="arm-all"]')?.addEventListener('click', () => bulkAction('arm'));
nb.querySelector('[data-act="disarm-all"]')?.addEventListener('click', () => bulkAction('disarm'));
@@ -457,7 +456,6 @@ function refreshBar() {
nb.querySelectorAll('[data-chip]').forEach((c) => c.addEventListener('click', () => { _filter.status = c.dataset.chip; refreshTable(); refreshBar(); }));
const q = nb.querySelector('#fc-q');
if (q) { q.addEventListener('input', (e) => { _filter.q = e.target.value; refreshTable(); refreshBar(); }); q.focus(); q.setSelectionRange(q.value.length, q.value.length); }
- void root;
}
// The agents a bulk action targets: the current selection, or every filtered row
diff --git a/src/pump/pump-modals.js b/src/pump/pump-modals.js
index b1f0c9694..b67be8df0 100644
--- a/src/pump/pump-modals.js
+++ b/src/pump/pump-modals.js
@@ -12,6 +12,7 @@
import { grindVanity } from '../solana/vanity/grinder.js';
import { THREE_WS_VANITY } from '../solana/vanity/brand.js';
+import { ensureRiskAck } from '../shared/risk-ack.js';
const M_STYLES = `
.pmodal-back {
@@ -328,6 +329,7 @@ function openPay({ mint, network }) {
err.textContent = 'No Solana wallet detected. Install Phantom.';
return;
}
+ if (network !== 'devnet' && !(await ensureRiskAck({ context: 'x402-pay' }))) return;
btn.disabled = true;
btn.textContent = 'Connecting…';
try {
diff --git a/src/shared/risk-ack.js b/src/shared/risk-ack.js
index 841336576..ede24600f 100644
--- a/src/shared/risk-ack.js
+++ b/src/shared/risk-ack.js
@@ -14,7 +14,13 @@
*/
function _mod() {
- return import(/* @vite-ignore */ '/risk-ack.js');
+ // Resolve at runtime from the origin (public/risk-ack.js). Rollup resolves a
+ // string LITERAL even with @vite-ignore and fails the build ("failed to
+ // resolve import /risk-ack.js"); routing the specifier through a variable
+ // keeps the import non-analyzable, so it's left as a runtime import — exactly
+ // the browser-side deferral this wrapper is documented to provide.
+ const spec = '/risk-ack.js';
+ return import(/* @vite-ignore */ spec);
}
/**
diff --git a/tests/risk-ack.test.js b/tests/risk-ack.test.js
new file mode 100644
index 000000000..c9abb524a
--- /dev/null
+++ b/tests/risk-ack.test.js
@@ -0,0 +1,127 @@
+// Risk acknowledgment gate — pure logic + storage behavior of public/risk-ack.js.
+// The DOM dialog itself is exercised in the browser; these tests pin down the
+// parts that decide whether a user gets prompted: record parsing, version
+// currency, and localStorage persistence semantics.
+
+import { describe, it, expect, beforeEach, afterEach } from 'vitest';
+import {
+ parseAckRecord,
+ isAckCurrent,
+ hasRiskAck,
+ ensureRiskAck,
+ RISK_ACK_VERSION,
+ RISK_ACK_STORAGE_KEY,
+} from '../public/risk-ack.js';
+
+function fakeStorage(initial = {}) {
+ const map = new Map(Object.entries(initial));
+ return {
+ getItem: (k) => (map.has(k) ? map.get(k) : null),
+ setItem: (k, v) => map.set(k, String(v)),
+ removeItem: (k) => map.delete(k),
+ _map: map,
+ };
+}
+
+const validRecord = () =>
+ JSON.stringify({ version: RISK_ACK_VERSION, acceptedAt: '2026-07-03T12:00:00.000Z', context: 'trade' });
+
+describe('parseAckRecord', () => {
+ it('parses a valid record', () => {
+ const rec = parseAckRecord(validRecord());
+ expect(rec).toEqual({ version: RISK_ACK_VERSION, acceptedAt: '2026-07-03T12:00:00.000Z', context: 'trade' });
+ });
+
+ it('keeps records without a context', () => {
+ const rec = parseAckRecord(JSON.stringify({ version: 1, acceptedAt: '2026-07-03T12:00:00.000Z' }));
+ expect(rec).toEqual({ version: 1, acceptedAt: '2026-07-03T12:00:00.000Z' });
+ });
+
+ it.each([
+ [null],
+ [undefined],
+ [''],
+ ['not json'],
+ ['42'],
+ ['"a string"'],
+ [JSON.stringify({ acceptedAt: '2026-07-03T12:00:00.000Z' })], // no version
+ [JSON.stringify({ version: 0, acceptedAt: '2026-07-03T12:00:00.000Z' })], // version < 1
+ [JSON.stringify({ version: 1.5, acceptedAt: '2026-07-03T12:00:00.000Z' })], // non-integer
+ [JSON.stringify({ version: '1', acceptedAt: 'garbage' })], // unparseable date
+ [JSON.stringify({ version: 1 })], // no acceptedAt
+ ])('rejects invalid input %#', (raw) => {
+ expect(parseAckRecord(raw)).toBeNull();
+ });
+
+ it('coerces a numeric-string version', () => {
+ const rec = parseAckRecord(JSON.stringify({ version: '2', acceptedAt: '2026-07-03T12:00:00.000Z' }));
+ expect(rec?.version).toBe(2);
+ });
+});
+
+describe('isAckCurrent', () => {
+ it('is false for null', () => {
+ expect(isAckCurrent(null)).toBe(false);
+ });
+
+ it('is true when the record matches the current version', () => {
+ expect(isAckCurrent({ version: RISK_ACK_VERSION })).toBe(true);
+ });
+
+ it('is true when the record is newer than required', () => {
+ expect(isAckCurrent({ version: RISK_ACK_VERSION + 1 })).toBe(true);
+ });
+
+ it('is false for a stale record — a disclosure version bump forces re-acknowledgment', () => {
+ expect(isAckCurrent({ version: 1 }, 2)).toBe(false);
+ });
+});
+
+describe('hasRiskAck / ensureRiskAck against storage', () => {
+ let originalStorage;
+
+ beforeEach(() => {
+ originalStorage = globalThis.localStorage;
+ });
+
+ afterEach(() => {
+ if (originalStorage === undefined) delete globalThis.localStorage;
+ else globalThis.localStorage = originalStorage;
+ });
+
+ it('hasRiskAck is true when a current acceptance is stored', () => {
+ globalThis.localStorage = fakeStorage({ [RISK_ACK_STORAGE_KEY]: validRecord() });
+ expect(hasRiskAck()).toBe(true);
+ });
+
+ it('hasRiskAck is false for a stale-version acceptance', () => {
+ globalThis.localStorage = fakeStorage({
+ [RISK_ACK_STORAGE_KEY]: JSON.stringify({ version: RISK_ACK_VERSION - 1, acceptedAt: '2026-01-01T00:00:00.000Z' }),
+ });
+ // version - 1 can be 0 (invalid) or a genuinely stale version — both must gate.
+ expect(hasRiskAck()).toBe(false);
+ });
+
+ it('hasRiskAck is false with corrupted storage contents', () => {
+ globalThis.localStorage = fakeStorage({ [RISK_ACK_STORAGE_KEY]: '{broken' });
+ expect(hasRiskAck()).toBe(false);
+ });
+
+ it('hasRiskAck survives a throwing localStorage', () => {
+ globalThis.localStorage = {
+ getItem() { throw new Error('denied'); },
+ };
+ expect(hasRiskAck()).toBe(false);
+ });
+
+ it('ensureRiskAck resolves true immediately when already accepted', async () => {
+ globalThis.localStorage = fakeStorage({ [RISK_ACK_STORAGE_KEY]: validRecord() });
+ await expect(ensureRiskAck({ context: 'trade' })).resolves.toBe(true);
+ });
+
+ it('ensureRiskAck resolves false when unaccepted and no DOM is available', async () => {
+ globalThis.localStorage = fakeStorage();
+ // Node test env has no document — the gate must fail CLOSED (no ack, no money action).
+ await expect(ensureRiskAck({ context: 'trade' })).resolves.toBe(false);
+ });
+});
diff --git a/tests/scrub-secrets.test.js b/tests/scrub-secrets.test.js
new file mode 100644
index 000000000..e22c8f0fd
--- /dev/null
+++ b/tests/scrub-secrets.test.js
@@ -0,0 +1,49 @@
+import { describe, it, expect } from 'vitest';
+import { scrubSecrets } from '../api/_lib/scrub-secrets.js';
+
+describe('scrubSecrets', () => {
+ it('redacts secret-bearing keys at the top level', () => {
+ const out = scrubSecrets({ amount: 5, secret: 'abc', privateKey: 'xyz' });
+ expect(out).toEqual({ amount: 5, secret: '[redacted]', privateKey: '[redacted]' });
+ });
+
+ it('redacts nested secrets at any depth', () => {
+ const out = scrubSecrets({
+ wallet: { address: 'W1', encrypted_solana_secret: 'deadbeef', meta: { mnemonic: 'a b c' } },
+ });
+ expect(out.wallet.address).toBe('W1');
+ expect(out.wallet.encrypted_solana_secret).toBe('[redacted]');
+ expect(out.wallet.meta.mnemonic).toBe('[redacted]');
+ });
+
+ it('walks arrays element-wise', () => {
+ const out = scrubSecrets({ keys: [{ apiKey: 'k1' }, { apiKey: 'k2' }] });
+ expect(out.keys).toEqual([{ apiKey: '[redacted]' }, { apiKey: '[redacted]' }]);
+ });
+
+ it('matches case-insensitively and as a substring (keypair, signingKey, bearer)', () => {
+ const out = scrubSecrets({ KeyPair: 'x', signingKey: 'y', bearerToken: 'z', mint: 'MINT' });
+ expect(out).toEqual({ KeyPair: '[redacted]', signingKey: '[redacted]', bearerToken: '[redacted]', mint: 'MINT' });
+ });
+
+ it('leaves non-secret data (mints, signatures, amounts) untouched', () => {
+ const detail = { mint: 'So111…', signature: '5xk…', amount_sol: 0.01, symbol: 'THREE' };
+ expect(scrubSecrets(detail)).toEqual(detail);
+ });
+
+ it('passes primitives through and handles cycles without throwing', () => {
+ expect(scrubSecrets(42)).toBe(42);
+ expect(scrubSecrets('hi')).toBe('hi');
+ expect(scrubSecrets(null)).toBe(null);
+ const a = { name: 'a' };
+ a.self = a; // circular
+ expect(() => scrubSecrets(a)).not.toThrow();
+ expect(scrubSecrets(a).name).toBe('a');
+ });
+
+ it('does not mutate the input object', () => {
+ const input = { secret: 'keep-me-in-original' };
+ scrubSecrets(input);
+ expect(input.secret).toBe('keep-me-in-original');
+ });
+});
diff --git a/workers/agent-sniper/README.md b/workers/agent-sniper/README.md
index a901e017f..8e0623ad2 100644
--- a/workers/agent-sniper/README.md
+++ b/workers/agent-sniper/README.md
@@ -63,7 +63,9 @@ Enforced in `executeBuy`, short-circuiting before any transaction:
6. **Price-impact circuit breaker** — `max_price_impact_pct` checked against a fresh `quoteForBuy`.
7. **Idempotency** — `INSERT … ON CONFLICT (agent_id, mint, network) DO NOTHING` claims the slot before the tx; one shot per mint per agent.
8. **Mayhem exclusion (owner rule)** — the first gate: never buy pump.fun "Mayhem"-mode tokens, only regular launches. Reads `isMayhemMode` off the on-chain bonding curve (cached per mint) via `mayhem-gate.js`. Applies to **every** trigger path, since it lives in the `executeBuy` chokepoint. `SNIPER_MAYHEM_FILTER=0` disables; `SNIPER_MAYHEM_STRICT=1` also skips when the curve can't be read.
-9. **Agent scoping** — `SNIPER_AGENT_IDS` restricts the worker to a specific set of agents, so a bounded run against the shared DB can't act on every other armed strategy.
+9. **Market-cap band (owner rule)** — buy only inside a market-cap window. Enforced at the `executeBuy` chokepoint (`marketCapBandReason`), so `new_mint`, `intel`, `alpha`, `first_claim`, `radar` and `swarm` all obey it. **Fails closed**: a coin whose market cap can't be confirmed inside the band is skipped, not bought. A per-strategy `min/max_market_cap_usd` only *tightens* the fleet-wide floor/ceil (`SNIPER_MIN_MC_FLOOR_USD` / `SNIPER_MAX_MC_CEIL_USD`) — it can never loosen it. On a blind `new_mint` snipe the create-event cap is ~$4k, so a $10k floor correctly rejects brand-new launches; use the `intel_confirmed` trigger to buy a coin *after* it pumps into the band.
+10. **Realized-loss circuit breaker (portfolio layer)** — once an agent's **net realized loss over the trailing 24 h** crosses its cap, it stops opening new positions for the rest of the window. Catches a fleet that bleeds one losing entry at a time — each trade passes the per-trade caps yet the wallet still grinds down. A profitable or break-even day never trips it; a DB hiccup never blocks (the lamports caps stay the backstop). The fleet-wide `SNIPER_MAX_DAILY_LOSS_SOL` protects every agent at once and is tightened by an optional per-strategy `daily_loss_limit_lamports`. **The same breaker gates the auto-funder** — a wallet past its loss cap stops being refilled, so the master can't keep pouring SOL after a wallet that only loses.
+11. **Agent scoping** — `SNIPER_AGENT_IDS` restricts the worker to a specific set of agents, so a bounded run against the shared DB can't act on every other armed strategy.
> **Wallet/funds pre-check.** An agent with no wallet or too little SOL is skipped
> *before* the idempotency claim, so it leaves no `failed` position row — those
@@ -93,7 +95,15 @@ Enforced in `executeBuy`, short-circuiting before any transaction:
| `SNIPER_MAYHEM_FILTER` | | `1` | Enforce the no-Mayhem rule (skip pump.fun Mayhem-mode tokens). `0` disables. |
| `SNIPER_MAYHEM_STRICT` | | `0` | `1` = skip a buy when the bonding curve can't be read (default allows-on-unknown, logged). |
| `SNIPER_AGENT_IDS` | | — | Comma/space-separated agent UUID allowlist. Unset = all agents for the network. |
+| `SNIPER_MIN_MC_FLOOR_USD` | | — | Fleet-wide market-cap floor (USD). Buys below it are skipped across every agent; a per-strategy `min_market_cap_usd` only tightens it. Unset = no floor. |
+| `SNIPER_MAX_MC_CEIL_USD` | | — | Fleet-wide market-cap ceiling (USD). Buys above it are skipped; a per-strategy `max_market_cap_usd` only tightens it. Unset = no ceiling. |
+| `SNIPER_MAX_DAILY_LOSS_SOL` | | — | Fleet-wide realized-loss cap (SOL) per trailing 24 h. An agent past it stops opening positions AND stops being auto-funded. Tightened by per-strategy `daily_loss_limit_lamports`. Unset = no cap. |
| `LAUNCHER_MASTER_DAILY_CAP_SOL` | | — | Hard per-UTC-day ceiling on total master-wallet outflow across automated funders. Unset = no cap. |
+| `SNIPER_AUTO_FUND_MIN_SOL` | | `0.02` | Auto-funder: refill an armed agent's wallet when it drops below this. |
+| `SNIPER_AUTO_FUND_TARGET_SOL` | | `0.05` | Auto-funder: balance a low wallet is topped up to. |
+| `SNIPER_AUTO_FUND_PER_TX_SOL` | | `0.1` | Auto-funder: max SOL moved in one top-up. |
+| `SNIPER_AUTO_FUND_DAILY_SOL` | | `1.0` | Auto-funder: max SOL moved per UTC day across **all** agents. |
+| `SNIPER_AUTO_FUND_PER_AGENT_DAILY_SOL` | | `0.25` | Auto-funder: max SOL any **single** agent can draw per UTC day — stops one bleeding wallet from consuming the whole fleet budget. `0` = off. |
| `SNIPER_CONFIRM_TIMEOUT_MS` | | `60000` | Per-trade confirmation wait. |
| `SNIPER_CLAIM_POLL_MS` | | `30000` | First-claim trigger: fee-claim poll cadence. |
| `SNIPER_CLAIM_LOOKBACK_S` | | `600` | First-claim trigger: window scanned each poll (must exceed the poll interval). |