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.
Feel free to reach out for collaborations, feature requests, or questions: Telegram | Twitter
- π 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.
rugs_bot/ βββ Cargo.toml βββ README.md βββ config.toml βββ src/ βββ main.rs βββ config.rs βββ buy_sell.rs βββ listener.rs
Ensure you have Rust and Solana CLI installed:
rustup install stable
solana --version
cargo build
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
cargo run --release
Watch logs for transaction signatures and status updates.
-
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.
-
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.
Developed by 0xTan1319
Inspired by the degen Solana meme casino at Rugs.fun