# Anti Rug Cn

> Web3 token security scanner with expert cross-validation engine. Detects honeypots, rug pulls, and contract risks across Ethereum, BSC, Polygon, and other EVM chains.

- Skill: `knownasnaffy/anti-rug-cn-5` (Agent Skill, multi-file: 15 files)
- Install (CLI): `npx skillmds@latest add knownasnaffy/anti-rug-cn-5`
- Raw SKILL.md: https://api.skillmd.com/api/skills/knownasnaffy/anti-rug-cn-5/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: knownasnaffy (https://skillmd.com/u/knownasnaffy)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/knownasnaffy/anti-rug-cn-5

---





### Credential Fixture Review

`python scripts/_api_config.py` is review material for the `Web3 Token Security Scanner (Anti-Rug)` skill. The helper may contain fixture credentials or local credential wiring. Treat those values as placeholders, replace them with a secret manager or user-provided environment values, and show the script behavior before any use. Do not contact external services with embedded sample credentials.

# Web3 Token Security Scanner (Anti-Rug)

**Maintainer: Antalpha AI Team**

A professional-grade token contract security analyzer featuring scenario-based classification and cross-validation engine.

## Overview

This tool performs comprehensive security analysis of token contracts with:
- **Scenario Classification**: Automatically categorizes tokens (A: Pegged Assets, B: Eco Tokens, C: Meme Coins)
- **Cross-Validation Engine**: Analyzes relationships between indicators (neutralized/amplified/contextual)
- **Dynamic Risk Scoring**: Weighted scoring system adapted to token type
- **Fatal Finding Detection**: One-strike rules for critical vulnerabilities

## Supported Chains

- Ethereum (chain_id: 1)
- BNB Smart Chain (chain_id: 56)
- Polygon (chain_id: 137)
- Arbitrum One (chain_id: 42161)
- Base (chain_id: 8453)
- Optimism (chain_id: 10)
- Avalanche C-Chain (chain_id: 43114)
- Solana (chain_id: solana)

## Installation

```bash
git clone https://github.com/ZorroShao/anti-rug.git
cd anti-rug
pip install -r requirements.txt
```

## Usage

```bash
python scripts/check_token.py --chain_id 56 --contract_address 0x...
```

## Scenario Classification

### Scenario A: Pegged/Stable Assets
Examples: USDT, USDC, WETH, WBNB
- Mintable: ✅ Expected for peg maintenance
- Owner: ✅ Institution custody is normal
- Blacklist: ✅ Compliance requirement

### Scenario B: Ecosystem Tokens
Examples: UNI, AAVE, established DeFi
- Proxy: ✅ Acceptable for upgradeability
- Treasury: ✅ Protocol-owned liquidity expected

### Scenario C: Meme/Unknown Tokens
- All permissions: ⚠️ Treated as potential rug tools
- Strictest evaluation applied

## Risk Severity Levels

| Score | Level | Action |
|-------|-------|--------|
| 0-24 | Low | ✅ Base security passed |
| 25-49 | Low-Medium | 🟡 Minor concerns |
| 50-74 | Medium | 🟡 Caution required |
| 75-100 | High | 🔴 Dangerous |
| Fatal | Critical | 🛑 Do not buy |

## Architecture

```
config.py           # Centralized configuration
exceptions.py       # Custom exception classes
validators/         # Cross-validation rules (modular)
  cv_mint_ownership.py
  cv_concentration.py
  cv_proxy.py
  cv_tax_scenario.py
tests/              # Unit tests
scripts/
  check_token.py    # Main entry point
```

## License

MIT License - See LICENSE file

