Building a Powerful EVM Token Analysis Telegram Bot

Introduction In today's fast-paced crypto world, having real-time insights into token metrics can make the difference between a successful trade and a missed opportunity. While many traders rely on scattered data sources and manual research, what if you could access comprehensive token analytics directly through Telegram? That's exactly what the EVM Token Analysis Bot provides — a powerful Telegram-based solution that delivers detailed token insights across multiple EVM-compatible blockchains including Ethereum, Binance Smart Chain (BSC), and Base. In this article, I'll walk you through the architecture, features, and implementation details of this advanced blockchain analytics bot that makes on-chain data analysis accessible to everyone. Why Token Analysis Matters in DeFi The decentralized finance landscape is incredibly dynamic, with thousands of tokens launching across multiple chains daily. For traders and investors, understanding token metrics is crucial for: Identifying early opportunities – Finding promising tokens before they gain mainstream attention Avoiding scams – Detecting red flags in token contracts and deployer behavior Understanding market dynamics – Tracking whale movements and profit patterns Making data-driven decisions – Basing trades on actual on-chain metrics rather than speculation However, gathering this data traditionally requires: Navigating multiple block explorers Using various analytics platforms Understanding complex blockchain data Spending hours on manual research The EVM Token Analysis Bot solves these challenges by bringing comprehensive token analytics directly to Telegram, making powerful insights available with just a few clicks. Key Features of the EVM Token Analysis Bot Free Features The bot offers several powerful features even to free users: First Buyers & Profits Analysis View the first 1–50 wallets that bought a token Detailed statistics including buy & sell amounts Total trades, PNL, and win rate metrics Limited to 3 token scans per day for free users Most Profitable Wallets Discover which wallets have made the most profit from a specific token View buy & sell totals and net profit Identify successful trading patterns Limited to 3 token scans per day for free users Market Cap & ATH Analysis View the all-time high market cap of any token See ATH date and percentage from ATH Track market cap evolution Limited to 3 token scans per day for free users Premium Features For power users, the premium tier unlocks advanced capabilities: Deployer Wallet Scan Reveal the deployer wallet address See all tokens deployed by the same wallet View ATH market cap and x-multipliers for each token Identify potential connections between projects Top Holders & Whale Watch See the top 10 holders of any token Monitor whale wallets Get notifications when Dev, whales, or top holders sell Track significant wallet movements High Net Worth Holders Scan for wallets holding over $10,000 worth of a token View total worth in USD and token amount See average holding time Identify potential market movers Unlimited Access Premium subscribers get unlimited access to all features No daily scan limits Priority data processing Technical Architecture The EVM Token Analysis Bot is built with a modular architecture that ensures reliability, scalability, and efficient data processing: 1. Multi-Chain Support The bot supports multiple EVM-compatible blockchains: Ethereum Mainnet Binance Smart Chain Base Network Each chain connection is initialized with appropriate middleware and configuration. def _initialize_web3(self, network: str) -> Web3: """Initialize Web3 connection for the specified network.""" provider_url = NETWORKS[network]["provider_url"] logger.info(f"Initializing Web3 for {network} with provider URL: {provider_url}") web3 = Web3(Web3.HTTPProvider(provider_url)) # Add PoA middleware for networks like BSC web3.middleware_onion.inject(ExtraDataToPOAMiddleware, layer=0) # For BNB Chain (BSC), we need additional configuration if network == "BNB": # BSC uses a different gas price strategy from web3.gas_strategies.rpc import rpc_gas_price_strategy web3.eth.set_gas_price_strategy(rpc_gas_price_strategy) if not web3.is_connected(): logger.error(f"Failed to connect to {network} network") raise ConnectionError(f"Cannot connect to {network} network") logger.info(f"Connected to {network} network: Chain ID {web3.eth.chain_id}") return web3 2. Data Models The bot uses structured data models to ensure consistency and reliability: class TokenData: """Model for cached token data""" def __init__( self, address: str, name: Optional[str] = None, symbol: Optional[str] = Non

Apr 22, 2025 - 08:56
 0
Building a Powerful EVM Token Analysis Telegram Bot

Introduction

In today's fast-paced crypto world, having real-time insights into token metrics can make the difference between a successful trade and a missed opportunity. While many traders rely on scattered data sources and manual research, what if you could access comprehensive token analytics directly through Telegram?

That's exactly what the EVM Token Analysis Bot provides — a powerful Telegram-based solution that delivers detailed token insights across multiple EVM-compatible blockchains including Ethereum, Binance Smart Chain (BSC), and Base.

In this article, I'll walk you through the architecture, features, and implementation details of this advanced blockchain analytics bot that makes on-chain data analysis accessible to everyone.

Image description

Why Token Analysis Matters in DeFi

The decentralized finance landscape is incredibly dynamic, with thousands of tokens launching across multiple chains daily. For traders and investors, understanding token metrics is crucial for:

  • Identifying early opportunities – Finding promising tokens before they gain mainstream attention
  • Avoiding scams – Detecting red flags in token contracts and deployer behavior
  • Understanding market dynamics – Tracking whale movements and profit patterns
  • Making data-driven decisions – Basing trades on actual on-chain metrics rather than speculation

However, gathering this data traditionally requires:

  • Navigating multiple block explorers
  • Using various analytics platforms
  • Understanding complex blockchain data
  • Spending hours on manual research

The EVM Token Analysis Bot solves these challenges by bringing comprehensive token analytics directly to Telegram, making powerful insights available with just a few clicks.

Key Features of the EVM Token Analysis Bot

Free Features

The bot offers several powerful features even to free users:

