Skip to content

Repository files navigation

ICP Trading Suite

A monorepo of Rust tools for the Internet Computer's DeFi ecosystem — snipers, arbitrage scanners, liquidity monitors, and trading automation.

License: MIT Language: Rust Platform: ICP CI

GitHub stars GitHub forks GitHub issues Last commit


Topics

rust internet-computer defi trading-bot arbitrage telegram-bot icp blockchain cryptocurrency dex


Overview

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.

Tools

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

Architecture

┌─────────────────────────────────────────────────────────────────┐
│                     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            │
└─────────────────────────────────────────────────────────────────┘

Prerequisites

  • 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)

Quick Start

# 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 --check

Each tool can also be built and run on its own:

cd sniper-kongswap
TELEGRAM_BOT_TOKEN=... cargo run --release

Configuration

Tools 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.

Tech Stack

  • 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

Testing

Two crates ship with integration tests under tests/:

  • icpswap-liquidity-alert/tests/decode_proof.rs — Candid decode round-trips
  • sniper-kongswap/tests/sdk_proof.rs — IC agent / SDK behavior

Run the full suite with cargo test --workspace.

Legacy Tools

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.

Security

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.

Contributing

Contributions are welcome — please read CONTRIBUTING.md and open an issue first to discuss what you'd like to change.

License

MIT — see LICENSE.

About

Rust monorepo of ICP DeFi tools: snipers, arbitrage scanners, liquidity monitors, and trading automation for ICPSwap, KongSwap, ICPEx, FomoWell, and BOB

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages