Skip to content

rizalcodes/token-sniffer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 

Repository files navigation

πŸ” Token Sniffer Bot

Detect honeypots, rug pulls & scam tokens on Ethereum β€” powered by GoPlus Security API + Etherscan V2 + Web3.py with Telegram alerts.

Python GoPlus Telegram Ethereum License


πŸ” What is Token Sniffing?

Token sniffing is the process of analyzing an ERC-20 smart contract for malicious patterns before buying β€” helping traders avoid losing funds to honeypots, rug pulls, and scam tokens.

This bot analyzes tokens using:

  • πŸ›‘οΈ GoPlus Security API β€” industry standard token security database
  • πŸ“‹ Etherscan V2 β€” contract verification & on-chain data
  • ⛓️ Web3.py β€” direct Ethereum node interaction via Infura

✨ Features

  • 🍯 Honeypot Detection β€” check if token can actually be sold
  • πŸ’Έ Tax Analysis β€” buy/sell tax percentage check
  • πŸ‘€ Ownership Risk β€” owner & creator holding percentage
  • πŸ”’ LP Lock Check β€” liquidity pool lock verification
  • πŸ“‹ Contract Verification β€” source code verified on Etherscan
  • ⭐ Safety Score β€” 0–100 score with SAFE / RISKY / DANGER label
  • πŸ€– Telegram Bot β€” /sniff and /quick commands
  • πŸ‘€ Watchlist β€” monitor multiple tokens at once

πŸš€ Quick Start

1. Install dependencies

pip install web3 requests

2. Set API keys

Open token_sniffer.py and configure:

ETHERSCAN_API_KEY = "your_etherscan_key"
INFURA_URL        = "https://mainnet.infura.io/v3/your_infura_key"
TELEGRAM_TOKEN    = "your_telegram_bot_token"
TELEGRAM_CHAT_ID  = "your_chat_id"

3. Run as Telegram Bot

python token_sniffer.py

4. Quick CLI check (one-time)

python token_sniffer.py check 0xA0b86991c6218b36c1d19d4a2e9Eb0cE3606eB48

πŸ€– Telegram Commands

Command Description
/sniff <address> Full token safety analysis (~15s)
/quick <address> Quick honeypot check (~5s)
/watch <address> Add token to watchlist
/watchlist View monitored tokens
/unwatch <address> Remove from watchlist

πŸ“Š Sample Output

🟒 TOKEN SAFETY REPORT
━━━━━━━━━━━━━━━━━━━━━━
🏷️ USD Coin ($USDC)
πŸ“ 0xA0b86991...606eB48
⭐ Safety Score: 95/100 β€” SAFE βœ…

πŸ“Š Key Metrics:
- Honeypot    : NO βœ…
- Buy Tax     : 0.0%
- Sell Tax    : 0.0%
- Owner Hold  : 0.0%
- Holders     : 2,100,000+
- LP Locked   : YES βœ…
- Verified    : YES βœ…

⭐ Safety Score System

Score Label Meaning
80 – 100 βœ… SAFE Low risk, looks legitimate
50 – 79 ⚠️ RISKY Proceed with caution
0 – 49 🚨 DANGER High risk, likely scam

Score deductions:

Issue Deduction
Honeypot detected -50
Hidden owner -25
Self-destruct function -30
High sell tax (>10%) -20
Liquidity not locked -15
High buy tax (>10%) -15
Contract unverified -10
Owner can take back ownership -10
High owner/creator holding -10
External call risk -5

πŸ—οΈ Architecture

token_sniffer.py
β”œβ”€β”€ GoPlusClient        β†’ GoPlus Security API integration
β”‚   β”œβ”€β”€ check_token()        β†’ full token security data
β”‚   └── check_honeypot()     β†’ honeypot detection only
β”œβ”€β”€ EtherscanClient     β†’ Etherscan V2 API integration
β”‚   β”œβ”€β”€ get_token_info()     β†’ token name, symbol, supply
β”‚   β”œβ”€β”€ get_contract_info()  β†’ source code verification
β”‚   β”œβ”€β”€ get_token_holders()  β†’ holder count
β”‚   └── get_token_transfers() β†’ recent transfer activity
β”œβ”€β”€ TokenAnalyzer       β†’ Core safety engine
β”‚   β”œβ”€β”€ analyze()            β†’ full safety analysis + scoring
β”‚   └── quick_check()        β†’ fast honeypot check only
└── TokenSnifferBot     β†’ Telegram bot with 5 commands

πŸ“‘ Data Sources

Source Usage
GoPlus Security API Primary β€” honeypot, tax, ownership, LP data
Etherscan V2 Contract verification, token info
Infura Ethereum RPC node

GoPlus free tier supports up to 10,000 requests/day.


⚠️ Risk Disclaimer

Risk Level Description
🟒 SAFE Score 80–100, passed all major checks
🟑 RISKY Score 50–79, has warnings β€” trade carefully
πŸ”΄ DANGER Score 0–49, critical issues detected β€” avoid

This tool is for informational purposes only. Always do your own research before buying any token.


πŸ”§ Requirements

web3>=6.0.0
requests>=2.28.0

πŸ‘€ Author

Rizal β€” @rizalcodes

Building Web3 tools with Python πŸβ›“οΈ


πŸ“„ License

MIT License β€” free to use, modify, and distribute.

About

πŸ” Token Safety Analyzer for Ethereum β€” Detect honeypots, rug pulls & scam tokens using GoPlus Security API + Etherscan V2. Safety scoring system with Telegram bot alerts. Built with Python & Web3.py.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages