solana-risk-engine 0.5.3 → 0.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -31,7 +31,7 @@ for (const l of r.lights) // the four traffic lights
31
31
  | **Serial creators** | For markets under 7 days: how many other tokens the creator launched in the last 24 h (RugCheck). 2 or more is a warning, 5 or more a red flag. `recentLaunches(client, wallet)` counts the same on chain for the wallet that *paid* a launch, which catches farms that name a fresh creator each time. When RugCheck has no report yet (it often answers 400 for tokens a few minutes old) the analysis falls back to `chainLaunches(client, mint)`: that count for the first signer of the token's creation transaction, reported as its own signal `CTL_SERIAL_PAYER` ("the wallet that paid for this launch…", never as the creator) and skipped when the SolFlag wallet base knows that wallet as an exchange or platform. |
32
32
  | **Impostors** | Tokens using the symbol or name of a famous token (USDC, JUP, BONK, WIF, BTC, ETH...) with a different address. |
33
33
  | **Real brands** | About 320 real companies with no token on Solana (Spotify, Nike, Zara, Ferrari...). A token called just that is a red flag and **HIGH**; the brand as one word of a longer name is a warning. Everyday words that are also brands (Shell, Target, Puma) are left out, and markets at least 30 days old with $100k+ liquidity are not checked. |
34
- | **Known issuers and official tokens** | Stablecoins from Paxos (PYUSD, USDG), Circle (USDC, EURC) and Tether (USDT), tokenized shares from xStocks (all recognised by their control keys, taken from mints the issuer lists on its own pages) and official tokens from exchanges and Socios.com (bnSOL, bbSOL, cbBTC, club fan tokens..., by mint address) are shown as dependency on the issuer. Their large holders (treasury, custodians, exchanges) are shown but do not count as concentration, a 0% transfer fee is not a warning, and a tiny Solana pool is a warning, not a red flag. A short **trusted** list (Circle, Paxos, Tether, xStocks; `trustedIssuer()`) goes further: every light green, holders not checked. If one of an issuer's official mints shows a control key that is not on the list (a key rotation, or a stolen key), it keeps the issuer but turns amber (`CTL_ISSUER_KEYS_CHANGED`, `issuerKeysChanged()`) until the key is reviewed; `setIssuers(list)` swaps in a reviewed list without a new release. |
34
+ | **Known issuers and official tokens** | Stablecoins from Paxos (PYUSD, USDG), Circle (USDC, EURC) and Tether (USDT), Ondo's USDY, OUSG and USDon, tokenized shares from xStocks (all recognised by their control keys, taken from mints the issuer lists on its own pages) and official tokens from exchanges and Socios.com (bnSOL, bbSOL, cbBTC, club fan tokens..., by mint address) are shown as dependency on the issuer. Their large holders (treasury, custodians, exchanges) are shown but do not count as concentration, a 0% transfer fee is not a warning, and a tiny Solana pool is a warning, not a red flag. A short **trusted** list (Circle, Paxos, Tether, xStocks; `trustedIssuer()`) goes further: every light green, holders not checked. If one of an issuer's official mints shows a control key that is not on the list (a key rotation, or a stolen key), it keeps the issuer but turns amber (`CTL_ISSUER_KEYS_CHANGED`, `issuerKeysChanged()`) until the key is reviewed; `setIssuers(list)` swaps in a reviewed list without a new release. A known issuer's token with no public market (sold only to approved investors, like OUSG) is "no market", never spam. |
35
35
  | **Token type** | `STABLE`, `TOKENIZED`, `BRIDGED`, `CREATOR`, `OPEN`. Each type is judged by the rules that fit it: a bridged token normally has a program as mint authority, a memecoin does not. |
36
36
  | **Bots and exchanges** | Wallets that made 200 transactions in under 2 days are marked `active` and are not counted as whales. |
37
37
  | **Funder clusters** | The fee payer of each holder's *first* transaction reveals who created it. Holders sharing a funder are grouped, since that is often one team splitting the supply. Exchange hot wallets are excluded as sources. |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "solana-risk-engine",
3
- "version": "0.5.3",
3
+ "version": "0.5.4",
4
4
  "description": "Explainable risk analysis for Solana tokens and wallets: creator control, real holder concentration, inflated liquidity, impostor tokens, funder clusters and PnL. Zero dependencies, runs in Node and the browser.",
5
5
  "type": "module",
6
6
  "main": "./src/index.js",
