TrustScore is a platform that analyzes Solana addresses on the blockchain to help people detect fraud, rug pulls, and any other malicious activities. TrustScore provides a real-time risk assessment of any Solana address, assigning a trust score ranging from 0 to 100.
It uses deterministic scoring logic in src/lib/trustscore.ts based on wallet behavior.
- The backend fetches up to 100 transactions for the wallet from Helius.
- Each raw transaction is normalized into a simpler shape: type, source, destination, amount, fee, status, and timestamp.
- The analyzer runs two rule-based checks:
- Anomaly detection looks for rapid activity, unusually large transfers, failed transactions, suspicious repeated destinations, and new-wallet risk.
- Malicious behavior detection looks for patterns associated with rug pulls, honeypots, pump-and-dump activity, scams, money laundering, and bot-like behavior.
- The final trust score is calculated with a weighted formula:
trustScore = 100 - (maliciousScore * 0.6 + anomalyScore * 0.4)
- The result is clamped to a minimum of 0 and mapped to a risk level:
lowfor stronger walletsmediumfor moderate riskhighfor risky walletscriticalfor the most suspicious wallets
Prerequisites:
- Node.js 18+ and npm or pnpm
- Install dependencies
npm install- Add environment variables
Create a .env.local in the project root with your Helius API key:
HELIUS_API_KEY=your_helius_api_key_here(Keep secrets out of version control.)
- Run the app locally
npm run devOpen http://localhost:3000 to view the dashboard.
npm run dev— start the dev servernpm run build— build for productionnpm start— start the production server (afterbuild)
- The Helius key should remain server-side; do not expose it in client bundles.
- Scoring is heuristic and intended for demonstration — review and extend before any production use.