Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sol-sniffer

sol-sniffer analyzes Solana transactions and reports a vibe_score, verdict, and heuristic flags.

sol-sniffer landing screen

Vibe Ratings

Medium-High Example

sol-sniffer medium-high vibe example

Low Example

sol-sniffer low vibe example

High Example

sol-sniffer high vibe example

Mainnet Example Transactions

These signatures were sampled from Solana mainnet and confirmed against the local analyzer.

Score Verdict Signature Flags
100 clean 5f7j1Wpd2QYf7672CGM7WTHhhdFUC2gdEqUytm8EZB4Hr3jXxjaSv7fDi6iActygMtgaD271kmh59AZBZaV4gq26 none
80 mild_sus 5mzrzvoRHSupKAMoSC3ZpL9bK5fQT37nwPnKr2HnDetzPAeKYr7VMPo69m8tzg29XPWXrL2EhWzEzdcp62sgabMU unknown_program
0 high_risk 3XVDA7tY8ZUrG5Geb7fGWGeW3cjf1hReqfJP4n3zwqF3CZbef3pU2XPht7tDGgsYW6vUNFUDMNYAuJkgFah1NF3U large_lamport_transfer, unknown_program, close_account, unknown_program, close_account

The repo is split into two top-level apps:

  • backend/ is the Rust API workspace.
  • frontend/ is the React UI.

Project Layout

.
├── backend/
│   ├── Cargo.toml
│   └── crates/
│       ├── analyzer/    # Axum HTTP API
│       ├── fetcher/     # RPC fetch and base64 transaction decode
│       ├── heuristics/  # transaction checks
│       ├── scoring/     # score and verdict summary
│       └── sbpf/        # future bytecode analysis layer
└── frontend/            # Vite + React app

Running Locally

Install frontend dependencies once:

npm --prefix frontend install

Start the backend API:

npm run dev:backend

Start the React frontend in another terminal:

npm run dev:frontend

The API listens on http://localhost:3030. The frontend listens on http://localhost:5173 and proxies /analyze and /healthz to the backend.

API

Health Check

curl http://localhost:3030/healthz

Expected response:

ok

Analyze A Transaction

Send POST /analyze with either a transaction signature or a base64-encoded serialized VersionedTransaction.

curl -X POST http://localhost:3030/analyze \
  -H 'content-type: application/json' \
  -d '{
    "input": "5KQ4Wqf8iJXq9gHkYx7Jw8d8Q1x4d7u1G5eXo2u1vQq3R2kJm8n1zQe8VbY7U3fQm2y9B3o6P4x5v6d7c8b9a",
    "rpc_url": "https://api.mainnet-beta.solana.com"
  }'

If rpc_url is omitted, the backend uses https://api.mainnet-beta.solana.com.

Example response shape:

{
  "vibe_score": 80,
  "verdict": "mild_sus",
  "flags": [
    {
      "code": "unknown_program",
      "severity": 20,
      "message": "unknown program id: ..."
    }
  ]
}

Development

Check the Rust workspace:

npm run check:backend

Build the React app:

npm run check:frontend

Format the backend:

cargo fmt --manifest-path backend/Cargo.toml

About

Sol-sniffer analyzes Solana transactions and reports a vibe_score, verdict, and heuristic flags

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages