Skip to content

Add read-only Solana token risk plugin#134

Open
guoqiangliu-ocean wants to merge 1 commit into
zeroclaw-labs:mainfrom
guoqiangliu-ocean:agent/token-risk-check
Open

Add read-only Solana token risk plugin#134
guoqiangliu-ocean wants to merge 1 commit into
zeroclaw-labs:mainfrom
guoqiangliu-ocean:agent/token-risk-check

Conversation

@guoqiangliu-ocean

@guoqiangliu-ocean guoqiangliu-ocean commented Jul 22, 2026

Copy link
Copy Markdown

What changed

  • add token-risk-check, a single-tool Solana WIT component
  • query mint metadata and largest accounts through operator-configured Solana RPC
  • query observed Solana pools through the current DEX Screener token-pairs API
  • report authorities, Token-2022 extensions, concentration, and liquidity as compact red/amber/green evidence
  • keep all assessment logic in a pure host-testable core with a thin wasi:http shim
  • add offline mock tests, including malformed data, RPC failure, and prompt-injection fail-closed cases
  • document T0 custody, threat model, configuration, limitations, and a worked example

Why

Autonomous agents need a read-only safety check before payment or swap tooling. This plugin provides that check without a private key, signing path, transaction builder, or raw RPC payload in the model context.

Safety

This is custody tier T0. The only tool argument is a base58 mint that must decode to 32 bytes. Endpoints come from the plugin's jailed operator config and must use HTTPS. Missing or malformed source data cannot produce a green result.

Validation

  • cargo fmt --manifest-path plugins/token-risk-check/Cargo.toml --all -- --check
  • cargo metadata --manifest-path plugins/token-risk-check/Cargo.toml --locked --no-deps --format-version 1
  • python tools/build-registry.py --source-plugins plugins --check-metadata registry.json
  • live shape check against Solana getAccountInfo and DEX Screener's documented /token-pairs/v1/solana/{tokenAddress} endpoint
  • full repository workflow on the fork: host tests, clippy, wasm32-wasip2 release builds, registry packaging dry run, and the required validation gate all passed: https://github.com/guoqiangliu-ocean/zeroclaw-plugins/actions/runs/29940249752

The upstream run is awaiting the repository's standard first-time-contributor workflow approval; the identical workflow completed successfully on the fork.

@guoqiangliu-ocean
guoqiangliu-ocean marked this pull request as ready for review July 22, 2026 17:03
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