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.

feat(robinhood): add venue catalog, mint and reputation modules to the Robinhood Crypto feed worker and expose them through the MCP tool and API

nirholasa6fd7c28f88a
diff --git a/api/_lib/robinhood-feed.js b/api/_lib/robinhood-feed.js
new file mode 100644
index 000000000..5f2b46f35
--- /dev/null
+++ b/api/_lib/robinhood-feed.js
@@ -0,0 +1,62 @@
+// Launches from the robinhood-feed worker (workers/robinhood-feed), which
+// watches every launch venue observed on Robinhood Chain and grades each
+// deployer. This is the network boundary: the worker's payload is untrusted, so
+// each field is checked before it reaches a caller, and an unreachable worker
+// yields an empty list rather than invented launches.
+
+const FEED_URL = process.env.ROBINHOOD_FEED_URL || 'http://localhost:8788';
+const TIMEOUT_MS = 3000;
+const EVM_ADDR_RE = /^0x[a-fA-F0-9]{40}$/;
+const TX_RE = /^0x[a-fA-F0-9]{64}$/;
+const FLAGS = new Set(['dev_sold', 'serial_exit', 'prior_dev_exit', 'serial_deployer']);
+
+const finite = (v) => (typeof v === 'number' && Number.isFinite(v) ? v : null);
+const count = (v) => (Number.isInteger(v) && v >= 0 ? v : null);
+
+/** One worker launch event → the /api/v1/robinhood/launches row shape, or null when unusable. */
+export function launchFromFeedEvent(ev) {
+ const d = ev?.kind === 'launch' ? ev.data : null;
+ if (!d || typeof d !== 'object' || !EVM_ADDR_RE.test(d.mint || '')) return null;
+ const dep = d.deployer && typeof d.deployer === 'object' ? d.deployer : null;
+ const venue = d.venue && typeof d.venue === 'object' && typeof d.venue.id === 'string' ? d.venue : null;
+ const ts = finite(d.timestamp);
+ return {
+ launchpad: venue?.label || (typeof d.launchpad === 'string' ? d.launchpad : 'Unknown'),
+ type: venue?.kind || 'launchpad',
+ venue: venue
+ ? { id: venue.id, label: String(venue.label || venue.id), kind: String(venue.kind || 'launchpad'), address: EVM_ADDR_RE.test(venue.address || '') ? venue.address : null }
+ : null,
+ token: d.mint,
+ deployer: EVM_ADDR_RE.test(d.creator || '') ? d.creator : null,
+ deployerRecord: dep
+ ? {
+ priorLaunches: count(dep.prior_launches),
+ priorDevExits: count(dep.prior_dev_exits),
+ inspected: count(dep.inspected),
+ windowBlocks: count(dep.window_blocks),
+ }
+ : null,
+ devSold: typeof d.dev_sold === 'boolean' ? d.dev_sold : null,
+ devSoldPct: finite(d.dev_sold_pct),
+ flags: Array.isArray(d.flags) ? d.flags.filter((f) => FLAGS.has(f)) : [],
+ block: finite(d.block_number) ?? 0,
+ txHash: TX_RE.test(d.signature || '') ? d.signature : null,
+ timestamp: ts != null ? new Date(ts * 1000).toISOString() : null,
+ symbol: typeof d.symbol === 'string' ? d.symbol : null,
+ name: typeof d.name === 'string' ? d.name : null,
+ };
+}
+
+/**
+ * Newest launches across every observed venue. Returns [] when the worker does not answer.
+ */
+export async function recentFeedLaunches({ limit = 40 } = {}) {
+ const res = await fetch(`${FEED_URL}/recent?kind=launch&limit=${Math.min(200, limit)}`, {
+ headers: { accept: 'application/json' },
+ signal: AbortSignal.timeout(TIMEOUT_MS),
+ }).catch(() => null);
+ if (!res?.ok) return [];
+ const body = await res.json().catch(() => null);
+ const events = Array.isArray(body?.events) ? body.events : [];
+ return events.map(launchFromFeedEvent).filter(Boolean);
+}
diff --git a/api/_lib/robinhood.js b/api/_lib/robinhood.js
index b8493de10..59294ad24 100644
--- a/api/_lib/robinhood.js
+++ b/api/_lib/robinhood.js
@@ -3,7 +3,7 @@
// Robinhood Chain is a permissionless Arbitrum Orbit L2 (chain ID 4663, ETH
// gas, ~100ms blocks, mainnet live 2026-07-01). It hosts ~95 tokenized Stock
// Tokens — plain ERC-20s with one Chainlink price feed each — plus a memecoin
-// ecosystem (NOXA, The Odyssey launchpads). No third-party aggregator offers a
+// ecosystem (The Odyssey and the launch venues observed on chain). No third-party aggregator offers a
// clean market-data view of it: GeckoTerminal doesn't index the chain, RWA.xyz
// is enterprise-paid, CoinGecko has no equity semantics. This module is the
// missing layer.
@@ -14,7 +14,7 @@
// • holders / token stats / gas — Blockscout Pro API
// • chain TVL — DefiLlama (/chain/robinhood-chain)
// • memecoin screener — CoinGecko categories + DexScreener
-// • launchpad activity — on-chain eth_getLogs (NOXA / Odyssey factories)
+// • launchpad activity , on-chain eth_getLogs (Odyssey factories)
//
// Failover: Alchemy (when ROBINHOOD_ALCHEMY_KEY is set) → RPC_URL_4663 override
// → the public sequencer RPC, as one viem fallback transport with per-request
@@ -609,8 +609,9 @@ export async function coingeckoCategory(category, { order = 'market_cap_desc', p
// ── Launchpad activity (on-chain eth_getLogs) ──────────────────────────────
// Addresses + event ABIs extracted and confirmed against live logs during the
-// Wave-1 SDK build (neither launchpad verifies source on Blockscout).
-export const NOXA_FACTORY = '0xD9eC2db5f3D1b236843925949fe5bd8a3836FCcB';
+// Wave-1 SDK build (the factory does not verify source on Blockscout). NOXA shut
+// down on 2026-07-13 and is no longer watched; every other venue arrives through
+// the robinhood-feed worker (api/_lib/robinhood-feed.js).
export const ODYSSEY_FACTORIES = [
'0xEb3FeeD2716cF0eEAda05B22e67424794e1f5a80', // bonding-curve
'0x6Ce85c4b7cE12903E5867652C265bCcce57f935F', // reflection
@@ -622,8 +623,6 @@ export const ODYSSEY_FACTORIES = [
// launches are read from Blockscout's decoded-log API filtered by topic instead
// — no range guessing, always newest-first. Indexed params live in `topics`:
// topics[1] = token, topics[2] = deployer/creator (both 32-byte left-padded).
-const NOXA_TOKEN_LAUNCHED_TOPIC =
- '0xdb51ea9ad51ab453a65a4cb7e60c3cb378c9501bb002609f8f97778fb6c4235a';
const ODYSSEY_TOKEN_CREATED_TOPIC =
'0xa52263eeb2ea349365a35c006fc978b0b85eb109fe50959959c829b329bebf9e';
@@ -658,13 +657,12 @@ async function launchesFromFactory(addr, topic, launchpad, type) {
}
/**
- * Recent launchpad launches from NOXA + The Odyssey factories, newest first.
+ * Recent launches from The Odyssey factories, newest first.
* Read from Blockscout's decoded-log API (reliable + unbounded) rather than the
* range-capped public-RPC eth_getLogs. Cached 45s per factory.
*/
export async function recentLaunches({ limit = 40 } = {}) {
const jobs = [
- launchesFromFactory(NOXA_FACTORY, NOXA_TOKEN_LAUNCHED_TOPIC, 'NOXA', 'instant'),
...ODYSSEY_FACTORIES.map((addr) =>
launchesFromFactory(addr, ODYSSEY_TOKEN_CREATED_TOPIC, 'The Odyssey', 'bonding-curve'),
),
diff --git a/api/_mcp/tools/robinhood.js b/api/_mcp/tools/robinhood.js
new file mode 100644
index 000000000..3a4fc4f07
--- /dev/null
+++ b/api/_mcp/tools/robinhood.js
@@ -0,0 +1,250 @@
+// Robinhood Chain (4663) read-only MCP tools: chain stats, token prices, recent
+// launchpad launches and a wallet's holdings. Every tool is a thin front door
+// onto api/_lib/robinhood.js (the same module behind /api/v1/robinhood/*), so
+// the MCP surface shares its RPC failover list, caches and Chainlink/DexScreener
+// readers with the REST surface and never opens a second chain client.
+//
+// Nothing here signs, sends or writes: all four are readOnlyHint tools.
+
+import {
+ asOf,
+ blockscoutAddressTokens,
+ blockscoutStats,
+ chainTvlCurrent,
+ chainlinkSnapshot,
+ dexSnapshot,
+ erc20Metadata,
+ findStock,
+ publicClient,
+ recentLaunches,
+ stockRegistry,
+} from '../../_lib/robinhood.js';
+import { normalizeAddress, toUnits } from '../../_lib/robinhood-desk.js';
+import { clientIp, limits } from '../../_lib/rate-limit.js';
+
+const READ = { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true };
+
+const ADDRESS = { type: 'string', pattern: '^0x[0-9a-fA-F]{40}$', description: 'A 20-byte Robinhood Chain (4663) address.' };
+
+function ok(structured) {
+ return { content: [{ type: 'text', text: JSON.stringify(structured, null, 2) }], structuredContent: structured };
+}
+
+function bad(error, message) {
+ return { content: [{ type: 'text', text: `Error (${error}): ${message}` }], structuredContent: { error, message }, isError: true };
+}
+
+// Same 60/min per-IP bucket the REST surface uses. `req` is absent under
+// non-HTTP dispatch (unit tests), where there is no IP to meter.
+async function metered(req) {
+ if (!req) return null;
+ const rl = await limits.robinhoodRead(clientIp(req));
+ return rl.success ? null : bad('rate_limited', 'Robinhood Chain data is capped at 60 requests/min per IP.');
+}
+
+const num = (v) => (v != null && Number.isFinite(Number(v)) ? Number(v) : null);
+
+async function chainStats() {
+ const [stats, tvl, blockNumber] = await Promise.all([
+ blockscoutStats().catch(() => null),
+ chainTvlCurrent().catch(() => null),
+ publicClient(false)
+ .getBlockNumber()
+ .then((n) => Number(n))
+ .catch(() => null),
+ ]);
+ const s = stats && !stats.__error ? stats : null;
+ return {
+ chain: { name: 'Robinhood Chain', chainId: 4663, type: 'Arbitrum Orbit L2', gasToken: 'ETH', explorer: 'https://robinhoodchain.blockscout.com' },
+ blockHeight: blockNumber ?? (s?.total_blocks ? Number(s.total_blocks) : null),
+ averageBlockTimeMs: num(s?.average_block_time),
+ totalTransactions: s?.total_transactions ?? null,
+ totalAddresses: s?.total_addresses ?? null,
+ gasGwei: s?.gas_prices ? { slow: s.gas_prices.slow ?? null, average: s.gas_prices.average ?? null, fast: s.gas_prices.fast ?? null } : null,
+ ethPriceUsd: num(s?.coin_price),
+ tvl,
+ asOf: asOf(),
+ };
+}
+
+async function tokenPrices({ symbols = [], addresses = [] }) {
+ const wanted = new Map();
+ const unknown = [];
+ for (const sym of symbols) {
+ const stock = findStock(sym);
+ if (stock) wanted.set(stock.address.toLowerCase(), stock);
+ else unknown.push(sym);
+ }
+ const invalid = [];
+ for (const a of addresses) {
+ const addr = normalizeAddress(a);
+ if (!addr) invalid.push(a);
+ else if (!wanted.has(addr)) {
+ const stock = stockRegistry().tokens.find((t) => t.address.toLowerCase() === addr);
+ wanted.set(addr, stock || null);
+ }
+ }
+ const list = [...wanted.keys()];
+ const [nav, dex] = await Promise.all([
+ [...wanted.values()].some((s) => s?.feed) ? chainlinkSnapshot().catch(() => ({})) : {},
+ dexSnapshot(list).catch(() => ({})),
+ ]);
+ const prices = list.map((address) => {
+ const stock = wanted.get(address);
+ const feed = stock ? nav[address] || null : null;
+ const pair = dex[address] || null;
+ const navPriceUsd = feed?.priceUsd ?? null;
+ const dexPriceUsd = num(pair?.priceUsd);
+ return {
+ address,
+ symbol: stock?.symbol || pair?.baseToken?.symbol || null,
+ name: stock?.name || pair?.baseToken?.name || null,
+ kind: stock ? 'stock-token' : 'coin',
+ priceUsd: navPriceUsd ?? dexPriceUsd,
+ priceSource: navPriceUsd != null ? 'chainlink-nav' : dexPriceUsd != null ? 'dex' : null,
+ navPriceUsd,
+ navUpdatedAt: feed?.updatedAt ?? null,
+ dexPriceUsd,
+ change24hPct: num(pair?.priceChange?.h24),
+ liquidityUsd: num(pair?.liquidity?.usd),
+ volume24hUsd: num(pair?.volume?.h24),
+ };
+ });
+ return { prices, notFound: { symbols: unknown, invalidAddresses: invalid }, asOf: asOf() };
+}
+
+async function walletHoldings({ address }) {
+ const owner = normalizeAddress(address);
+ const [nativeWei, balances] = await Promise.all([
+ publicClient(false).getBalance({ address: owner }).then((v) => v.toString()).catch(() => null),
+ blockscoutAddressTokens(owner).catch(() => []),
+ ]);
+ const held = balances
+ .map((b) => ({
+ address: normalizeAddress(b?.token?.address_hash || b?.token?.address),
+ raw: b?.value ?? null,
+ type: b?.token?.type || 'ERC-20',
+ decimals: b?.token?.decimals != null ? Number(b.token.decimals) : null,
+ symbol: b?.token?.symbol || null,
+ name: b?.token?.name || null,
+ }))
+ .filter((t) => t.address && t.raw && t.type === 'ERC-20');
+
+ const gaps = held.filter((t) => t.decimals == null || !t.symbol).map((t) => t.address);
+ const stockByAddress = new Map(stockRegistry().tokens.map((t) => [t.address.toLowerCase(), t]));
+ const [meta, dex, nav] = await Promise.all([
+ erc20Metadata(gaps).catch(() => ({})),
+ dexSnapshot(held.map((t) => t.address)).catch(() => ({})),
+ held.some((t) => stockByAddress.has(t.address)) ? chainlinkSnapshot().catch(() => ({})) : {},
+ ]);
+
+ const positions = held.map((t) => {
+ const fallback = meta[t.address] || {};
+ const decimals = t.decimals ?? fallback.decimals ?? null;
+ const stock = stockByAddress.get(t.address) || null;
+ const feed = stock ? nav[t.address] || null : null;
+ const pair = dex[t.address] || null;
+ // ERC-8056: a Stock Token's true position is raw x uiMultiplier / 1e18; its
+ // Chainlink NAV is already multiplier-adjusted, so the multiplier touches
+ // the balance once and never the price.
+ const rawUnits = decimals != null ? toUnits(t.raw, decimals) : null;
+ const multiplier = feed?.uiMultiplier ? Number(feed.uiMultiplier) / 1e18 : 1;
+ const amount = rawUnits != null ? rawUnits * multiplier : null;
+ const navPriceUsd = feed?.priceUsd ?? null;
+ const dexPriceUsd = num(pair?.priceUsd);
+ const priceUsd = navPriceUsd ?? dexPriceUsd;
+ return {
+ address: t.address,
+ symbol: t.symbol || fallback.symbol || pair?.baseToken?.symbol || null,
+ name: t.name || fallback.name || pair?.baseToken?.name || null,
+ kind: stock ? 'stock-token' : 'coin',
+ rawBalance: String(t.raw),
+ decimals,
+ amount,
+ priceUsd,
+ priceSource: navPriceUsd != null ? 'chainlink-nav' : dexPriceUsd != null ? 'dex' : null,
+ valueUsd: amount != null && priceUsd != null ? amount * priceUsd : null,
+ };
+ });
+ positions.sort((a, b) => (b.valueUsd ?? -1) - (a.valueUsd ?? -1));
+ return {
+ address: owner,
+ nativeEth: nativeWei != null ? { wei: nativeWei, amount: toUnits(nativeWei, 18) } : null,
+ positions,
+ pricedValueUsd: positions.reduce((sum, p) => sum + (p.valueUsd || 0), 0),
+ unpricedCount: positions.filter((p) => p.valueUsd == null).length,
+ asOf: asOf(),
+ };
+}
+
+export const toolDefs = [
+ {
+ name: 'robinhood_chain_stats',
+ title: 'Robinhood Chain stats',
+ group: 'robinhood',
+ annotations: READ,
+ description:
+ 'Live Robinhood Chain (chain id 4663, an Arbitrum Orbit L2 with ETH gas) health: current block height read from the chain RPC, average block time, total transactions and addresses, gas prices in gwei, the ETH price and chain TVL. Use this to check the chain is up or to get a block number.',
+ inputSchema: { type: 'object', properties: {}, additionalProperties: false },
+ async handler(_args, _auth, req) {
+ const blocked = await metered(req);
+ return blocked || ok(await chainStats());
+ },
+ },
+ {
+ name: 'robinhood_token_prices',
+ title: 'Robinhood Chain token prices',
+ group: 'robinhood',
+ annotations: READ,
+ description:
+ 'Live USD prices for tokens on Robinhood Chain. Pass registry Stock Token tickers in symbols (priced from the Chainlink NAV feed, uiMultiplier-correct) and/or any token contract addresses (priced from the deepest DEX pool). Each price reports its source, 24h change and pool liquidity; a token with no feed and no pool comes back with a null price, never a guess.',
+ inputSchema: {
+ type: 'object',
+ properties: {
+ symbols: { type: 'array', items: { type: 'string', minLength: 1, maxLength: 16 }, maxItems: 30, description: 'Stock Token tickers, for example ["AAPL","TSLA"].' },
+ addresses: { type: 'array', items: ADDRESS, maxItems: 30, description: 'Token contract addresses.' },
+ },
+ additionalProperties: false,
+ },
+ async handler(args, _auth, req) {
+ const symbols = args.symbols || [];
+ const addresses = args.addresses || [];
+ if (!symbols.length && !addresses.length) return bad('missing_input', 'Pass at least one ticker in symbols or one contract address in addresses.');
+ const blocked = await metered(req);
+ return blocked || ok(await tokenPrices({ symbols, addresses }));
+ },
+ },
+ {
+ name: 'robinhood_recent_launches',
+ title: 'Recent Robinhood Chain launches',
+ group: 'robinhood',
+ annotations: READ,
+ description:
+ 'The newest coins launched on Robinhood Chain launchpads (The Odyssey bonding curves), newest first, read from the factory contracts via the indexer. Each row has the token, launchpad, block and transaction. For every venue with deployer and dev-sold flags use /api/v1/robinhood/launches.',
+ inputSchema: {
+ type: 'object',
+ properties: { limit: { type: 'integer', minimum: 1, maximum: 100, default: 20 } },
+ additionalProperties: false,
+ },
+ async handler(args, _auth, req) {
+ const blocked = await metered(req);
+ if (blocked) return blocked;
+ const launches = await recentLaunches({ limit: args.limit || 20 });
+ return ok({ launches, count: launches.length, asOf: asOf() });
+ },
+ },
+ {
+ name: 'robinhood_wallet_holdings',
+ title: 'Robinhood Chain wallet holdings',
+ group: 'robinhood',
+ annotations: READ,
+ description:
+ 'Everything a wallet holds on Robinhood Chain: native ETH plus every ERC-20, priced from the Chainlink NAV (Stock Tokens, multiplier-correct per ERC-8056) or the deepest DEX pool. Unpriced tokens are listed with a null value and counted in unpricedCount, never valued at zero. Read-only: any public address can be inspected, no signature needed.',
+ inputSchema: { type: 'object', properties: { address: ADDRESS }, required: ['address'], additionalProperties: false },
+ async handler(args, _auth, req) {
+ if (!normalizeAddress(args.address)) return bad('invalid_address', 'address must be a 20-byte 0x-prefixed Robinhood Chain address.');
+ const blocked = await metered(req);
+ return blocked || ok(await walletHoldings(args));
+ },
+ },
+];
diff --git a/api/robinhood/coin-trades.js b/api/robinhood/coin-trades.js
index 71bc678a3..b74f2fc12 100644
--- a/api/robinhood/coin-trades.js
+++ b/api/robinhood/coin-trades.js
@@ -10,7 +10,7 @@
// robinhood-feed worker README for the full field-naming divergence.)
//
// Backed by the robinhood-feed firehose worker's /recent snapshot (real
-// NOXA + Odyssey + Uniswap v3 events, no mocks). If the worker isn't running
+// Odyssey + Uniswap v3 events, no mocks). If the worker isn't running
// (ROBINHOOD_FEED_URL unset or unreachable), this responds with an EMPTY,
// clearly-flagged payload rather than fabricating trades — the in-world HUD
// renders its designed empty state instead of a fake feed.
diff --git a/api/robinhood/play-worlds.js b/api/robinhood/play-worlds.js
index 8e67086d3..d514d59e6 100644
--- a/api/robinhood/play-worlds.js
+++ b/api/robinhood/play-worlds.js
@@ -7,8 +7,8 @@
// — see src/game/world-env.js seedFromString), so a card click drops straight
// into /temporary?coin=<address> unmodified.
//
-// Sourced from the robinhood-feed firehose worker's real launch backlog (NOXA +
-// The Odyssey). `members`/`posts` are the CoinCommunities social-layer counters,
+// Sourced from the robinhood-feed firehose worker's real launch backlog (every
+// observed launch venue). `members`/`posts` are the CoinCommunities social-layer counters,
// which start at 0 for a brand-new chain — never fabricated to look populated.
// If the firehose worker isn't running, this returns an empty, clearly-flagged
// list (the lobby's existing designed-empty state), not fake cards.
diff --git a/src/launch-robinhood/page.js b/src/launch-robinhood/page.js
index 3c0e29fcd..3b325a268 100644
--- a/src/launch-robinhood/page.js
+++ b/src/launch-robinhood/page.js
@@ -11,11 +11,12 @@
import './page.css';
import { ensureRiskAck } from '../shared/risk-ack.js';
+import { shortAddress } from '../shared/address.js';
const $ = (s, r = document) => r.querySelector(s);
const esc = (v) =>
String(v ?? '').replace(/[&<>"']/g, (c) => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#39;' })[c]);
-const short = (a) => (a ? `${a.slice(0, 6)}…${a.slice(-4)}` : '');
+const short = (a) => shortAddress(a, 6, 4);
const fmtEth = (v) => {
const n = Number(v);
if (!Number.isFinite(n)) return '0';
diff --git a/workers/robinhood-feed/scripts/build-venue-catalog.mjs b/workers/robinhood-feed/scripts/build-venue-catalog.mjs
new file mode 100644
index 000000000..83c8070a5
--- /dev/null
+++ b/workers/robinhood-feed/scripts/build-venue-catalog.mjs
@@ -0,0 +1,46 @@
+// Rebuild src/venue-catalog.json from a launch-relay checkout's observed venue
+// catalog (src/chains/robinhood/venues/catalog.json). Usage:
+//
+// node scripts/build-venue-catalog.mjs <path-to-launch-relay-catalog.json>
+//
+// Only (contract, selector) pairs that read as a token-launch entry point are
+// kept. Routers, bridges, account-abstraction entry points and Multicall3 also
+// mint tokens from the zero address, but the contract that was called is not
+// the launchpad, so attributing a launch to them would be wrong.
+
+import { readFileSync, writeFileSync } from 'node:fs';
+import { fileURLToPath } from 'node:url';
+
+const src = process.argv[2];
+if (!src) {
+ console.error('usage: node scripts/build-venue-catalog.mjs <catalog.json>');
+ process.exit(2);
+}
+
+const NOT_A_LAUNCHPAD = /reads as a router|does not read as a launch entry point|^calls arrive through/i;
+
+const catalog = JSON.parse(readFileSync(src, 'utf8'));
+const venues = catalog.venues
+ .filter((v) => !v.forwarder && !NOT_A_LAUNCHPAD.test(v.reason || ''))
+ .map((v) => ({
+ id: v.id,
+ label: v.label || null,
+ kind: v.kind,
+ address: v.address.toLowerCase(),
+ selector: v.selector,
+ observed_launches: v.observed.launches,
+ launchable: v.usable === true,
+ }))
+ .sort((a, b) => b.observed_launches - a.observed_launches);
+
+const out = {
+ chain_id: catalog.chainId,
+ source: 'launch-relay observed venue catalog',
+ generated_at: catalog.generatedAt,
+ window: catalog.window,
+ tokens_scanned: catalog.tokensScanned,
+ venues,
+};
+const dest = fileURLToPath(new URL('../src/venue-catalog.json', import.meta.url));
+writeFileSync(dest, JSON.stringify(out, null, '\t') + '\n');
+console.log(`wrote ${venues.length} venues to ${dest}`);
diff --git a/workers/robinhood-feed/src/feed.js b/workers/robinhood-feed/src/feed.js
index 2b3c61ba4..1eef8b1a7 100644
--- a/workers/robinhood-feed/src/feed.js
+++ b/workers/robinhood-feed/src/feed.js
@@ -1,7 +1,8 @@
-// The firehose orchestrator. Composes the hoodchain SDK watchers (NOXA +
-// Odyssey via RPC logs), a dynamic Uniswap v3 Swap watcher over the set of
-// tracked pools (NOXA pools from block one, Odyssey pools post-graduation), and
-// the Arbitrum sequencer feed used as a sub-second block-tip + gap watchdog.
+// The firehose orchestrator. Composes the hoodchain SDK watchers (Odyssey via
+// RPC logs), a mint watcher that attributes every new token to the launch venue
+// its transaction called (venues.js), a dynamic Uniswap v3 Swap watcher over
+// the set of tracked pools (Odyssey pools post-graduation), and the Arbitrum
+// sequencer feed used as a sub-second block-tip + gap watchdog.
// Everything is normalized to the pump-compatible shape and handed to onEvent.
//
// Divergence from the pump (PumpPortal) feed, by design:
@@ -17,6 +18,8 @@ import {
} from 'hoodchain';
import { subscribeFeed } from 'hoodchain';
import { config, CHAIN_ID, redactRpcUrl } from './config.js';
+import { getMintLogs, parseMintLogs, launchesFromMints } from './mints.js';
+import { createReputation, devAllocation, devStatus, riskFlags, readBalances } from './reputation.js';
import { hood, resolveMeta, inspectPool, blockTimeMs } from './chain.js';
import { withRpcRetry } from './rpc.js';
import { ethPriceUsd } from './eth-price.js';
@@ -87,6 +90,7 @@ export function startFirehose(onEvent) {
// Tracked Uniswap pools (insertion-ordered for LRU eviction).
const pools = new Map(); // pool(lower) → token
let resubTimer = null;
+ let mintTimer = null;
function trackPool(pool, token) {
if (!pool) return;
const key = pool.toLowerCase();
@@ -140,15 +144,111 @@ export function startFirehose(onEvent) {
if (active) onEvent({ kind: 'trade', data });
}
- async function emitLaunch(launch) {
- const key = `launch:${launch.transactionHash}:${launch.token}`;
+ // ── launch enrichment: dev allocation, dev-sold, deployer reputation ───────
+ const reputation = createReputation(
+ { multicall: (a) => hood.public.multicall(a) },
+ { windowBlocks: Number(config.backfillBlocks) },
+ );
+ const allocations = new Map(); // token(lower) → bigint | null (null = receipt unreadable)
+ const tracked = new Map(); // token(lower) → { data, allocation, creator } for the dev-sold sweep
+
+ const odysseyVenue = { id: 'odyssey', label: 'The Odyssey', kind: 'bonding-curve', address: null };
+ function withOdysseyVenue(l) { return l.venue ? l : { ...l, venue: odysseyVenue }; }
+
+ async function allocationFor(launch) {
+ const key = launch.token.toLowerCase();
+ if (allocations.has(key)) return allocations.get(key);
+ let alloc = null;
+ try {
+ const receipt = await withRpcRetry(() => hood.public.getTransactionReceipt({ hash: launch.transactionHash }));
+ alloc = devAllocation(receipt.logs, launch.token, launch.creator);
+ } catch { /* unreadable receipt leaves dev_sold null, never a guess */ }
+ allocations.set(key, alloc);
+ return alloc;
+ }
+
+ async function indexLaunch(launch) {
+ const allocation = await allocationFor(launch);
+ reputation.record({ creator: launch.creator, token: launch.token, blockNumber: launch.blockNumber, allocation: allocation ?? 0n });
+ return allocation;
+ }
+
+ async function emitLaunch(launch, { indexed = false } = {}) {
+ const key = `launch:${launch.transactionHash}:${launch.token.toLowerCase()}`;
if (!once(key)) return;
if (launch.pool) trackPool(launch.pool, launch.token);
- const [meta, ethUsd, atMs] = await Promise.all([
+ const allocation = indexed ? (allocations.get(launch.token.toLowerCase()) ?? null) : await indexLaunch(launch);
+ const [meta, ethUsd, atMs, deployer, balance] = await Promise.all([
resolveMeta(launch.token), ethPriceUsd(), blockTimeMs(launch.blockNumber),
+ reputation.assess(launch.creator, launch.blockNumber).catch(() => null),
+ allocation && allocation > 0n
+ ? readBalances({ multicall: (a) => hood.public.multicall(a) }, [{ token: launch.token, holder: launch.creator }]).then((r) => r[0]).catch(() => null)
+ : Promise.resolve(null),
]);
+ const dev = devStatus(allocation ?? 0n, balance);
bumpBlock(launch.blockNumber);
- if (active) onEvent({ kind: 'launch', data: normalizeLaunch({ launch, name: meta.name, symbol: meta.symbol, ethUsd, atMs }) });
+ if (!active) return;
+ const data = normalizeLaunch({ launch, name: meta.name, symbol: meta.symbol, ethUsd, atMs, venue: launch.venue ?? null, dev, deployer });
+ onEvent({ kind: 'launch', data });
+ if (allocation && allocation > 0n) {
+ tracked.set(launch.token.toLowerCase(), { data, allocation, creator: launch.creator });
+ while (tracked.size > 300) tracked.delete(tracked.keys().next().value);
+ }
+ }
+
+ /** Re-read creator balances for recent launches; re-emit any whose dev has since sold out. */
+ async function sweepDevSold() {
+ if (!active || tracked.size === 0) return;
+ const cutoff = Math.floor(Date.now() / 1000) - 24 * 3600;
+ const open = [...tracked.entries()].filter(([, t]) => t.data.dev_sold !== true && t.data.timestamp >= cutoff);
+ if (!open.length) return;
+ let balances;
+ try {
+ balances = await withRpcRetry(() => readBalances(
+ { multicall: (a) => hood.public.multicall(a) },
+ open.map(([, t]) => ({ token: t.data.mint, holder: t.creator })),
+ ));
+ } catch { return; }
+ open.forEach(([key, t], i) => {
+ const dev = devStatus(t.allocation, balances[i]);
+ if (dev.dev_sold === null) return;
+ const same = dev.dev_sold === t.data.dev_sold && dev.dev_sold_pct === t.data.dev_sold_pct;
+ if (same) return;
+ const data = { ...t.data, ...dev, flags: riskFlags(dev, t.data.deployer || { prior_launches: 0, prior_dev_exits: 0 }) };
+ tracked.set(key, { ...t, data });
+ onEvent({ kind: 'launch', data });
+ });
+ }
+
+ // ── mint watcher: launches on every catalogued venue ───────────────────────
+ const rpcView = {
+ getTransaction: (hash) => withRpcRetry(() => hood.public.getTransaction({ hash })),
+ readContract: (a) => hood.public.readContract(a),
+ };
+ let mintCursor = 0n;
+ let mintPolling = false;
+ async function venueLaunchesBetween(from, to) {
+ const logs = await retryLogs(() => getMintLogs((a) => hood.public.request(a), from, to), 'mint-scan');
+ return launchesFromMints(rpcView, parseMintLogs(logs));
+ }
+ async function pollMints() {
+ if (!active || mintPolling) return;
+ mintPolling = true;
+ try {
+ const head = await withRpcRetry(() => hood.public.getBlockNumber());
+ if (mintCursor === 0n) { mintCursor = head; return; }
+ if (head <= mintCursor) return;
+ const launches = await venueLaunchesBetween(mintCursor + 1n, head);
+ for (const l of launches) {
+ if (!once(`token:${l.token.toLowerCase()}`)) continue;
+ await emitLaunch(l).catch(() => {});
+ }
+ mintCursor = head;
+ } catch (err) {
+ onEvent({ kind: 'status', data: { level: 'warn', src: 'mint-watch', message: err?.message?.split('\n')[0] } });
+ } finally {
+ mintPolling = false;
+ }
}
async function emitCurveTrade(trade) {
@@ -199,9 +299,9 @@ export function startFirehose(onEvent) {
onEvent({ kind: 'status', data: { level: 'info', src: 'gap-fill', from: Number(from), to: Number(head) } });
try {
const launches = await retryLogs(
- () => getRecentLaunches(hood, { lookbackBlocks: head - from + 1n }), 'gap-fill',
+ () => getRecentLaunches(hood, { launchpad: 'odyssey', lookbackBlocks: head - from + 1n }), 'gap-fill',
);
- await mapLimit(launches.filter((l) => l.blockNumber >= from), 8, (l) => emitLaunch(l));
+ await mapLimit(launches.filter((l) => l.blockNumber >= from), 8, (l) => emitLaunch(withOdysseyVenue(l)));
const logs = await retryLogs(() => hood.public.getLogs({
address: ODYSSEY_FACTORIES, event: odysseyTradedEvent, fromBlock: from, toBlock: head,
}), 'gap-fill');
@@ -222,24 +322,36 @@ export function startFirehose(onEvent) {
// replay buffer only ever surfaces the newest `bufferLimit`, so fully
// resolving metadata for the rest is wasted RPC work that would otherwise
// serialize cold start for minutes. Every discovered pool is still tracked
- // (cheap, synchronous) so live Uniswap swaps on older NOXA coins are caught;
+ // (cheap, synchronous) so live Uniswap swaps on older coins are caught;
// only the newest slice gets the full emit (metadata + ETH price + buffer).
async function backfill() {
try {
- const launches = await retryLogs(
- () => getRecentLaunches(hood, { lookbackBlocks: config.backfillBlocks }), 'backfill',
- );
- for (const l of launches) if (l.pool) trackPool(l.pool, l.token);
+ const head = await retryLogs(() => hood.public.getBlockNumber(), 'backfill');
+ const fromBlock = head > config.backfillBlocks ? head - config.backfillBlocks : 0n;
+ if (mintCursor === 0n) mintCursor = head;
+ const [odyssey, venueLaunches] = await Promise.all([
+ retryLogs(() => getRecentLaunches(hood, { launchpad: 'odyssey', lookbackBlocks: config.backfillBlocks }), 'backfill'),
+ venueLaunchesBetween(fromBlock, head),
+ ]);
+ const launches = [...odyssey.map(withOdysseyVenue), ...venueLaunches]
+ .sort((a, b) => (a.blockNumber < b.blockNumber ? -1 : a.blockNumber > b.blockNumber ? 1 : 0));
+ for (const l of launches) {
+ once(`token:${l.token.toLowerCase()}`);
+ if (l.pool) trackPool(l.pool, l.token);
+ }
+ // Index the whole window oldest-first so a deployer's earlier launches
+ // are on record before their newer ones are graded against them.
+ await mapLimit(launches, 8, (l) => indexLaunch(l));
const toEmit = launches.slice(-config.bufferLimit); // oldest-first input → newest last
- await mapLimit(toEmit, 8, (l) => emitLaunch(l));
- onEvent({ kind: 'status', data: { level: 'info', src: 'backfill', launches: launches.length, emitted: toEmit.length } });
+ await mapLimit(toEmit, 8, (l) => emitLaunch(l, { indexed: true }));
+ onEvent({ kind: 'status', data: { level: 'info', src: 'backfill', launches: launches.length, emitted: toEmit.length, deployers: reputation.size() } });
} catch (err) {
onEvent({ kind: 'status', data: { level: 'warn', src: 'backfill', message: err?.message } });
}
}
// ── wire everything up ─────────────────────────────────────────────────────
- unwatchers.push(watchLaunches(hood, (l) => { emitLaunch(l).catch(() => {}); }, { pollingInterval: config.pollingIntervalMs, onError: (e) => onEvent({ kind: 'status', data: { level: 'warn', src: 'launch-watch', message: e?.message } }) }));
+ unwatchers.push(watchLaunches(hood, (l) => { emitLaunch(withOdysseyVenue(l)).catch(() => {}); }, { launchpad: 'odyssey', pollingInterval: config.pollingIntervalMs, onError: (e) => onEvent({ kind: 'status', data: { level: 'warn', src: 'launch-watch', message: e?.message } }) }));
unwatchers.push(watchCurveTrades(hood, (t) => { emitCurveTrade(t).catch(() => {}); }, { pollingInterval: config.pollingIntervalMs, onError: (e) => onEvent({ kind: 'status', data: { level: 'warn', src: 'trade-watch', message: e?.message } }) }));
unwatchers.push(watchGraduations(hood, (g) => { emitGraduation(g).catch(() => {}); }, { pollingInterval: config.pollingIntervalMs, onError: (e) => onEvent({ kind: 'status', data: { level: 'warn', src: 'grad-watch', message: e?.message } }) }));
@@ -250,7 +362,8 @@ export function startFirehose(onEvent) {
).then((sub) => { feedSub = sub; }).catch(() => {});
}
- backfill();
+ backfill().finally(() => { if (active) mintTimer = setInterval(() => { pollMints(); }, config.pollingIntervalMs); });
+ const sweepTimer = setInterval(() => { sweepDevSold().catch(() => {}); }, 60_000);
const gapTimer = setInterval(() => { gapCheck().catch(() => {}); }, 15_000);
return {
@@ -258,6 +371,8 @@ export function startFirehose(onEvent) {
active = false;
clearTimeout(resubTimer);
clearInterval(gapTimer);
+ clearInterval(sweepTimer);
+ clearInterval(mintTimer);
for (const u of unwatchers) { try { u(); } catch { /* ignore */ } }
try { swapUnwatch?.(); } catch { /* ignore */ }
try { feedSub?.close(); } catch { /* ignore */ }
diff --git a/workers/robinhood-feed/src/mints.js b/workers/robinhood-feed/src/mints.js
new file mode 100644
index 000000000..357834dbe
--- /dev/null
+++ b/workers/robinhood-feed/src/mints.js
@@ -0,0 +1,130 @@
+// Token launches from the venue catalog. An ERC-20 emits Transfer(0x0, to, n)
+// when its supply is minted, so scanning those logs and attributing each to the
+// contract that the transaction called finds launches on every venue at once,
+// including ones that emit no launch event of their own.
+
+import { parseAbi } from 'viem';
+import { venueForCall } from './venues.js';
+
+export const TRANSFER_TOPIC = '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef';
+const ZERO_TOPIC = `0x${'0'.repeat(64)}`;
+
+const poolAbi = parseAbi(['function token0() view returns (address)']);
+
+const toHex = (n) => `0x${BigInt(n).toString(16)}`;
+const isTooManyLogs = (err) => /exceeds? limit|too many|response size|query returned more/i.test(String(err?.details || err?.message || err));
+
+/**
+ * Pick the supply mints out of raw Transfer-from-zero logs. ERC-721 shares the
+ * Transfer topic but indexes the token id (four topics, no data), so it is
+ * dropped here, otherwise every position NFT would read as a coin.
+ */
+export function parseMintLogs(logs) {
+ const first = new Map(); // token(lower) → earliest mint
+ for (const log of logs) {
+ if (!Array.isArray(log.topics) || log.topics.length !== 3 || !log.data || log.data === '0x') continue;
+ const blockNumber = BigInt(log.blockNumber);
+ const logIndex = Number(BigInt(log.logIndex ?? 0));
+ const key = log.address.toLowerCase();
+ const cur = first.get(key);
+ if (!cur || blockNumber < cur.blockNumber || (blockNumber === cur.blockNumber && logIndex < cur.logIndex)) {
+ first.set(key, { token: log.address, blockNumber, logIndex, transactionHash: log.transactionHash });
+ }
+ }
+ return [...first.values()].sort((a, b) => (a.blockNumber === b.blockNumber ? a.logIndex - b.logIndex : a.blockNumber < b.blockNumber ? -1 : 1));
+}
+
+/**
+ * Turn a mint and the transaction that produced it into a launch, or null when
+ * the transaction did not call a catalogued venue.
+ */
+export function launchFromMint(mint, tx) {
+ const venue = venueForCall(tx?.to, tx?.input);
+ if (!venue) return null;
+ return {
+ launchpad: venue.id,
+ venue,
+ token: mint.token,
+ creator: tx.from,
+ pool: null,
+ blockNumber: mint.blockNumber,
+ transactionHash: mint.transactionHash,
+ };
+}
+
+/**
+ * Every Transfer-from-zero log in [from, to]. A range that trips the RPC's
+ * matched-log cap is split in half rather than skipped, because dropping it
+ * would silently under-count exactly the busiest stretches.
+ *
+ * @param {(args: {method: string, params: unknown[]}) => Promise<any>} request viem `client.request`
+ */
+export async function getMintLogs(request, from, to, { chunk = 4_000n } = {}) {
+ const out = [];
+ const queue = [[BigInt(from), BigInt(to)]];
+ while (queue.length) {
+ const [start, end] = queue.shift();
+ const span = end - start + 1n;
+ if (span > chunk) {
+ const mid = start + span / 2n;
+ queue.unshift([start, mid - 1n], [mid, end]);
+ continue;
+ }
+ let logs;
+ try {
+ logs = await request({
+ method: 'eth_getLogs',
+ params: [{ topics: [TRANSFER_TOPIC, ZERO_TOPIC], fromBlock: toHex(start), toBlock: toHex(end) }],
+ });
+ } catch (err) {
+ if (isTooManyLogs(err) && span > 1n) {
+ const mid = start + span / 2n;
+ queue.unshift([start, mid - 1n], [mid, end]);
+ continue;
+ }
+ throw err;
+ }
+ out.push(...logs);
+ }
+ return out;
+}
+
+/** An AMM pair mints LP shares from zero exactly like a coin does; pairs answer token0(). */
+export async function isPoolToken(readContract, address) {
+ try {
+ await readContract({ address, abi: poolAbi, functionName: 'token0' });
+ return true;
+ } catch {
+ return false;
+ }
+}
+
+/**
+ * Attribute mints to venues. Transactions are fetched once per hash and the
+ * pool check runs only for mints that already matched a venue, so a quiet
+ * launchpad costs one transaction read per mint, not one per ERC-20 on chain.
+ *
+ * @param {{ getTransaction: (hash: string) => Promise<any>, readContract: Function }} rpc
+ * @param {Array<object>} mints output of parseMintLogs
+ * @returns {Promise<Array<object>>} launches, oldest first
+ */
+export async function launchesFromMints(rpc, mints, { concurrency = 8 } = {}) {
+ const txs = new Map(); // hash → Promise<tx|null>
+ const txFor = (hash) => {
+ if (!txs.has(hash)) txs.set(hash, Promise.resolve(rpc.getTransaction(hash)).catch(() => null));
+ return txs.get(hash);
+ };
+ const out = new Array(mints.length).fill(null);
+ let next = 0;
+ await Promise.all(Array.from({ length: Math.min(concurrency, mints.length) }, async () => {
+ while (next < mints.length) {
+ const i = next++;
+ const mint = mints[i];
+ const launch = launchFromMint(mint, await txFor(mint.transactionHash));
+ if (!launch) continue;
+ if (await isPoolToken(rpc.readContract, mint.token)) continue;
+ out[i] = launch;
+ }
+ }));
+ return out.filter(Boolean);
+}
diff --git a/workers/robinhood-feed/src/normalize.js b/workers/robinhood-feed/src/normalize.js
index 208d953dd..c75858d10 100644
--- a/workers/robinhood-feed/src/normalize.js
+++ b/workers/robinhood-feed/src/normalize.js
@@ -10,6 +10,7 @@
import { formatUnits } from 'viem';
import { CHAIN_ID, EXPLORER_BASE } from './config.js';
import { quoteToUsd } from './eth-price.js';
+import { riskFlags } from './reputation.js';
const CHAIN = 'robinhood-chain';
@@ -19,22 +20,42 @@ const tokenUrl = (addr) => `${EXPLORER_BASE}/address/${addr}`;
const num = (v) => (Number.isFinite(v) ? v : null);
/**
- * A token launch (NOXA instant list or Odyssey curve open).
+ * A token launch on any observed venue (see venues.js) or an Odyssey curve open.
* pump `mint` → `mint` (the coin address; this is the world seed).
*
- * `launch.initialBuyAmount` is best-effort: the hoodchain SDK's high-level
- * `watchLaunches`/`getRecentLaunches` return the decoded `Launch` shape,
- * which does not carry it (it's a NOXA-only raw log field). When absent this
- * resolves to `null`, never a fabricated value.
+ * `venue` names the launchpad the mint transaction called; `dev` and `deployer`
+ * carry the reputation reads (see reputation.js). All three are optional so a
+ * launch whose enrichment reads failed still flows, with the fields null
+ * instead of invented.
+ *
+ * `launch.initialBuyAmount` is best-effort: venue launches are found from the
+ * mint log and do not carry it. When absent it resolves to `null`, never a
+ * fabricated value.
*/
-export function normalizeLaunch({ launch, name = null, symbol = null, ethUsd = 0, atMs }) {
+export function normalizeLaunch({ launch, name = null, symbol = null, ethUsd = 0, atMs, venue = null, dev = null, deployer = null }) {
const initialNative = launch.initialBuyAmount != null
- ? Number(formatUnits(launch.initialBuyAmount, 18)) // NOXA reports ETH (18-dec)
+ ? Number(formatUnits(launch.initialBuyAmount, 18))
+ : null;
+ const devOut = {
+ dev_sold: dev?.dev_sold ?? null,
+ dev_sold_pct: dev?.dev_sold_pct ?? null,
+ };
+ const deployerOut = deployer
+ ? {
+ address: launch.creator,
+ prior_launches: deployer.prior_launches,
+ prior_dev_exits: deployer.prior_dev_exits,
+ inspected: deployer.inspected,
+ window_blocks: deployer.window_blocks ?? null,
+ }
: null;
return {
chain: CHAIN,
chain_id: CHAIN_ID,
launchpad: launch.launchpad,
+ venue: venue
+ ? { id: venue.id, label: venue.label, kind: venue.kind, address: venue.address ?? null }
+ : null,
// pump-compatible identity fields
mint: launch.token,
address: launch.token,
@@ -43,11 +64,14 @@ export function normalizeLaunch({ launch, name = null, symbol = null, ethUsd = 0
creator: launch.creator,
signature: launch.transactionHash,
tx_signature: launch.transactionHash,
- // EVM specifics (documented divergence — no Solana bonding_curve key)
+ // EVM specifics (documented divergence, no Solana bonding_curve key)
pool: launch.pool ?? null,
quote_symbol: 'ETH',
initial_buy_native: num(initialNative),
initial_buy_usd: initialNative != null ? quoteToUsd(initialNative, 'ETH', ethUsd) : null,
+ ...devOut,
+ deployer: deployerOut,
+ flags: deployerOut || dev ? riskFlags(devOut, deployerOut || { prior_launches: 0, prior_dev_exits: 0 }) : [],
// pump cards read these; we have no off-chain metadata service on RH yet
image_uri: null,
description: null,
diff --git a/workers/robinhood-feed/src/reputation.js b/workers/robinhood-feed/src/reputation.js
new file mode 100644
index 000000000..e6c70789b
--- /dev/null
+++ b/workers/robinhood-feed/src/reputation.js
@@ -0,0 +1,138 @@
+// Deployer reputation and the dev-sold flag, derived from chain state only.
+// Nothing is scraped, self-reported or model-scored, and every figure states
+// the window it covers so a thin record is never read as a clean one.
+//
+// dev allocation Transfer logs into the creator inside the launch
+// transaction, summed per token. A creator who received
+// nothing has no allocation to sell, so `dev_sold` is null
+// for them rather than a false "sold".
+// dev sold The creator's balance has since fallen to zero.
+// prior launches Launches by the same creator that this process observed
+// before the current one (cold-start backfill + live).
+// prior dev exits Those prior launches where the creator received an
+// allocation and now holds none of it. A heuristic: it
+// reads "the deployer walked away from a token", which is
+// what a rug looks like from the deployer's side, but a
+// transfer to another wallet reads the same.
+
+import { erc20Abi } from 'viem';
+
+const TRANSFER_TOPIC = '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef';
+
+const topicAddress = (topic) => `0x${topic.slice(-40)}`.toLowerCase();
+
+/**
+ * What the creator was handed by the launch transaction, in token base units.
+ *
+ * @param {Array<{address: string, topics: string[], data: string}>} logs receipt logs
+ * @returns {bigint}
+ */
+export function devAllocation(logs, token, creator) {
+ const tokenKey = token.toLowerCase();
+ const creatorKey = creator.toLowerCase();
+ let total = 0n;
+ for (const log of logs) {
+ if (log.address.toLowerCase() !== tokenKey) continue;
+ if (log.topics?.length !== 3 || log.topics[0] !== TRANSFER_TOPIC) continue;
+ if (topicAddress(log.topics[2]) !== creatorKey) continue;
+ total += BigInt(log.data);
+ }
+ return total;
+}
+
+/**
+ * @param {bigint} allocation what the creator received at launch
+ * @param {bigint|null} balance the creator's balance now, null when unreadable
+ * @returns {{dev_sold: boolean|null, dev_sold_pct: number|null}}
+ */
+export function devStatus(allocation, balance) {
+ if (allocation <= 0n || balance === null || balance === undefined) return { dev_sold: null, dev_sold_pct: null };
+ const held = balance > allocation ? allocation : balance;
+ const soldBp = Number(((allocation - held) * 10_000n) / allocation);
+ return { dev_sold: balance === 0n, dev_sold_pct: soldBp / 100 };
+}
+
+/** Thresholds for the flags below. Exported so the tests and the docs state the same numbers. */
+export const FLAG_RULES = Object.freeze({ serialDeployerLaunches: 5, serialExitCount: 2 });
+
+/**
+ * @param {{dev_sold: boolean|null}} dev
+ * @param {{prior_launches: number, prior_dev_exits: number}} deployer
+ * @returns {string[]}
+ */
+export function riskFlags(dev, deployer) {
+ const flags = [];
+ if (dev.dev_sold === true) flags.push('dev_sold');
+ if (deployer.prior_dev_exits >= FLAG_RULES.serialExitCount) flags.push('serial_exit');
+ else if (deployer.prior_dev_exits >= 1) flags.push('prior_dev_exit');
+ if (deployer.prior_launches >= FLAG_RULES.serialDeployerLaunches) flags.push('serial_deployer');
+ return flags;
+}
+
+/**
+ * The launch index and the reads that grade a deployer against it.
+ *
+ * @param {{ readContract: Function, multicall: Function }} rpc
+ * @param {{ maxCreators?: number, maxPerCreator?: number, maxInspect?: number, windowBlocks?: number }} [opts]
+ */
+export function createReputation(rpc, { maxCreators = 5_000, maxPerCreator = 100, maxInspect = 10, windowBlocks = 0 } = {}) {
+ const byCreator = new Map(); // creator(lower) → [{ token, blockNumber, allocation }]
+
+ function record({ creator, token, blockNumber, allocation }) {
+ const key = creator.toLowerCase();
+ const list = byCreator.get(key) || [];
+ if (list.some((l) => l.token.toLowerCase() === token.toLowerCase())) return;
+ list.push({ token, blockNumber: BigInt(blockNumber), allocation: allocation ?? 0n });
+ list.sort((a, b) => (a.blockNumber < b.blockNumber ? -1 : a.blockNumber > b.blockNumber ? 1 : 0));
+ while (list.length > maxPerCreator) list.shift();
+ byCreator.delete(key);
+ byCreator.set(key, list); // refresh LRU position
+ while (byCreator.size > maxCreators) byCreator.delete(byCreator.keys().next().value);
+ }
+
+ /**
+ * @param {string} creator
+ * @param {bigint|number} beforeBlock only launches strictly before this block count as prior
+ */
+ async function assess(creator, beforeBlock) {
+ const before = BigInt(beforeBlock);
+ const prior = (byCreator.get(creator.toLowerCase()) || []).filter((l) => l.blockNumber < before);
+ const inspectable = prior.filter((l) => l.allocation > 0n).slice(-maxInspect);
+ let exits = 0;
+ let inspected = 0;
+ if (inspectable.length) {
+ const results = await rpc.multicall({
+ contracts: inspectable.map((l) => ({ address: l.token, abi: erc20Abi, functionName: 'balanceOf', args: [creator] })),
+ allowFailure: true,
+ }).catch(() => null);
+ if (results) {
+ results.forEach((r, i) => {
+ if (r.status !== 'success') return;
+ inspected += 1;
+ if (devStatus(inspectable[i].allocation, r.result).dev_sold === true) exits += 1;
+ });
+ }
+ }
+ return {
+ prior_launches: prior.length,
+ prior_dev_exits: exits,
+ inspected,
+ window_blocks: windowBlocks || null,
+ };
+ }
+
+ return { record, assess, size: () => byCreator.size };
+}
+
+/**
+ * Batch-read current balances for a set of (token, holder) pairs.
+ * Returns a bigint per pair, or null where the read failed.
+ */
+export async function readBalances(rpc, pairs) {
+ if (!pairs.length) return [];
+ const results = await rpc.multicall({
+ contracts: pairs.map((p) => ({ address: p.token, abi: erc20Abi, functionName: 'balanceOf', args: [p.holder] })),
+ allowFailure: true,
+ });
+ return results.map((r) => (r.status === 'success' ? r.result : null));
+}
diff --git a/workers/robinhood-feed/src/server.js b/workers/robinhood-feed/src/server.js
index d8f4afc32..e4f9e846d 100644
--- a/workers/robinhood-feed/src/server.js
+++ b/workers/robinhood-feed/src/server.js
@@ -31,7 +31,12 @@ export function createServer(firehose) {
const arr = buffer[kind];
if (!arr) return;
const sig = data.tx_signature || data.signature;
- if (sig && arr.some((e) => (e.tx_signature || e.signature) === sig && e.mint === data.mint)) return;
+ const at = sig ? arr.findIndex((e) => (e.tx_signature || e.signature) === sig && e.mint === data.mint) : -1;
+ if (at !== -1) {
+ // Same event again: a launch re-emitted with fresher dev-sold flags replaces its old entry.
+ arr[at] = data;
+ return;
+ }
arr.unshift(data);
while (arr.length > config.bufferLimit) arr.pop();
}
diff --git a/workers/robinhood-feed/src/venue-catalog.json b/workers/robinhood-feed/src/venue-catalog.json
new file mode 100644
index 000000000..954ddef02
--- /dev/null
+++ b/workers/robinhood-feed/src/venue-catalog.json
@@ -0,0 +1,471 @@
+{
+ "chain_id": 4663,
+ "source": "launch-relay observed venue catalog",
+ "generated_at": "2026-09-04T01:10:38.470Z",
+ "window": {
+ "fromBlock": 53610505,
+ "toBlock": 53640504
+ },
+ "tokens_scanned": 2014,
+ "venues": [
+ {
+ "id": "pons-v2",
+ "label": "Pons V2",
+ "kind": "launchpad",
+ "address": "0xe33e9e479df8802cb0866d5d05258bec4cf62948",
+ "selector": "0xf85f8e41",
+ "observed_launches": 708,
+ "launchable": false
+ },
+ {
+ "id": "pons-v2-launch-token",
+ "label": "Pons V2",
+ "kind": "launchpad",
+ "address": "0x7ed598bcef8bd9edd8c97a195c6d13f40801ec7e",
+ "selector": "0xa72101af",
+ "observed_launches": 235,
+ "launchable": true
+ },
+ {
+ "id": "rhc-b2a748f6",
+ "label": null,
+ "kind": "launchpad",
+ "address": "0xb2a748f698ae894fddfae9504807daf10f9d7a14",
+ "selector": "0xe1b77db5",
+ "observed_launches": 224,
+ "launchable": false
+ },
+ {
+ "id": "bankr-robinhood",
+ "label": "Bankr Robinhood",
+ "kind": "launchpad",
+ "address": "0x22e99278308b393ea1260859b181ad7e78f5eeed",
+ "selector": "0x882db707",
+ "observed_launches": 113,
+ "launchable": false
+ },
+ {
+ "id": "pons-v2-7ed598",
+ "label": "Pons V2",
+ "kind": "launchpad",
+ "address": "0x7ed598bcef8bd9edd8c97a195c6d13f40801ec7e",
+ "selector": "0xf35abbcf",
+ "observed_launches": 106,
+ "launchable": true
+ },
+ {
+ "id": "rhc-77dc6f63",
+ "label": null,
+ "kind": "launchpad",
+ "address": "0x77dc6f6361b7b99456fc3761ce5b7dda80d83f9d",
+ "selector": "0xf39dc3ed",
+ "observed_launches": 61,
+ "launchable": false
+ },
+ {
+ "id": "rhc-ce9c48cf",
+ "label": null,
+ "kind": "launchpad",
+ "address": "0xce9c48cfa068947f77738c81be406b53338e5b0d",
+ "selector": "0x3feab1d8",
+ "observed_launches": 35,
+ "launchable": false
+ },
+ {
+ "id": "rhc-3194e326",
+ "label": null,
+ "kind": "launchpad",
+ "address": "0x3194e32622c5d860a0572c74edda99dcfd8fc827",
+ "selector": "0x2fcb9108",
+ "observed_launches": 23,
+ "launchable": true
+ },
+ {
+ "id": "rhc-ce9c48cf-create-launch-and-buy",
+ "label": null,
+ "kind": "launchpad",
+ "address": "0xce9c48cfa068947f77738c81be406b53338e5b0d",
+ "selector": "0x901a3de8",
+ "observed_launches": 22,
+ "launchable": false
+ },
+ {
+ "id": "rhc-b2a748f6-b2a748",
+ "label": null,
+ "kind": "launchpad",
+ "address": "0xb2a748f698ae894fddfae9504807daf10f9d7a14",
+ "selector": "0xc6314368",
+ "observed_launches": 21,
+ "launchable": false
+ },
+ {
+ "id": "rhc-c783221a",
+ "label": null,
+ "kind": "launchpad",
+ "address": "0xc783221ab1db0244203458417981b4631e80b988",
+ "selector": "0x45d52c5a",
+ "observed_launches": 19,
+ "launchable": true
+ },
+ {
+ "id": "rhc-6fda94ac",
+ "label": null,
+ "kind": "launchpad",
+ "address": "0x6fda94aceedc5a97171469a8873d00fb9983bb8c",
+ "selector": "0x680c2d37",
+ "observed_launches": 15,
+ "launchable": true
+ },
+ {
+ "id": "virtuals",
+ "label": "Virtuals Protocol",
+ "kind": "bonding-curve",
+ "address": "0xd4ccbfa37e2f35611b3042e4096ad7a3459bd007",
+ "selector": "0xa2baa044",
+ "observed_launches": 15,
+ "launchable": true
+ },
+ {
+ "id": "rhc-e4cea507",
+ "label": null,
+ "kind": "launchpad",
+ "address": "0xe4cea507b19796362a5a28fa7cb705a3f1866213",
+ "selector": "0x2e3f9da8",
+ "observed_launches": 14,
+ "launchable": false
+ },
+ {
+ "id": "rhc-3ccd843d",
+ "label": null,
+ "kind": "launchpad",
+ "address": "0x3ccd843d6794d28e794268dcf65482000657b2de",
+ "selector": "0xb0da329a",
+ "observed_launches": 14,
+ "launchable": false
+ },
+ {
+ "id": "rhc-6fda94ac-launch-pair-with-meta",
+ "label": null,
+ "kind": "launchpad",
+ "address": "0x6fda94aceedc5a97171469a8873d00fb9983bb8c",
+ "selector": "0xea2c3a42",
+ "observed_launches": 14,
+ "launchable": true
+ },
+ {
+ "id": "rhc-26605f32",
+ "label": null,
+ "kind": "launchpad",
+ "address": "0x26605f322f7ff986f381bb9a6e3f5dab0beaeb09",
+ "selector": "0x8cb5772c",
+ "observed_launches": 14,
+ "launchable": false
+ },
+ {
+ "id": "rhc-d9ec2db5",
+ "label": null,
+ "kind": "launchpad",
+ "address": "0xd9ec2db5f3d1b236843925949fe5bd8a3836fccb",
+ "selector": "0x686399cb",
+ "observed_launches": 12,
+ "launchable": false
+ },
+ {
+ "id": "pons-dot-family",
+ "label": "Pons Dot Family",
+ "kind": "launchpad",
+ "address": "0xa5aab3f0c6eeadf30ef1d3eb997108e976351feb",
+ "selector": "0x686399cb",
+ "observed_launches": 12,
+ "launchable": false
+ },
+ {
+ "id": "rhc-1cbaf24d",
+ "label": null,
+ "kind": "launchpad",
+ "address": "0x1cbaf24d53fe930fce8eff149fa797d2611da149",
+ "selector": "0x7422a284",
+ "observed_launches": 8,
+ "launchable": false
+ },
+ {
+ "id": "rhc-eb7c0347",
+ "label": null,
+ "kind": "launchpad",
+ "address": "0xeb7c034704ef8dcd2d32324c1545f62fb4ad0862",
+ "selector": "0x882db707",
+ "observed_launches": 8,
+ "launchable": false
+ },
+ {
+ "id": "rhc-89c0992d",
+ "label": null,
+ "kind": "launchpad",
+ "address": "0x89c0992dcdc7bb13ef2f96d94a899c7a154211b0",
+ "selector": "0xb0da329a",
+ "observed_launches": 5,
+ "launchable": false
+ },
+ {
+ "id": "rhc-16cf6788",
+ "label": null,
+ "kind": "launchpad",
+ "address": "0x16cf6788b762ee8969744586ed16fc5705140dd7",
+ "selector": "0x4101659e",
+ "observed_launches": 4,
+ "launchable": true
+ },
+ {
+ "id": "rhc-e9f7ab7d",
+ "label": null,
+ "kind": "launchpad",
+ "address": "0xe9f7ab7de8fb8756acbb6a1cd13316a43308197b",
+ "selector": "0x1b806220",
+ "observed_launches": 4,
+ "launchable": false
+ },
+ {
+ "id": "rhc-626c3d09",
+ "label": null,
+ "kind": "launchpad",
+ "address": "0x626c3d09b65bf5d1d40e0d5f25e19fa49783b3d4",
+ "selector": "0xce61a35c",
+ "observed_launches": 4,
+ "launchable": false
+ },
+ {
+ "id": "rhc-432d20aa",
+ "label": null,
+ "kind": "launchpad",
+ "address": "0x432d20aae5605b1e94c914283d7155ebc6727351",
+ "selector": "0x6213136e",
+ "observed_launches": 4,
+ "launchable": true
+ },
+ {
+ "id": "rhc-e64ac411",
+ "label": null,
+ "kind": "launchpad",
+ "address": "0xe64ac4113848bbc1a6dde1a6d1da96720a36f297",
+ "selector": "0x5b09db59",
+ "observed_launches": 4,
+ "launchable": false
+ },
+ {
+ "id": "rhc-60e29e6a",
+ "label": null,
+ "kind": "launchpad",
+ "address": "0x60e29e6a52610ce6cf031a574715a595f55818fa",
+ "selector": "0x39bdee72",
+ "observed_launches": 3,
+ "launchable": false
+ },
+ {
+ "id": "rhc-c2a84a1a-b1290b1e",
+ "label": null,
+ "kind": "launchpad",
+ "address": "0xc2a84a1a6a2ab484bfd271fa59b7bf7e99ddcb54",
+ "selector": "0xb1290b1e",
+ "observed_launches": 3,
+ "launchable": true
+ },
+ {
+ "id": "rhc-069c70c7",
+ "label": null,
+ "kind": "launchpad",
+ "address": "0x069c70c738531519a61e7b3ccd818c8eff31c2f0",
+ "selector": "0xc163e5cc",
+ "observed_launches": 3,
+ "launchable": false
+ },
+ {
+ "id": "rhc-609f2c91",
+ "label": null,
+ "kind": "launchpad",
+ "address": "0x609f2c912175f8cd4438c1882f291fa6a4b4c735",
+ "selector": "0xb0da329a",
+ "observed_launches": 3,
+ "launchable": false
+ },
+ {
+ "id": "rhc-5bd1fbe7",
+ "label": null,
+ "kind": "launchpad",
+ "address": "0x5bd1fbe78a78fe8236fa00cf48fbeba74ae34661",
+ "selector": "0x75154d70",
+ "observed_launches": 3,
+ "launchable": false
+ },
+ {
+ "id": "rhc-0c37a24f",
+ "label": null,
+ "kind": "launchpad",
+ "address": "0x0c37a24f5d23a486fa692d1500881d698b1f77a4",
+ "selector": "0x686399cb",
+ "observed_launches": 3,
+ "launchable": false
+ },
+ {
+ "id": "rhc-c70e510e",
+ "label": null,
+ "kind": "launchpad",
+ "address": "0xc70e510e14710ea535cab7b2414860af63feab79",
+ "selector": "0xf6efccd9",
+ "observed_launches": 3,
+ "launchable": false
+ },
+ {
+ "id": "rhc-6bb933af",
+ "label": null,
+ "kind": "launchpad",
+ "address": "0x6bb933af35e32893a7ffd2d5e932f022b063a412",
+ "selector": "0xb0da329a",
+ "observed_launches": 2,
+ "launchable": false
+ },
+ {
+ "id": "rhc-1fae6f16",
+ "label": null,
+ "kind": "launchpad",
+ "address": "0x1fae6f162355cf77bf7f23cb919130962dad4ecb",
+ "selector": "0x026f2bf0",
+ "observed_launches": 2,
+ "launchable": false
+ },
+ {
+ "id": "rhc-e422bc46",
+ "label": null,
+ "kind": "launchpad",
+ "address": "0xe422bc468377c17a71955179eea2596f33ffad5c",
+ "selector": "0x70282651",
+ "observed_launches": 2,
+ "launchable": false
+ },
+ {
+ "id": "rhc-fcd61b25",
+ "label": null,
+ "kind": "launchpad",
+ "address": "0xfcd61b25bbf3abd6cf0070d6328e351cc30eec9f",
+ "selector": "0x6cb0ea4e",
+ "observed_launches": 2,
+ "launchable": false
+ },
+ {
+ "id": "rhc-798fa4e2-175f99d3",
+ "label": null,
+ "kind": "launchpad",
+ "address": "0x798fa4e26e6bb4c2326373884d89e76d0afc3b54",
+ "selector": "0x175f99d3",
+ "observed_launches": 2,
+ "launchable": false
+ },
+ {
+ "id": "rhc-4a3e797b",
+ "label": null,
+ "kind": "launchpad",
+ "address": "0x4a3e797b2e4dd1cf96b352513ea91b2f6449e74a",
+ "selector": "0xbdc35cd0",
+ "observed_launches": 2,
+ "launchable": false
+ },
+ {
+ "id": "pair",
+ "label": "PAIR V5",
+ "kind": "stock-paired-pools",
+ "address": "0x8660a7f019c7943b0b0a91b8e39aff3b6db6ae62",
+ "selector": "0x07489e0a",
+ "observed_launches": 2,
+ "launchable": true
+ },
+ {
+ "id": "rhc-f4fc0cd2",
+ "label": null,
+ "kind": "launchpad",
+ "address": "0xf4fc0cd27fc8ecf17e55ee4c3f7201897df3eb75",
+ "selector": "0x686399cb",
+ "observed_launches": 2,
+ "launchable": true
+ },
+ {
+ "id": "rhc-0bdaf008",
+ "label": null,
+ "kind": "launchpad",
+ "address": "0x0bdaf008f01ddd91753fb5db89024f085cef3016",
+ "selector": "0xb0da329a",
+ "observed_launches": 2,
+ "launchable": false
+ },
+ {
+ "id": "rhc-5bd1fbe7-a80ac0c2",
+ "label": null,
+ "kind": "launchpad",
+ "address": "0x5bd1fbe78a78fe8236fa00cf48fbeba74ae34661",
+ "selector": "0xa80ac0c2",
+ "observed_launches": 2,
+ "launchable": false
+ },
+ {
+ "id": "rhc-0937923c-533fd8dc",
+ "label": null,
+ "kind": "launchpad",
+ "address": "0x0937923cf208608ba278f4d011a5e9b85aeaa4a9",
+ "selector": "0x533fd8dc",
+ "observed_launches": 2,
+ "launchable": false
+ },
+ {
+ "id": "rhc-de0b91a1-941a0975",
+ "label": null,
+ "kind": "launchpad",
+ "address": "0xde0b91a1824aedd9a2fcda42d5db1fcd813a0101",
+ "selector": "0x941a0975",
+ "observed_launches": 2,
+ "launchable": true
+ },
+ {
+ "id": "rhc-a2e0481d-b0da329a",
+ "label": null,
+ "kind": "launchpad",
+ "address": "0xa2e0481d543811a52709ec3ad8af326ae7fad4f3",
+ "selector": "0xb0da329a",
+ "observed_launches": 2,
+ "launchable": false
+ },
+ {
+ "id": "rhc-a94aa60e",
+ "label": null,
+ "kind": "launchpad",
+ "address": "0xa94aa60e9c7f193bf678608d5837f0fd51794635",
+ "selector": "0xb5a06fd8",
+ "observed_launches": 2,
+ "launchable": true
+ },
+ {
+ "id": "rhc-6e4910ea",
+ "label": null,
+ "kind": "launchpad",
+ "address": "0x6e4910ea5a04376032f6564da9a9e4e88b7a87c1",
+ "selector": "0x13d39311",
+ "observed_launches": 2,
+ "launchable": false
+ },
+ {
+ "id": "rhc-d0963927",
+ "label": null,
+ "kind": "launchpad",
+ "address": "0xd09639274b0e0a1a9586f7756ccfe134cc525d09",
+ "selector": "0x476d1d18",
+ "observed_launches": 2,
+ "launchable": true
+ },
+ {
+ "id": "rhc-d5f6c6ab",
+ "label": null,
+ "kind": "launchpad",
+ "address": "0xd5f6c6ab9b74ef7211b683904fe85bf1f69c3d9a",
+ "selector": "0x4e60fe83",
+ "observed_launches": 2,
+ "launchable": true
+ }
+ ]
+}
diff --git a/workers/robinhood-feed/src/venues.js b/workers/robinhood-feed/src/venues.js
new file mode 100644
index 000000000..e254dad56
--- /dev/null
+++ b/workers/robinhood-feed/src/venues.js
@@ -0,0 +1,69 @@
+// The observed launch venues of Robinhood Chain. Each entry in
+// venue-catalog.json is a (contract, selector) pair that was seen minting new
+// ERC-20 supply, ranked by how many tokens it actually launched. The catalog is
+// learned from the chain (see scripts/build-venue-catalog.mjs), not from any
+// launchpad's own marketing, which is why it covers contracts that publish no
+// name at all.
+//
+// Attribution is by the contract the mint transaction CALLED, because an ERC-20
+// mints its supply from the zero address no matter who launched it.
+
+import catalog from './venue-catalog.json' with { type: 'json' };
+
+export const CATALOG_META = Object.freeze({
+ source: catalog.source,
+ generated_at: catalog.generated_at,
+ window: catalog.window,
+ tokens_scanned: catalog.tokens_scanned,
+ venues: catalog.venues.length,
+});
+
+const byKey = new Map(); // `${address}:${selector}` → venue
+const byAddress = new Map(); // address → venue with the most observed launches
+for (const v of catalog.venues) {
+ byKey.set(`${v.address}:${v.selector}`, v);
+ const prev = byAddress.get(v.address);
+ if (!prev || v.observed_launches > prev.observed_launches) byAddress.set(v.address, v);
+}
+
+/** A short, stable display name: the catalog label, or the address when nameless. */
+export function venueLabel(v) {
+ return v.label || `Launchpad ${v.address.slice(0, 6)}…${v.address.slice(-4)}`;
+}
+
+/**
+ * The venue a transaction launched through, or null when the call is not a
+ * catalogued launch entry point. An exact (contract, selector) match wins; a
+ * known contract with a new selector still counts as that venue, since one
+ * launchpad routinely ships several launch functions.
+ *
+ * @param {string|null|undefined} to the transaction's `to`
+ * @param {string|null|undefined} input the transaction's calldata
+ */
+export function venueForCall(to, input) {
+ if (!to) return null;
+ const address = to.toLowerCase();
+ const selector = typeof input === 'string' && input.length >= 10 ? input.slice(0, 10).toLowerCase() : null;
+ const hit = (selector && byKey.get(`${address}:${selector}`)) || byAddress.get(address) || null;
+ if (!hit) return null;
+ return {
+ id: hit.id,
+ label: venueLabel(hit),
+ kind: hit.kind,
+ address: hit.address,
+ selector,
+ observed_launches: hit.observed_launches,
+ };
+}
+
+/** Every venue in the catalog, for the API's `venues` listing. */
+export function listVenues() {
+ return catalog.venues.map((v) => ({
+ id: v.id,
+ label: venueLabel(v),
+ kind: v.kind,
+ address: v.address,
+ observed_launches: v.observed_launches,
+ launchable: v.launchable,
+ }));
+}