DEV Community

neuralmint
neuralmint

Posted on

Rug Check CLI — Scan Solana & Ethereum Tokens for Honeypots and Rug-Pull Risks

Ever clicked "buy" on a token, only to realize later you couldn't sell it? That sinking feeling when you check DexScreener and see your position is now worth zero?

I've been there. So I built Rug Check — a zero-dependency Python CLI that scans Solana and Ethereum tokens for red flags before you trade.

What It Does

Give it a token address, and Rug Check returns:

  • Risk score (0–100) with LOW / MEDIUM / HIGH / CRITICAL levels
  • Liquidity depth — how much can you actually trade?
  • 24h volume — is anyone trading this?
  • Honeypot detection — flags tokens where sells are suspiciously absent
  • Holder concentration (Ethereum) — is the supply controlled by a few wallets?
  • CoinGecko listing — has it passed any listing standards?
  • Multi-pair analysis — more pairs = more trustworthy
  • JSON mode for integrating into trading scripts and bots

Quick Start

No pip install needed. Pure Python stdlib:

curl -L https://raw.githubusercontent.com/neuralmint/rug-check/main/rug_check.py -o rug_check.py
python3 rug_check.py --help
Enter fullscreen mode Exit fullscreen mode

Check a Solana token:

python3 rug_check.py EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v --chain solana
Enter fullscreen mode Exit fullscreen mode

Check an Ethereum token with JSON output (pipe into your trading bot):

python3 rug_check.py 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 --chain ethereum --json
Enter fullscreen mode Exit fullscreen mode

Example Output

====================================================
  RUG CHECK REPORT — SOLANA
  Token: EPjFWdd5Aufq...Dt1v
  Risk:  5/100 [LOW]
====================================================
  Price               : $1.0011
  Liquidity (USD)     : $4,361,705.12
  24h Volume (USD)    : $13,866,594.35
  FDV (USD)           : $9,353,648,494.00
  CoinGecko Listed    : ✅ YES
  Trading Pairs       : 30
  Top DEX             : raydium
  24h Transactions    : 26371
  Honeypot Suspected  : ✅ No

  ✅ Looks reasonably safe. Always DYOR.
Enter fullscreen mode Exit fullscreen mode

The Risk Scoring Breakdown

Factor Weight
Liquidity < $1,000 +25
Liquidity < $10,000 +15
Honeypot (volume too low vs liquidity) +20
Not on CoinGecko +10
< 2 trading pairs +5
< 10 transactions in 24h +15
No social links +5
Holder concentration > 80% +25
Unverified contract (Ethereum) +20
Less than 100 holders (Ethereum) +10

Tech Stack

  • Zero dependencies — uses only Python 3 stdlib (urllib, json, argparse, re)
  • Public APIs — DexScreener, CoinGecko (Solana), Etherscan + Ethplorer (Ethereum)
  • Single file — one .py file, drop it anywhere
  • MIT licensed — free to use, modify, redistribute

How It Works Under the Hood

Rug Check queries multiple data sources to build a holistic picture of token safety:

  1. DexScreener for real-time liquidity, volume, and trading pair data across all DEXes
  2. CoinGecko to verify if the token has passed basic listing scrutiny
  3. Ethplorer for Ethereum holder distribution and market cap
  4. Etherscan for contract source code verification status

Each data point feeds into a weighted scoring model. The weights are conservative — a token needs multiple red flags to hit "HIGH" or "CRITICAL".

The neuralmint CLI Tools Series

This is part of the neuralmint CLI Tools series — a growing collection of single-file, zero-dependency Python utilities for crypto developers and traders. Check out the rest:

Support Development

If this tool saves you from a bad trade, consider tossing a coin:

SOL: 4TGyiYBjaYhFFPNYyCoJjf16ctUsWVBiMR1FXQxEfhWi

ETH: 0xe07f177E0725c11EEc8BeA34C5b5193CaF2a1A6a

Get the Code

git clone https://github.com/neuralmint/rug-check.git
cd rug-check
python3 rug_check.py --help
Enter fullscreen mode Exit fullscreen mode

Or just grab the file:

curl -L https://raw.githubusercontent.com/neuralmint/rug-check/main/rug_check.py -o rug_check.py
python3 rug_check.py --help
Enter fullscreen mode Exit fullscreen mode

DYOR always. This tool is a safety check, not financial advice.

Top comments (0)