This repository contains the codebase for the Pump-Fun Sniper Bot developed by @licketyspliket and me. Although this project is archived and not intended for further iteration, this README provides a comprehensive overview to help anyone who may want to understand or run the bot.
The Pump-Fun Sniper Bot is designed to interact with the Solana blockchain, purchasing newly minted coins and managing them, based on our replication of orcACR...'s strategy. I detail the strategy more in my first blog post on this project, which can be found here.
PRIVATE_KEY
: The bot pulls the bot wallet's private key from this environment variable.PROXY_URL
: Set this to an https proxy if you want to proxy the main RPC client
The main configuration values for the bot are located in main.go
and can be edited as needed.
- Public RPCs: A slice of public RPC URLs that can be used to help transmit transactions can be modified in the
sendTxRPCs
string slice variable. - RPC and WebSocket URLs: Set
rpcURL
andwsURL
to their proper values for a high-performance Solana RPC (Note: free/cheap RPC services will likely be ratelimited immediately due to the number of requests needed to vet coins and their creators). - MySQL Database: Ensure you have an instantiated MySQL database with information on coins created. Modify the credentials below as needed:
sql.Open("mysql", "root:XXXXXX!@/CoinTrades")
The bot is instantiated with the following parameters:
// Purchase coins with 0.05 Solana, priority fee of 200000 microlamports
bot, err := NewBot(rpcURL, wsURL, privateKey, db, 0.05, 200000)
if err != nil {
log.Fatal(err)
}
To remove Jito integration, comment out the following block:
if err := bot.beginJito(); err != nil {
log.Fatal("Error Starting Jito", err)
}
-
Clone the Repository:
git clone https://github.com/1fge/pump-fun-sniper-bot.git cd pump-fun-sniper-bot
-
Install Dependencies: Ensure you have Go installed. Then, run:
go mod tidy
-
Set Environment Variables: Ensure
PRIVATE_KEY
is set in your environment. -
Edit Configuration: Modify the RPC URLs, WebSocket URLs, and MySQL database credentials in
main.go
as needed. -
Run the Bot:
go run .
- Solana RPC and WebSocket: Ensure you are using high-performance RPC and WebSocket URLs for optimal performance.
- MySQL Database: Make sure your MySQL database is properly set up and accessible with the provided credentials.
- Jito Integration: Optional integration for improved transaction handling.
A special thank you to Gagliardetto for creating the open-source Solana Go packages that were instrumental in developing this bot. The code we used and built on from him can be found in the pkg/jito-go
directory, as well as the output from his anchor-go
package based on the Pump.fun IDL, which is found in the pump
directory.
Also, a huge thank you to weeaa for their work on Jito Go SDK, which we used to handle all interactions with Jito.
Read more about the development of this project on my blog.