project screenshot 1
project screenshot 2
project screenshot 3

Coin Copycat TG Bot

Coin Copycat is a socialfi telegram trading bot that let's you copy trade your friends in your TG group!

Coin Copycat TG Bot

Created At

ETHGlobal Singapore

Project Description

CoinCopyCat is an innovative Telegram bot that enables crypto copy-trading on Ethereum's Holesky testnet, focusing on Uniswap V2 swaps. This project allows users to easily participate in copy-trading strategies without the need for complex setups or deep technical knowledge. Key features include:

Seamless wallet creation and management directly through Telegram. Real-time balance checking for ETH and popular ERC20 tokens. Ability to copy trades from any Ethereum address on the Holesky testnet. Automatic trade replication with customizable trade sizing. Direct swap functionality using Uniswap V2. User-friendly interface with inline keyboards for easy navigation.

CoinCopyCat democratizes copy-trading by making it accessible to anyone with a Telegram account. It's designed to be educational, allowing users to learn about DeFi and trading strategies in a risk-free testnet environment. The bot's simplicity and integration with Telegram make it an ideal tool for both crypto newcomers and experienced traders looking to test new strategies.

How it's Made

CoinCopyCat is built using a stack of modern technologies, carefully integrated to create a seamless user experience:

Node.js: The core of the application, handling the bot's logic and interactions. Ethers.js: Used for Ethereum blockchain interactions, including wallet management, transaction signing, and smart contract interactions. Telegram Bot API (node-telegram-bot-api): Enables the bot to communicate with users through Telegram, providing a familiar and accessible interface. SQLite (sqlite3): A lightweight, serverless database used to store user data and copy-trading relationships, ensuring persistence across bot restarts. Uniswap V2 SDK: Integrated to facilitate swap operations on the Uniswap decentralized exchange. Dotenv: Used for managing environment variables, keeping sensitive information like API keys secure. Crypto (Node.js built-in): Employed for encrypting and decrypting private keys, adding an extra layer of security for user wallets.

The bot's architecture is modular, with separate functions handling different aspects like wallet management, balance checking, and trade execution. This design allows for easy maintenance and future expansion. One particularly innovative aspect is the real-time transaction monitoring system. It uses Ethers.js event listeners to detect trades made by copied addresses instantly. When a trade is detected, the bot decodes the transaction input and replicates the trade for all followers, adjusting the trade size based on each follower's settings. The integration with Telegram's inline keyboards creates an intuitive, app-like experience within the messaging platform, making complex DeFi interactions as simple as tapping a button. A notable "hacky" solution was implementing a simple key-value store using SQLite for fast, lightweight data storage, avoiding the need for a full-fledged database server while still maintaining data persistence. By leveraging the Holesky testnet, we've created a risk-free environment for users to explore copy-trading strategies, learn about DeFi, and experiment with different approaches to crypto trading, all through the familiar interface of Telegram.

background image mobile

Join the mailing list

Get the latest news and updates