Smart Mining is a modular system designed to automatically optimize cryptocurrency mining profitability by dynamically selecting the most profitable coins, pools, and algorithms in real time.
The project is based on a distributed architecture, built to be scalable, extensible, and performance‑oriented.
- 📊 Collect reliable and up‑to‑date market and mining data
- 🧮 Calculate real mining profitability
- 🔄 Perform dynamic switching during mining
- 💰 Maximize USD earnings
- ⚙️ Enable customizable mining strategies through profiles
┌──────────────────┐
│ External APIs │
│ - Binance │
│ - CoinGecko │
│ - Hashrate.no │
│ - Minerstat │
│ - Nanopool │
│ - 2Miners │
│ - WhatToMine │
└────────┬─────────┘
│ (1) Fetch data
↓
┌──────────────────┐
│ AGGREGATOR │
│ - Collect │
│ - Normalize │
│ - Calculate │
│ profitability │
└────────┬─────────┘
│ (2) Insert / Update
↓
┌──────────────────┐
│ PostgreSQL │
│ - Realtime data │
│ - History data │
└────────┬─────────┘
│ (3) SQL Queries
↓
┌──────────────────┐
│ API │
│ - REST │
│ - Decision data │
└────────┬─────────┘
│ (4) Best strategy
↓
┌──────────────────┐
│ PROXY │
│ - Stratum │
│ - Smart switch │
└────────┬─────────┘
│ (5) Redirect mining
↓
┌──────────────────┐
│ External Pools │
│ Pool A / B / C │
└──────────────────┘
📌 RoleCollect, normalize, and store all data required for Smart Mining.
🛠️ Technology
- Python
🔌 External APIs Used:
- Binance
- CoinGecko
- Hashrate.no
- Minerstat
- Nanopool
- 2Miners
- WhatToMine
- Data collection:
- Coin prices
- Network difficulty
- Hashrates
- Mining pools
- Hardware performance
- Profitability calculation
- Real‑time data insertion
- Historical data storage
- Automatic
- Runs every X seconds
- Ensures data is always up to date
📌 RoleExpose data and act as the decision layer for the proxy.
- Node.js
- REST endpoints
- Access to real‑time and historical data
- Additional calculations
- Optimized JSON responses
- Single interface between:
- PostgreSQL
- Proxy
📌 RoleImplement real‑time Smart Mining logic.
- C++ 20
- Boost 1.86
- TCP server
- Stratum protocol implementation
- Miner (mining software) connections
- Support for:
- Multiple pools
- Multiple coins
- Multiple algorithms
- Dynamic switching based on profitability
Continuously optimize mining yield and USD earnings.
Fetches external data
Updates real‑time tables
Archives historical data
Exposes data via REST
Acts as the decision engine
Queries the API
Manages connected miners
Applies Smart Mining strategies
A profile represents a user mining strategy.
- Each miner selects a profile upon connection
- The proxy adapts its behavior based on this profile
- 💰 Mine the coin generating the highest USD
- ⚡ Follow the most profitable hashrate in USD
- Multiple profiles available
- Fully customizable
- Easily extensible
| Table | Description |
|---|---|
| coins | Coin information at time T |
| coin_history | Historical coin data |
| pools | Pool information at time T |
| pool_history | Historical pool data |
| hardware | Hardware information (GPU / CPU) |
| hardware_mining | Mining performance per hardware |
- Realtime data
- coins
- pools
- Historical data
- coin_history
- pool_history
- Hardware data
- hardware: hardware specifications
- hardware_mining: hashrate, power usage, algorithms
docker build -t smart_mining_database .
docker run -d \
-p 5432:5432 \
--name smart_mining_database \
--network smart_mining_network \
smart_mining_databasedocker build -t smart_mining_api .
docker run -d \
-p 3000:3000 \
--name smart_mining_api \
--network smart_mining_network \
smart_mining_apidocker build -t smart_mining_aggregator .
docker run -d \
--name smart_mining_aggregator \
--network smart_mining_network \
smart_mining_aggregatorThe Aggregator collects and stores historical data. The API exposes the data and makes decisions. The Proxy applies Smart Mining strategies based on user profiles, to automatically optimize mining profitability.