package/src/constants.js CHANGED
@@ -193,6 +193,19 @@ export const ISSUERS = [
193
193
  "Hy9168u7b2Toujh8SJKtKK8DWbyaBbXPzxm337R4o4XY", // EURC mint
194
194
  "6FF2CPcL6fat16QVJH6W27DeBcX7TSqbwY3a5wtyVJLC" // EURC freeze
195
195
  ] },
196
+ // Ondo (12/11/2026): verified issuer, not on the trusted list. Mints from https://docs.ondo.finance/addresses
197
+ // (Solana). OUSG and USDon are sold only to approved investors and have no public market; the Ondo
198
+ // Global Markets stock tokens are not listed there by address, so they are not here yet
199
+ { name: "Ondo", mints: {
200
+ "A1KLoBrKBde8Ty9qtNQUtq3C2ortoC3u7twggz7sEto6": "https://docs.ondo.finance/addresses", // USDY
201
+ "i7u4r16TcsJTgq1kAG8opmVZyVnAKBwLKu6ZPMwzxNc": "https://docs.ondo.finance/addresses", // OUSG
202
+ "ZPFtoCe7WWqG4N3ZFRccS8T9SMBeHsd1Vmgv2i7ondo": "https://docs.ondo.finance/addresses" // USDon
203
+ }, keys: [
204
+ "8n2uiRUd1A9NN78PKESkJe6k6zMqtKCZh3MrK1j9qkB1", // USDY mint
205
+ "51QVCuHfL1FeNjd8BDeffCKhCcAYoULnVB3yjNhShiuK", // USDY and USDon freeze
206
+ "6ViaRWzv7p56RfP1A9Hxy2ctu9kfE3XL43SxWuq3E4cE", // OUSG mint and freeze
207
+ "9foMHsSDq7nMg4WPusSz9eY7tyxyukqborA8GyU5cUxD" // USDon mint, delegate, hook, pause, scaling
208
+ ] },
196
209
  { name: "Tether", trusted: true, mints: {
197
210
  "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB": "https://tether.to/en/supported-protocols"
198
211
  }, keys: [
package/src/risk.js CHANGED
@@ -58,6 +58,9 @@ export function tokenType(info, pair, now) {
58
58
  // "bridged" because its pair as base token is recent)
59
59
  if (/USD|DOLLAR|EUR/i.test(sym) && anyIssuer(info, pair && pair.baseToken && pair.baseToken.address)) return "STABLE";
60
60
  if (info.ext.indexOf("permanentDelegate") >= 0) return "TOKENIZED";
61
+ // a known issuer's share, fund or bond token is tokenized even without a permanent delegate (Ondo's
62
+ // SPYon showed "bridged", 12/11). Official exchange tokens (bnSOL, cbBTC) are not in ISSUERS and stay bridged
63
+ if (issuerOf(info) || issuerKeysChanged(info, pair && pair.baseToken && pair.baseToken.address)) return "TOKENIZED";
61
64
  const walletAuth = (info.mintAuth && ak[info.mintAuth] !== "program") || (info.freezeAuth && ak[info.freezeAuth] !== "program");
62
65
  if (walletAuth) return "CREATOR";
63
66
  if (info.mintAuth || info.freezeAuth) return "BRIDGED";
@@ -362,7 +365,13 @@ export async function assess(client, mint, pair, opts) {
362
365
  const s = score(info);
363
366
  pts = s.pts; reasons = s.why; lvl = pts >= 25 ? "SPAM" : "NO_MARKET";
364
367
  // an official token with no Solana pool (bgSOL trades on Bitget) is not spam: its issuer mints it
365
- if (OFFICIAL_TOKENS[mint]) { pts = 0; lvl = "NO_MARKET"; reasons = [sig("DEP_KNOWN_ISSUER", "warn", { issuer: OFFICIAL_TOKENS[mint] }), sig("NO_MARKET", "na")]; }
368
+ // nor is a known issuer's token sold only to approved investors (Ondo's OUSG and USDon showed "probable spam", 12/11)
369
+ const noMktIssuer = OFFICIAL_TOKENS[mint] || anyIssuer(info, mint);
370
+ if (noMktIssuer) {
371
+ pts = 0; lvl = "NO_MARKET"; reasons = [sig("DEP_KNOWN_ISSUER", "warn", { issuer: noMktIssuer }), sig("NO_MARKET", "na")];
372
+ const rot = issuerKeysChanged(info, mint);
373
+ if (rot) reasons.unshift(sig("CTL_ISSUER_KEYS_CHANGED", "warn", { issuer: rot.issuer, keys: rot.keys }));
374
+ }
366
375
  }
367
376
  return {
368
377
  mint: mint, sym: base.symbol || short(mint), name: base.name || "", pts: pts, sev: sev,