A monorepo of Rust tools for the Internet Computer's DeFi ecosystem — snipers, arbitrage scanners, liquidity monitors, and trading automation.
rust internet-computer defi trading-bot arbitrage telegram-bot icp blockchain cryptocurrency dex
A collection of production-oriented Rust tools for trading and monitoring activity on the
Internet Computer (ICP) blockchain. Each tool is an independent crate targeting a specific
DEX or workflow — ICPSwap, KongSwap, ICPEx, FomoWell, and the BOB miner network. Tools talk
to canisters directly via ic-agent and ship as standalone CLIs
or Telegram bots.
The workspace is organized as a Cargo workspace, so the whole suite builds, lints, and tests from the repository root.
| Tool | Type | Description |
|---|---|---|
| icpswap-liquidity-alert | Monitoring | Telegram bot that watches ICPSwap for newly created ICP pools and alerts with token metadata |
| icpswap-pool-arb | Arbitrage | Mainnet-safe triangular arbitrage scanner & staged executor for ICPSwap pools |
| sniper-fomowell | Sniper | Telegram bot watching FomoStrat for new tokens, attempts early buys via ICPSwap |
| sniper-icpex | Sniper | Monitors ICPEx for new pair creation events with detailed metadata alerts |
| sniper-icpswap | Sniper | Early ICPSwap pool sniper; detects new pools and attempts early entry |
| sniper-kongswap | Sniper | Interactive CLI for sniping new KongSwap pools with real-time monitoring |
| telegram-bob-pooler | Mining | Telegram bot for managing BOB miner nodes — stats, overclock, topup, hash commands |
┌─────────────────────────────────────────────────────────────────┐
│ ICP Trading Suite │
├─────────────────────────────────────────────────────────────────┤
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────────┐ │
│ │ Snipers │ │ Arbitrage │ │ Monitoring │ │
│ │ │ │ │ │ │ │
│ │ • FomoWell │ │ • Pool Arb │ │ • Liquidity Alert│ │
│ │ • ICPEx │ │ (triangular│ │ • BOB Pooler │ │
│ │ • ICPSwap │ │ scanner) │ │ │ │
│ │ • KongSwap │ │ │ │ │ │
│ └──────┬───────┘ └──────┬───────┘ └────────┬─────────┘ │
│ │ │ │ │
│ └──────────────────┴────────────────────┘ │
│ │ │
│ ic-agent / candid / tokio │
├─────────────────────────────────────────────────────────────────┤
│ Internet Computer (ICP) │
│ ICPSwap · KongSwap · ICPEx · FomoStrat · BOB │
└─────────────────────────────────────────────────────────────────┘
- Rust (stable, 1.75+) — install via rustup
- dfx — Internet Computer SDK (install guide)
- A Telegram bot token — create one via @BotFather (for the bot tools)
- An ICP ledger identity —
dfx identity new <name>(for tools that submit transactions)
# Clone
git clone https://github.com/cordova7/icp-internet-computer-trading-suite.git
cd icp-internet-computer-trading-suite
# Build the entire workspace
cargo build --release
# Run tests across all crates
cargo test
# Lint everything
cargo clippy --workspace -- -D warnings
cargo fmt --checkEach tool can also be built and run on its own:
cd sniper-kongswap
TELEGRAM_BOT_TOKEN=... cargo run --releaseTools read secrets from environment variables (never from the repo):
| Variable | Used by | Purpose |
|---|---|---|
TELEGRAM_BOT_TOKEN |
all bots | Bot API token from @BotFather |
ICP_NETWORK |
transactional tools | ic (mainnet) or local |
IDENTITY_NAME |
transactional tools | dfx identity used to sign |
See each tool's .env.example for the full list.
- Rust — memory-safe, high-performance systems language
- ic-agent — official Rust SDK for Internet Computer canister calls
- candid — IDL (de)serialization for canister interfaces
- teloxide — ergonomic Telegram bot framework
- tokio — async runtime for concurrent I/O
- reqwest — HTTP client for REST endpoints
- serde — serialization framework
Two crates ship with integration tests under tests/:
icpswap-liquidity-alert/tests/decode_proof.rs— Candid decode round-tripssniper-kongswap/tests/sdk_proof.rs— IC agent / SDK behavior
Run the full suite with cargo test --workspace.
The legacy/ directory preserves earlier or superseded implementations for
reference. These are research / educational only and not maintained:
| Tool | Status | Notes |
|---|---|---|
sandwich-backrunner |
Archived | MEV backrunning prototype |
sandwich-frontrunner |
Archived | MEV frontrunning prototype |
Note on MEV code: The sandwich/frontrun prototypes are kept for transparency about the repo's history. They are not deployed and are intended solely for studying how transaction-ordering mechanics work on ICP. The active suite focuses on monitoring, discovery, and arbitrage scanning.
Warning — These tools interact with real canisters and real funds on mainnet.
- Test on a local replica or testnet first.
- Never use funds you can't afford to lose.
- Never commit secrets. All tokens/keys are read from environment variables.
- Review every transaction a tool submits before trusting it.
See SECURITY for responsible disclosure.
Contributions are welcome — please read CONTRIBUTING.md and open an issue first to discuss what you'd like to change.
MIT — see LICENSE.