Skip to content

Rugs.fun Rust Bot is a high-speed, automated trading bot built in Rust for the Rugs.fun meme casino on Solana.

Notifications You must be signed in to change notification settings

L9T-Development/rugs.fun-trading-bot-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Rugs.fun Trading Rust Bot

A Solana-based automated trading bot for Rugs.fun β€” detects new game rounds in real-time via WebSocket, and automatically buys and sells based on configurable parameters.


πŸ“¬ Contact

Feel free to reach out for collaborations, feature requests, or questions: Telegram | Twitter


πŸ“Œ Features

  • πŸ” Detects new Rugs.fun game rounds live via on-chain WebSocket updates.
  • ⚑ Automatically places buy orders (bets) when a new round starts.
  • πŸ“€ Attempts to sell after a configurable delay or multiplier threshold.
  • πŸ“ Easy-to-edit config file (config.toml)
  • πŸ¦€ Fully written in Rust using Solana SDK.

πŸ“‚ Project Structure

rugs_bot/ β”œβ”€β”€ Cargo.toml β”œβ”€β”€ README.md β”œβ”€β”€ config.toml └── src/ β”œβ”€β”€ main.rs β”œβ”€β”€ config.rs β”œβ”€β”€ buy_sell.rs └── listener.rs


πŸ› οΈ Installation & Setup

1️⃣ Install Dependencies

Ensure you have Rust and Solana CLI installed:

rustup install stable
solana --version

cargo build

2️⃣ Configure the Bot

Create a config.toml in the project root:

rpc_url = "https://api.mainnet-beta.solana.com"
keypair_path = "/home/youruser/.config/solana/id.json"
program_id = "REPLACE_WITH_RUGS_FUN_PROGRAM_ID"
market_account = "REPLACE_WITH_MARKET_ACCOUNT"
buy_amount_lamports = 10000000  # 0.01 SOL
target_multiplier = 1.2

3️⃣ Run the Bot

cargo run --release

Watch logs for transaction signatures and status updates.

πŸ“ˆ How It Works

  • Subscribes to the Rugs.fun market account via WebSocket.

  • Detects new round triggers by monitoring account data changes.

  • Automatically buys in at the start of each round.

  • Waits a set duration or multiplier.

  • Attempts to sell before the rug happens.

  • Logs all actions with transaction hashes.

βš™οΈ Notes

  • Replace placeholder Program ID and Market Account with actual Rugs.fun program addresses.

  • Default buy/sell instructions currently use system_instruction::transfer for demonstration β€” update these to actual Rugs.fun CPI instructions.

  • Test on Solana devnet before using on mainnet with real SOL.

  • Add error handling, retries, and multipliers logic as needed for production use.

πŸ™ Credits

Developed by 0xTan1319
Inspired by the degen Solana meme casino at Rugs.fun

About

Rugs.fun Rust Bot is a high-speed, automated trading bot built in Rust for the Rugs.fun meme casino on Solana.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages