Hi everyone,
I’m a financial mathematics graduate student and have recently developed a Pump.fun sniper bot, which you can check out on https://github.com/michaelchannn/pumpfun_sniper . My goal with this bot is to buy tokens as quickly as possible immediately after a coin launch and then sell them once they reach a predefined profit or loss threshold.
To receive mint instructions, I chose to use the connection.onLogs method, achieving an average latency of about 500-600ms from mint time. While I initially considered using gRPC for faster instructions, the costs were prohibitive. For executing trades, I attempted using the Jupiter Swap API but encountered significant rate limit issues and high latency. To overcome this, I discovered the IDL for Pump.fun and now trade directly with the Pump.fun program.
My buying logic sets the maximum SOL cost to 0.0001 SOL, allowing me to purchase approximately 3,400 tokens at a price below 3 × 10⁻⁸ SOL per token. This threshold is based on the observation that most developers execute buys on the first block at around 2.88 × 10⁻⁸ SOL per token. If the token price exceeds 3 × 10⁻⁸ SOL, the transaction fails due to slippage, which is the intended behavior. However, in practice, most of my buy transactions don’t land and don’t even appear on Solscan. I’m considering whether to spam transactions like other bots, but I’m concerned about the associated network fees.
Another challenge I’m facing is optimizing the sell logic. Currently, the bot buys tokens and immediately sells all of them, which isn’t effective. I’m struggling to implement a reliable method to track token prices quickly for setting take-profit and stop-loss (TP/SL) points. Additionally, the total latency from mint time to sending the buy transaction averages around 1500ms, and even when transactions are finalized, they’re typically 4–30 blocks behind.
I’m looking for advice on how to ensure buy transactions land successfully without spamming and strategies to further reduce latency. Additionally, any suggestions on accurately and swiftly tracking token prices for effective sell orders would be greatly appreciated. General tips or best practices to enhance the overall performance and reliability of the bot are also welcome!
On a different note, I’m wondering if this project is resume-worthy. As a student seeking job opportunities in the US, Canada and Hong Kong, I’m passionate about crypto and curious if this kind of project is valued by both crypto and non-crypto firms.
Thank you all for your time and any insights you can provide!
submitted by /u/MaximizingBrainPower
[link] [comments]
Join The SmashBotAI Telegram Community Now! Get trade alerts, smashable token trade ideas, and more!
https://t.me/smashbotcommunity
Start Trading Now:
SmashBotAI Telegram Bot