Skip to content

feat: token-risk-check plugin (Track D, T0) - #142

Open
BigGbotex wants to merge 1 commit into
zeroclaw-labs:mainfrom
BigGbotex:feat/token-risk-check
Open

feat: token-risk-check plugin (Track D, T0)#142
BigGbotex wants to merge 1 commit into
zeroclaw-labs:mainfrom
BigGbotex:feat/token-risk-check

Conversation

@BigGbotex

Copy link
Copy Markdown

What this is

A ZeroClaw WIT tool plugin: given a Solana mint address, returns a 🔴/🟡/🟢 risk verdict with plain-English reasons — mint/freeze authority status, dangerous Token-2022 extensions (permanent delegate, transfer hook, non-transferable, frozen-by-default, transfer fee), holder concentration, and liquidity, instead of a raw RPC dump.

Track D (Onchain intelligence & safety) — the brief specifically calls this one out: "This plugin makes every other plugin safer; we'd like it to exist most of all."

Custody tier: T0 (Read)

No transaction is ever built, signed, or submitted. The only outbound calls are read-only JSON-RPC (getAccountInfo, getTokenLargestAccounts) and a best-effort GET to Jupiter's public quote API to check for a liquidity route. The only "secret" this plugin can read is an optional operator-supplied RPC URL.

Layout

  • src/risk.rs — pure core, no wasm/http deps, host-testable with plain cargo test
  • src/lib.rs — thin #[cfg(target_family = "wasm")] shim over wasi:http via waki
  • tests/risk.rs — 17 host-run tests against mocked RPC JSON fixtures, including a prompt-injection test

Full threat model, the prompt-injection transcript, config keys, and build instructions are in README.md.

Verified

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.

2 participants