Skip to content

Add rugcheck.xyz holder-quality screening filters#93

Open
agushudono wants to merge 1 commit into
yunus-0x:mainfrom
agushudono:rugcheck-holder-filters
Open

Add rugcheck.xyz holder-quality screening filters#93
agushudono wants to merge 1 commit into
yunus-0x:mainfrom
agushudono:rugcheck-holder-filters

Conversation

@agushudono

Copy link
Copy Markdown

What

Wires four previously-inert user-config.json keys to real screening behavior, backed by a new rugcheck.xyz enrichment:

Key Effect
maxSniperPct Drop candidates whose sniper insider-network concentration exceeds the threshold
maxSuspiciousPct Drop candidates whose flagged-insider holder concentration exceeds the threshold
maxBundlePct Drop candidates whose bundler insider-network concentration exceeds the threshold
convictionScoreMin Drop candidates below a rugcheck-derived conviction score (100 − normalized risk)

All four default to null (disabled), so behavior is unchanged unless an operator opts in.

How

  • tools/rugcheck.js — new internal screening helper getRugcheckSignals({mint}). Fetches the rugcheck report once per mint (15-min cache, 10s timeout), derives conviction_score, suspicious_pct, sniper_pct, bundle_pct, top10_pct. Returns null for any metric rugcheck doesn't supply.
  • index.js — the screening recon loop fetches rugcheck only when at least one threshold is set, applies the filters alongside the existing maxBotHoldersPct check, and surfaces the signals in the candidate block shown to the LLM. Each filter fails open on missing data (same pattern as maxBotHoldersPct).
  • Keys added to config.js, reloadScreeningThresholds, update_config's CONFIG_MAP, and user-config.example.json; documented in CLAUDE.md.

Notes / caveats

  • sniper_pct and bundle_pct depend on rugcheck's insiderNetworks[] carrying typed entries with token amounts, which is often absent/partial — in that case those two filters fail open (no-op) for that token. convictionScoreMin and maxSuspiciousPct are the most reliably populated.
  • Not an LLM tool — purely an internal pre-LLM enrichment, so no changes to tools/definitions.js / agent.js tool sets.

Testing

  • node --check on all touched JS.
  • Unit-verified the derivation math against a sample rugcheck payload: conviction 100−18=82, suspicious 8+5=13%, sniper 5%, bundle 3%, top10 41.5%; 404/error path returns all-null (fail-open).

🤖 Generated with Claude Code

Wires four previously-inert user-config keys to real screening behavior,
backed by a new rugcheck.xyz enrichment:

- maxSniperPct / maxSuspiciousPct / maxBundlePct: drop candidates whose
  insider-network / flagged-insider concentration exceeds the threshold.
- convictionScoreMin: drop candidates below a rugcheck-derived conviction
  score (100 - normalized risk).

tools/rugcheck.js (getRugcheckSignals) fetches the rugcheck report once per
mint (15-min cache, 10s timeout) and derives the metrics, returning null for
anything rugcheck doesn't supply. The screening recon loop only fetches
rugcheck when at least one threshold is set, and each filter fails open on
missing data (same pattern as maxBotHoldersPct). Signals are also surfaced in
the candidate block shown to the LLM.

Keys added to config.js, reloadScreeningThresholds, update_config CONFIG_MAP,
and user-config.example.json; documented in CLAUDE.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant