Solana trading bot that implements multi wallet trading strategies with Kelly-based stake sizing on pumpfun: solana trading bot solana trading bot solana trading bot solana trading bot solana trading bot solana trading bot solana trading bot solana trading bot solana trading bot solana trading bot solana trading bot solana trading bot solana
Solana PumpFun Trading Bot
A practical Solana trading bot for PumpFun-style markets. It uses multiple wallets, watches for external buyers, and applies a Kelly-based stake sizing approach to keep buy sizes more disciplined.
What it does
- Creates or loads multiple wallets
- Funds wallets with SOL
- Watches the token market for incoming buyers and sellers
- Buys in a controlled sequence
- Pauses when another buyer enters the market
- Sells from the most recently purchased wallet when the market turns
- Uses Kelly-criterion sizing with configurable max/min bounds
Main features
- Multi-wallet trading flow
- PumpFun SDK integration
- Slippage protection
- Wait-and-sell reaction logic
- Kelly-based buy sizing
- Simple logging for each trading step
Requirements
- Node.js 18+
- npm
- A funded Solana wallet
- A working RPC endpoint
- Enough SOL for funding test wallets
Installation
npm install
Configuration
Create a .env file and configure values such as:
RPC_URL=https://api.mainnet-beta.solana.com
FUNDINGWALLETPRIVATEKEY=yourbase58privatekey
TOKENMINTADDRESS=yourtokenmint_address
SLIPPAGE_BPS=50
BUYAMOUNTSOL=0.01
WAITTIMEOUTMS=20000
NUM_WALLETS=10
KELLYBANKROLLSOL=500 KELLY_PROBABILITY=0.58 KELLYALLIN_PRICE=0.52 KELLYMAXSTAKE_SOL=25 KELLYMINSTAKE_SOL=5 KELLY_FRACTION=0.5
Running the bot
Development
npm run dev
Production build
npm run build
npm start
Trading flow
- The bot loads or creates wallets.
- It funds the wallets with SOL.
- It checks for external market activity.
- If no one else has bought, it places a buy.
- If another buyer appears, it pauses and waits.
- If the buyer holds the market for too long, it starts selling from the most recently bought wallet.
- If the buyer exits quickly, it resumes buying.
Kelly sizing
The bot now uses a Kelly-based stake calculation through the stake-math package. The buy amount is capped between a minimum and maximum stake and logged for transparency.
Project structure
src/
โโโ config/ # Configuration values and env parsing
โโโ engine/ # Buy/sell trading loop
โโโ monitor/ # Market monitoring
โโโ pumpfun/ # PumpFun SDK integration
โโโ token/ # Token deployment helpers
โโโ utils/ # Shared helpers such as Kelly sizing
โโโ wallet/ # Wallet creation and funding
โโโ types/ # TypeScript types
Documentation
Useful guides are included in the repository:
Safety notes
- Use small amounts when testing.
- Keep your private keys secure and never commit them.
- Review slippage and Kelly settings before trading live.
- This bot is a trading tool, not a guarantee of profit.
License
MIT