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 Oracle conviction gate to sniper strategies

nirholas821786b1e1b6
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 336ba2f95..3234987b1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -37,6 +37,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr
- **Radar drawer: Oracle conviction scores now inline with coin intelligence** — When you open a coin in the /radar drawer, it now shows the Oracle conviction score alongside the coin intelligence analysis — score, tier badge, and four pillar bars (pedigree/structure/narrative/momentum), with a link to the full Oracle breakdown. Data loads asynchronously so the drawer opens instantly. (`/radar`) `[improvement]`
- **Rich OG cards on every shared coin link — price, score, and live status in the preview** — Every /launches/<mint> page now generates a dynamic social card — visible in X, Telegram, Discord, Slack, and iMessage link previews. The card shows the coin's logo, name and symbol, the Coin Intelligence quality score, the organic vs. bundle signal bars, unique buyer count, live market cap, and an outcome badge (GRADUATED / RUGGED / LIVE with a pulsing dot). Every shared link becomes a signal at a glance — no click required. (`/launches`) `[improvement]`
- **Sniper Strategies dashboard — manage autonomous trading agents** — A new dashboard page at /dashboard/sniper lets you arm, configure, and monitor your autonomous pump.fun sniper agents without touching code. Each agent gets its own strategy card: set daily budget, per-trade size, take-profit, stop-loss, trailing stop, and max hold time. Entry filters (market-cap range, creator history, social requirements) narrow which launches the agent snipes. Two trigger modes — new mint (snipe every launch) and first-claim (snipe when a creator claims rewards for the first time). A live-position strip streams open trades via SSE, with per-position unrealized PnL and Solscan links. Kill-switch is one click. All four sniper API endpoints (strategy, stream, trader, leaderboard) are now routed in production. (`/dashboard/sniper`) `[feature]`
+- **Sniper: Oracle conviction gate** — Agent sniper strategies now support a Min Oracle conviction setting (0–100). When set, the sniper checks the Oracle score before executing any buy — coins below the threshold are skipped and logged. The gate applies to all three trigger modes: new mint, first-claim, and intel-confirmed. Coins without a score yet (brand-new mints) are allowed through so launch speed is never sacrificed. Configure it in the sniper strategy form on the dashboard. (`/dashboard/sniper`) `[feature]`
- **The Sniper Arena is now a living 3D world** — The arena used to be a flat leaderboard. Now it's a real 3D world you walk into. Every armed AI agent stands on the trading floor as an animated avatar — the #1 agent up on a gold podium — and when they trade live, you see it happen: a cheer and a coin burst on a buy, confetti and a back-flip on a big win, a slump on a loss, each one tied to the same on-chain trade scrolling in the live tape. Pick your own avatar from a roster or the community gallery and walk the floor in third person with WASD or a touch joystick. Floating name tags track each agent with their live P&L, and a banner calls out the biggest win as it lands. Every number is real and verifiable on-chain — now it has a face. (`/play/arena`) `[feature]`
- **Watchlist — save any coin and track it with live Oracle scores** — Every launch card now has a bookmark button. Tap it to add the coin to your Watchlist at /watchlist — a personal live board of every coin you're watching. Each card refreshes every 30 seconds with real price, market cap, volume, and graduation progress. If Oracle has scored the coin, a conviction badge appears right on the card: tier (PRIME / STRONG / LEAN), overall score, and a compact pillar breakdown — Pedigree, Structure, Narrative, Momentum — so the four reads that matter are always visible without opening the coin's full page. (`/watchlist`) `[feature]`
- **Watchlist: live Oracle conviction badges on every watched coin** — Your watchlist now shows the Oracle conviction score and tier for every pinned coin — prime, strong, lean, watch, or avoid — right on the card. Scores load with a single batch API call (/api/oracle/batch) after the cards render, so the page stays fast. Tap any badge to open the full Oracle breakdown. The smart-money radar coin drawer also now shows the full Oracle verdict (score, tier, and four pillar bars) alongside the existing pedigree data. (`/watchlist`) `[improvement]`
diff --git a/api/_lib/migrations/20260616160000_sniper_oracle_gate.sql b/api/_lib/migrations/20260616160000_sniper_oracle_gate.sql
new file mode 100644
index 000000000..c085dc0d4
--- /dev/null
+++ b/api/_lib/migrations/20260616160000_sniper_oracle_gate.sql
@@ -0,0 +1,8 @@
+-- Sniper strategy: Oracle conviction gate.
+-- Adds min_oracle_score so a sniper strategy can require a minimum Oracle
+-- conviction score before executing a buy. Applied to first_claim and
+-- intel_confirmed triggers (where the coin already has some history);
+-- new_mint snipes almost never have a score yet so the field is advisory.
+alter table agent_sniper_strategies
+ add column if not exists min_oracle_score smallint
+ check (min_oracle_score >= 0 and min_oracle_score <= 100);
diff --git a/api/sniper/strategy.js b/api/sniper/strategy.js
index 575698b34..10b1ff529 100644
--- a/api/sniper/strategy.js
+++ b/api/sniper/strategy.js
@@ -81,6 +81,8 @@ const STRATEGY_SCHEMA = z.object({
stop_loss_pct: z.union([z.string(), z.number()]).optional(),
trailing_stop_pct: optPct,
max_hold_seconds: z.union([z.string(), z.number()]).optional(),
+ // Oracle conviction gate (0–100, null = skip check)
+ min_oracle_score: z.union([z.string(), z.number()]).nullable().optional(),
});
const atomicStr = (v, fallback = '0') => {
@@ -198,6 +200,7 @@ async function listStrategies(req, res, userId) {
stop_loss_pct: Number(s.stop_loss_pct),
trailing_stop_pct: s.trailing_stop_pct != null ? Number(s.trailing_stop_pct) : null,
max_hold_seconds: s.max_hold_seconds,
+ min_oracle_score: s.min_oracle_score != null ? Number(s.min_oracle_score) : null,
summary: {
open_positions: sum ? Number(sum.open_positions) : 0,
closed_positions: sum ? Number(sum.closed_positions) : 0,
@@ -243,6 +246,7 @@ async function upsertStrategy(req, res, userId) {
require_socials: false, require_sol_quote: true,
take_profit_pct: null, stop_loss_pct: 30, trailing_stop_pct: null,
max_hold_seconds: 1800,
+ min_oracle_score: null,
};
const next = {
@@ -268,6 +272,7 @@ async function upsertStrategy(req, res, userId) {
stop_loss_pct: p.stop_loss_pct != null ? Number(p.stop_loss_pct) : Number(cur.stop_loss_pct),
trailing_stop_pct: 'trailing_stop_pct' in p ? numOrNull(p.trailing_stop_pct) : (cur.trailing_stop_pct != null ? Number(cur.trailing_stop_pct) : null),
max_hold_seconds: p.max_hold_seconds != null ? clampInt(p.max_hold_seconds, 30, 86400, 1800) : cur.max_hold_seconds,
+ min_oracle_score: 'min_oracle_score' in p ? (p.min_oracle_score == null || p.min_oracle_score === '' ? null : Math.min(100, Math.max(0, Math.round(Number(p.min_oracle_score))))) : cur.min_oracle_score,
};
// Mandatory stop-loss — never let the DB constraint be the first line of defense.
@@ -294,7 +299,8 @@ async function upsertStrategy(req, res, userId) {
slippage_bps, max_price_impact_pct,
min_market_cap_usd, max_market_cap_usd, min_creator_graduated, max_creator_launches,
require_socials, require_sol_quote,
- take_profit_pct, stop_loss_pct, trailing_stop_pct, max_hold_seconds, updated_at)
+ take_profit_pct, stop_loss_pct, trailing_stop_pct, max_hold_seconds,
+ min_oracle_score, updated_at)
values
(${p.agent_id}, ${userId}, ${p.network}, ${next.enabled}, ${next.kill_switch},
${next.trigger}, ${next.buy_delay_ms}, ${next.min_claim_lamports}, ${next.max_claim_lamports}, ${next.first_claim_max_age_seconds},
@@ -302,7 +308,8 @@ async function upsertStrategy(req, res, userId) {
${next.slippage_bps}, ${next.max_price_impact_pct},
${next.min_market_cap_usd}, ${next.max_market_cap_usd}, ${next.min_creator_graduated}, ${next.max_creator_launches},
${next.require_socials}, ${next.require_sol_quote},
- ${next.take_profit_pct}, ${next.stop_loss_pct}, ${next.trailing_stop_pct}, ${next.max_hold_seconds}, now())
+ ${next.take_profit_pct}, ${next.stop_loss_pct}, ${next.trailing_stop_pct}, ${next.max_hold_seconds},
+ ${next.min_oracle_score}, now())
on conflict (agent_id, network) do update set
enabled = excluded.enabled,
kill_switch = excluded.kill_switch,
@@ -326,6 +333,7 @@ async function upsertStrategy(req, res, userId) {
stop_loss_pct = excluded.stop_loss_pct,
trailing_stop_pct = excluded.trailing_stop_pct,
max_hold_seconds = excluded.max_hold_seconds,
+ min_oracle_score = excluded.min_oracle_score,
updated_at = now()
returning *
`;
@@ -357,6 +365,7 @@ async function upsertStrategy(req, res, userId) {
stop_loss_pct: Number(row.stop_loss_pct),
trailing_stop_pct: row.trailing_stop_pct != null ? Number(row.trailing_stop_pct) : null,
max_hold_seconds: row.max_hold_seconds,
+ min_oracle_score: row.min_oracle_score != null ? Number(row.min_oracle_score) : null,
},
});
}
diff --git a/data/changelog.json b/data/changelog.json
index c2a98b3d4..14ed255ae 100644
--- a/data/changelog.json
+++ b/data/changelog.json
@@ -1,6 +1,13 @@
{
"$comment": "Curated changelog entries for three.ws — the editorial layer of the public changelog. New PAGE launches are tracked automatically via the `added` field in data/pages.json; this file is for everything else holders care about: improvements, fixes, SDK releases, trading/payments capabilities, security work. scripts/build-page-index.mjs merges both sources into CHANGELOG.md, public/changelog.json, and public/changelog.xml. Newest first. Allowed tags: feature, improvement, fix, sdk, infra, docs, security. `link` is optional and must be a live three.ws path.",
"entries": [
+ {
+ "date": "2026-06-16",
+ "title": "Sniper: Oracle conviction gate",
+ "summary": "Agent sniper strategies now support a Min Oracle conviction setting (0–100). When set, the sniper checks the Oracle score before executing any buy — coins below the threshold are skipped and logged. The gate applies to all three trigger modes: new mint, first-claim, and intel-confirmed. Coins without a score yet (brand-new mints) are allowed through so launch speed is never sacrificed. Configure it in the sniper strategy form on the dashboard.",
+ "tags": ["feature"],
+ "link": "/dashboard/sniper"
+ },
{
"date": "2026-06-16",
"title": "Portfolio: Oracle conviction for every token you hold",
diff --git a/public/changelog.json b/public/changelog.json
index 8dfcd9e00..028b33ac3 100644
--- a/public/changelog.json
+++ b/public/changelog.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-06-16T06:10:51.426Z",
+ "generated_at": "2026-06-16T06:20:19.677Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json",
"site": {
"name": "three.ws",
@@ -321,6 +321,16 @@
"feature"
]
},
+ {
+ "date": "2026-06-16",
+ "type": "update",
+ "title": "Sniper: Oracle conviction gate",
+ "summary": "Agent sniper strategies now support a Min Oracle conviction setting (0–100). When set, the sniper checks the Oracle score before executing any buy — coins below the threshold are skipped and logged. The gate applies to all three trigger modes: new mint, first-claim, and intel-confirmed. Coins without a score yet (brand-new mints) are allowed through so launch speed is never sacrificed. Configure it in the sniper strategy form on the dashboard.",
+ "link": "/dashboard/sniper",
+ "tags": [
+ "feature"
+ ]
+ },
{
"date": "2026-06-16",
"type": "update",
diff --git a/public/changelog.xml b/public/changelog.xml
index a805d8222..9d144bde0 100644
--- a/public/changelog.xml
+++ b/public/changelog.xml
@@ -254,6 +254,14 @@
<category>feature</category>
<description>A new dashboard page at /dashboard/sniper lets you arm, configure, and monitor your autonomous pump.fun sniper agents without touching code. Each agent gets its own strategy card: set daily budget, per-trade size, take-profit, stop-loss, trailing stop, and max hold time. Entry filters (market-cap range, creator history, social requirements) narrow which launches the agent snipes. Two trigger modes — new mint (snipe every launch) and first-claim (snipe when a creator claims rewards for the first time). A live-position strip streams open trades via SSE, with per-position unrealized PnL and Solscan links. Kill-switch is one click. All four sniper API endpoints (strategy, stream, trader, leaderboard) are now routed in production.</description>
</item>
+ <item>
+ <title>Sniper: Oracle conviction gate</title>
+ <link>https://three.ws/dashboard/sniper</link>
+ <guid isPermaLink="false">2026-06-16:Sniper: Oracle conviction gate</guid>
+ <pubDate>Tue, 16 Jun 2026 12:00:00 GMT</pubDate>
+ <category>feature</category>
+ <description>Agent sniper strategies now support a Min Oracle conviction setting (0–100). When set, the sniper checks the Oracle score before executing any buy — coins below the threshold are skipped and logged. The gate applies to all three trigger modes: new mint, first-claim, and intel-confirmed. Coins without a score yet (brand-new mints) are allowed through so launch speed is never sacrificed. Configure it in the sniper strategy form on the dashboard.</description>
+ </item>
<item>
<title>The Sniper Arena is now a living 3D world</title>
<link>https://three.ws/play/arena</link>
diff --git a/public/features.json b/public/features.json
index a942b8eb7..35d54333e 100644
--- a/public/features.json
+++ b/public/features.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-06-16T06:10:51.415Z",
+ "generated_at": "2026-06-16T06:20:19.666Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json",
"site": {
"name": "three.ws",
diff --git a/src/dashboard-next/pages/sniper.js b/src/dashboard-next/pages/sniper.js
index f98ecb860..b8bfe8577 100644
--- a/src/dashboard-next/pages/sniper.js
+++ b/src/dashboard-next/pages/sniper.js
@@ -400,6 +400,11 @@ function stratForm(s) {
<option value="false" ${s.require_sol_quote === false ? 'selected' : ''}>No</option>
</select>
</div>
+ <div class="sn-field">
+ <label>Min Oracle conviction (0–100)</label>
+ <input name="min_oracle_score" type="number" step="1" min="0" max="100" value="${s.min_oracle_score != null ? s.min_oracle_score : ''}" placeholder="any" />
+ <span class="sn-hint">Skip the snipe if Oracle conviction is below this. Leave blank to snipe regardless of conviction. New mints without a score are allowed through.</span>
+ </div>
${s.trigger === 'first_claim' ? firstClaimFields(s) : ''}
@@ -613,6 +618,7 @@ async function saveForm(form, root) {
max_creator_launches: fd.max_creator_launches !== '' ? Number(fd.max_creator_launches) : null,
require_socials: fd.require_socials === 'true',
require_sol_quote: fd.require_sol_quote !== 'false',
+ min_oracle_score: fd.min_oracle_score !== '' ? Math.round(Number(fd.min_oracle_score)) : null,
};
if (fd.trigger === 'first_claim') {
body.min_claim_lamports = fd.min_claim_lamports_sol !== '' ? solToLamports(fd.min_claim_lamports_sol) : null;
diff --git a/workers/agent-sniper/first-claim-watch.js b/workers/agent-sniper/first-claim-watch.js
index 4925abeea..12fed9e80 100644
--- a/workers/agent-sniper/first-claim-watch.js
+++ b/workers/agent-sniper/first-claim-watch.js
@@ -15,6 +15,7 @@
import { scanFirstClaims } from '../../api/_lib/pump-claims.js';
import { scoreClaim } from './claim-scorer.js';
import { executeBuy } from './executor.js';
+import { oracleGate } from './oracle-gate.js';
import { cachedStrategies } from './strategy-store.js';
import { log } from './log.js';
@@ -41,8 +42,14 @@ export function startFirstClaimWatch({ cfg, queue, throttle, isHalted }) {
const scheduleBuy = (strat, candidate) => {
const delay = Math.max(0, Math.min(600_000, Number(strat.buy_delay_ms) || 0));
+ const execJob = async () => {
+ const og = await oracleGate(candidate.mint, cfg.network, strat);
+ if (!og.pass) { log.info('oracle gate skip', { agent: strat.agent_id, mint: candidate.mint, reason: og.reason }); return; }
+ if (og.skipped) log.info('oracle unscored — proceeding', { agent: strat.agent_id, mint: candidate.mint });
+ await executeBuy({ cfg, strat, mint: candidate, throttle });
+ };
if (delay === 0) {
- if (!isHalted()) queue.push(() => executeBuy({ cfg, strat, mint: candidate, throttle }));
+ if (!isHalted()) queue.push(execJob);
return;
}
const timer = setTimeout(() => {
@@ -51,7 +58,7 @@ export function startFirstClaimWatch({ cfg, queue, throttle, isHalted }) {
log.info('first-claim buy (delayed)', {
agent: strat.agent_id, mint: candidate.mint, delayMs: delay,
});
- queue.push(() => executeBuy({ cfg, strat, mint: candidate, throttle }));
+ queue.push(execJob);
}, delay);
if (timer.unref) timer.unref();
timers.add(timer);
diff --git a/workers/agent-sniper/index.js b/workers/agent-sniper/index.js
index f8dc2b067..fe5a36bc4 100644
--- a/workers/agent-sniper/index.js
+++ b/workers/agent-sniper/index.js
@@ -15,6 +15,7 @@ import { log } from './log.js';
import { refreshStrategies, cachedStrategies, logStrategyLoad } from './strategy-store.js';
import { scoreMint, scoreIntel } from './scorer.js';
import { executeBuy } from './executor.js';
+import { oracleGate } from './oracle-gate.js';
import { runPositionSweep } from './positions.js';
import { startFirstClaimWatch } from './first-claim-watch.js';
import { startIntelWatcher } from './intel/watcher.js';
@@ -83,7 +84,12 @@ async function main() {
const { pass, reasons } = scoreMint(data, strat);
if (!pass) continue;
log.info('candidate', { agent: strat.agent_id, mint: data.mint, symbol: data.symbol, reasons });
- queue.push(() => executeBuy({ cfg, strat, mint: data, throttle }));
+ queue.push(async () => {
+ const og = await oracleGate(data.mint, cfg.network, strat);
+ if (!og.pass) { log.info('oracle gate skip', { agent: strat.agent_id, mint: data.mint, reason: og.reason }); return; }
+ if (og.skipped) log.info('oracle unscored — proceeding', { agent: strat.agent_id, mint: data.mint });
+ await executeBuy({ cfg, strat, mint: data, throttle });
+ });
}
};
@@ -108,10 +114,15 @@ async function main() {
const { pass, score, reasons } = scoreIntel(rec, strat, weights);
if (!pass) return;
log.info('intel candidate', { agent: strat.agent_id, mint: rec.mint, symbol: rec.symbol, score, reasons });
- queue.push(() => executeBuy({
- cfg, strat, throttle,
- mint: { mint: rec.mint, symbol: rec.symbol, name: rec.name, entry_trigger: 'intel_confirmed', trigger_ref: rec.mint },
- }));
+ queue.push(async () => {
+ const og = await oracleGate(rec.mint, cfg.network, strat);
+ if (!og.pass) { log.info('oracle gate skip', { agent: strat.agent_id, mint: rec.mint, reason: og.reason }); return; }
+ if (og.skipped) log.info('oracle unscored — proceeding', { agent: strat.agent_id, mint: rec.mint });
+ await executeBuy({
+ cfg, strat, throttle,
+ mint: { mint: rec.mint, symbol: rec.symbol, name: rec.name, entry_trigger: 'intel_confirmed', trigger_ref: rec.mint },
+ });
+ });
})
.catch((err) => log.error('intel score failed', { mint: rec.mint, err: err?.message }));
}
diff --git a/workers/agent-sniper/oracle-gate.js b/workers/agent-sniper/oracle-gate.js
new file mode 100644
index 000000000..7cb58cab4
--- /dev/null
+++ b/workers/agent-sniper/oracle-gate.js
@@ -0,0 +1,72 @@
+// agent-sniper — Oracle conviction gate.
+//
+// Checked AFTER the pure scorers (scoreMint, scoreClaim, scoreIntel) pass.
+// Only fires when a strategy has min_oracle_score set; skips silently when
+// the coin has no Oracle score yet (e.g. brand-new mints that haven't been
+// classified). Caches each result within a 30-second window so repeated
+// lookups within a burst share one DB round-trip.
+
+import { sql } from '../../api/_lib/db.js';
+import { log } from './log.js';
+
+const _cache = new Map(); // key → { score, ts }
+const CACHE_TTL_MS = 30_000;
+
+function n(v) {
+ const x = Number(v);
+ return Number.isFinite(x) ? x : null;
+}
+
+/**
+ * Look up the Oracle conviction score for a mint and decide whether the
+ * strategy's min_oracle_score threshold is met.
+ *
+ * Returns:
+ * { pass: true } — scored and above threshold (or no threshold)
+ * { pass: false, reason: string } — scored and below threshold
+ * { pass: true, skipped: true } — no Oracle score yet; gate deferred
+ *
+ * @param {string} mint
+ * @param {string} network
+ * @param {object} strat agent_sniper_strategies row
+ */
+export async function oracleGate(mint, network, strat) {
+ const minScore = strat.min_oracle_score != null ? n(strat.min_oracle_score) : null;
+ if (minScore == null) return { pass: true };
+
+ const cacheKey = `${network}:${mint}`;
+ const cached = _cache.get(cacheKey);
+ let score;
+ if (cached && Date.now() - cached.ts < CACHE_TTL_MS) {
+ score = cached.score;
+ } else {
+ try {
+ const [row] = await sql`
+ select score from oracle_conviction
+ where mint = ${mint} and network = ${network}
+ limit 1
+ `;
+ score = row?.score != null ? n(row.score) : null;
+ _cache.set(cacheKey, { score, ts: Date.now() });
+ // Prune the cache when it grows large.
+ if (_cache.size > 2000) {
+ const cutoff = Date.now() - CACHE_TTL_MS;
+ for (const [k, v] of _cache) if (v.ts < cutoff) _cache.delete(k);
+ }
+ } catch (err) {
+ log.warn('oracle gate db error — allowing snipe', { mint, err: err?.message });
+ return { pass: true, skipped: true };
+ }
+ }
+
+ if (score == null) {
+ // Not yet scored — allow the snipe (Oracle lags new mints by design).
+ return { pass: true, skipped: true };
+ }
+
+ if (score < minScore) {
+ return { pass: false, reason: `oracle_below_min:${score}<${minScore}` };
+ }
+
+ return { pass: true };
+}