First Buyers & Profits Analysis

  • View the first 1–50 wallets that bought a token
  • Detailed statistics including buy & sell amounts
  • Total trades, PNL, and win rate metrics
  • Limited to 3 token scans per day for free users

Most Profitable Wallets

  • Discover which wallets have made the most profit from a specific token
  • View buy & sell totals and net profit
  • Identify successful trading patterns
  • Limited to 3 token scans per day for free users

Market Cap & ATH Analysis

  • View the all-time high market cap of any token
  • See ATH date and percentage from ATH
  • Track market cap evolution
  • Limited to 3 token scans per day for free users

Premium Features

For power users, the premium tier unlocks advanced capabilities:

Deployer Wallet Scan

  • Reveal the deployer wallet address
  • See all tokens deployed by the same wallet
  • View ATH market cap and x-multipliers for each token
  • Identify potential connections between projects

Top Holders & Whale Watch

  • See the top 10 holders of any token
  • Monitor whale wallets
  • Get notifications when Dev, whales, or top holders sell
  • Track significant wallet movements

High Net Worth Holders

  • Scan for wallets holding over $10,000 worth of a token
  • View total worth in USD and token amount
  • See average holding time
  • Identify potential market movers

Unlimited Access

  • Premium subscribers get unlimited access to all features
  • No daily scan limits
  • Priority data processing

Technical Architecture

The EVM Token Analysis Bot is built with a modular architecture that ensures reliability, scalability, and efficient data processing:

1. Multi-Chain Support

The bot supports multiple EVM-compatible blockchains:

  • Ethereum Mainnet
  • Binance Smart Chain
  • Base Network

Each chain connection is initialized with appropriate middleware and configuration.

def _initialize_web3(self, network: str) -> Web3:
    """Initialize Web3 connection for the specified network."""
    provider_url = NETWORKS[network]["provider_url"]
    logger.info(f"Initializing Web3 for {network} with provider URL: {provider_url}")

    web3 = Web3(Web3.HTTPProvider(provider_url))

    # Add PoA middleware for networks like BSC
    web3.middleware_onion.inject(ExtraDataToPOAMiddleware, layer=0)

    # For BNB Chain (BSC), we need additional configuration
    if network == "BNB":
        # BSC uses a different gas price strategy
        from web3.gas_strategies.rpc import rpc_gas_price_strategy
        web3.eth.set_gas_price_strategy(rpc_gas_price_strategy)

    if not web3.is_connected():
        logger.error(f"Failed to connect to {network} network")
        raise ConnectionError(f"Cannot connect to {network} network")

    logger.info(f"Connected to {network} network: Chain ID {web3.eth.chain_id}")
    return web3

2. Data Models

The bot uses structured data models to ensure consistency and reliability:

class TokenData:
    """Model for cached token data"""
    def __init__(
        self,
        address: str,
        name: Optional[str] = None,
        symbol: Optional[str] = None,
        deployer: Optional[str] = None,
        deployment_date: Optional[datetime] = None,
        current_price: Optional[float] = None,
        current_market_cap: Optional[float] = None,
        ath_market_cap: Optional[float] = None,
        ath_date: Optional[datetime] = None,
        last_updated: Optional[datetime] = None
    ):
        self.address = address
        self.name = name
        self.symbol = symbol
        self.deployer = deployer
        self.deployment_date = deployment_date
        self.current_price = current_price
        self.current_market_cap = current_market_cap
        self.ath_market_cap = ath_market_cap
        self.ath_date = ath_date
        self.last_updated = last_updated or datetime.now()

3. Database Integration

The bot uses MongoDB for efficient data storage and retrieval:

def init_database() -> bool:
    """Initialize the database connection and set up indexes"""
    global _db

    try:
        # Connect to MongoDB
        client = MongoClient(MONGODB_URI) 
        _db = client[DB_NAME]

        # Set up indexes for collections
        # Users collection
        _db.users.create_index([("user_id", ASCENDING)], unique=True)

        # User scans collection
        _db.user_scans.create_index([
            ("user_id", ASCENDING),
            ("scan_type", ASCENDING),
            ("date", ASCENDING)
        ], unique=True)

        # Token data collection
        _db.token_data.create_index([("address", ASCENDING)], unique=True)
        _db.token_data.create_index([("deployer", ASCENDING)])

        # Additional indexes for watchlists
        # ...

        return True
    except Exception as e:
        logging.error(f"Failed to initialize database: {e}")
        return False

4. Subscription Management

The bot implements a subscription system to manage free and premium users:

def check_subscription_payment(self, user_id: int) -> Dict[str, Any]:
    if user_id not in self.subscriptions:
        logger.warning(f"No subscription found for user {user_id}")
        return {
            "success": False,
            "error": {
                "code": "SUBSCRIPTION_NOT_FOUND",
                "message": f"No subscription found for user {user_id}"
            }
        }

    subscription = self.subscriptions[user_id]
    network = subscription["network"]
    address = subscription["wallet_address"]
    required_amount = subscription["amount_required"]

    balance_result = self.check_wallet_balance(address, network)
    if not balance_result["success"]:
        return balance_result

    current_balance = balance_result["data"]["native_balance"]
    formatted_balance = balance_result["data"]["formatted_native_balance"]

    # Process payment logic
    # ...

5. Telegram Bot Interface

The bot provides an intuitive Telegram interface with rich menus and callbacks:

async def handle_start_menu(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:
    """Handle the main menu display with only token analysis functionality"""

    if "default_network" not in context.user_data:
        context.user_data["default_network"] = "eth"

    selected_network = context.user_data.get("default_network")
    network_display = {
        "eth": "