Understanding Pump and Dump
A pump and dump is a form of securities fraud involving artificially inflating the price of a cryptocurrency through false and misleading positive statements, or directly through orchestration, (the "pump"), in order to sell cheaply purchased tokens at a higher price (the "dump"). Once the operators sell their overvalued shares, the price collapses and other investors lose their money.
According to Wikipedia, these schemes are particularly prevalent in unregulated cryptocurrency markets. A 2018 study by the University of New Mexico, Tel Aviv University, and the University of Tulsa identified over 4,800 suspected pump-and-dump events within just six months, many coordinated via Telegram and Discord groups.
Being an unregulated market with a concentration of large amounts of cryptocurrency in few hands, crypto prices are especially sensitive to pump-and-dump schemes. The entire cycle can unfold in minutes, with prices doubling in 10-20 seconds and then crashing just as quickly.
Technical Architecture
The bot demonstrates advanced software engineering concepts:
Core Components
- main.py - Telegram integration & P2P coordination
- p2p_network.py - WebSocket mesh network for signal relay
- exchange.py - Trading logic, order execution, price evaluation
- binance/streams.py - WebSocket connection for real-time order updates
- utils/ - HTTP client with rate limiting, HMAC-SHA256 signatures, mathematical utilities
Multi-Threading Architecture
The bot uses several concurrent threads for optimal performance, and requests on some thread's queues have a priority value, ensuring the most important operations are processed first:
- Main Thread: Telegram client event loop
- Binance Thread: Exchange operations and HTTP request processing
- Discovery Thread: Waits for pump signal from queue
- User Data Stream Thread: WebSocket connection for order updates
- Ticker Request Thread: Continuous price polling
- Message Queue Thread: Sends status updates back to a Telegram C&C Channel
Trading Strategy
Buy Phase:
- Immediately places market buy order for configured investment amount
- Tracks all partial fills through User Data Stream WebSocket
- Calculates weighted average buy price across multiple fills
Sell Strategy (Multi-Trigger System):
- Past Price Increase: Sells 75% if price increases 150% above pre-pump price
- Current Price Increase: Sells portion if price increases 100% above buy price
- Maximum Fall: Sells all if price drops 40% from maximum reached
- Buy Price Protection: Optional safety trigger at -30% below buy price
Results and Findings
Technical Success
From a software engineering perspective, the project successfully demonstrated:
- Distributed P2P mesh networking with WebSocket-based signal relay across several participants/peers
- Real-time event-driven architecture with multiple concurrent data streams
- Financial-grade decimal precision to avoid floating-point errors
- Robust error handling with retry logic and circuit breakers
- Multi-threaded coordination using queues and thread-safe operations
- Performance optimization through async operations
- Geographic latency mitigation through distributed peer coordination
Economic Reality
However, the practical findings were clear:
- Competition is fierce - many other bots compete for the same signals
- Telegram latency is unpredictable - even tho mitigated via P2P optimization
- Slippage is significant - large orders get filled at worse prices
- Risk exceeds reward - conservative safety margins prevent profitable exploitation
- Market manipulation is unreliable - prices can crash before sell orders execute
Ethical Conclusion
Beyond the technical and economic findings, pump-and-dump schemes:
- Are illegal in most jurisdictions (US, EU, and many others)
- Cause real financial harm to uninformed investors
- Damage trust in cryptocurrency markets
- Represent market manipulation that harms the ecosystem
This proof-of-concept validated that these schemes are:
- Technically detectable and exploitable (with significant effort)
- Economically unprofitable (within conservative safety margins)
- Ethically and legally indefensible
The code remains available on GitHub for educational purposes only, demonstrating advanced trading bot architecture and distributed systems design - but we strongly advise against any participation in such schemes.
Credits and Sources
This article and the proof-of-concept project were informed by the following sources:
Primary References
- Wikipedia: Pump and dump - Comprehensive overview of pump-and-dump schemes, legal cases, and regulatory information
- CoinsPaid: What is pump and dump in crypto? - Detailed explanation of crypto-specific pump-and-dump mechanics, warning signs, and the four-phase process
- Pump-and-dump example image: CoinsPaid visualization showing real Telegram group and corresponding price spike
Research Papers Mentioned
- University of New Mexico, Tel Aviv University, and University of Tulsa (2018) - Study identifying 4,800+ pump-and-dump events in six months
Code Repository
The complete source code for this proof-of-concept is available on GitHub:
- Repository: github.com/eliasiturri/pump-n-dump
- Disclaimer: Not intended for actual trading
Legal and Regulatory Information
Pump-and-dump schemes are considered market manipulation and are illegal in most jurisdictions, including:
- United States (Securities and Exchange Commission)
- European Union member states
- United Kingdom (Financial Conduct Authority)
- Many other countries with securities regulations
Acknowledgments
Special thanks to the open-source community for libraries used in this project:
- Telethon (Telegram client)
- websockets (async WebSocket implementation)
- aiohttp (async HTTP client)
Final Note: This project serves as a cautionary tale and technical demonstration. The sophisticated architecture showcases advanced programming techniques, but the economic and ethical conclusions are clear: pump-and-dump schemes harm investors and the broader cryptocurrency ecosystem. The best protection is education and awareness.