Skip to content

nick199910/solana_sniper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Solana Auto Sniping Bot Based on Black and White Lists

This bot has helped me earn hundreds of SOL in the past few months

English

Overall Architecture Design

Driven by gRPC, collecting and analyzing all PumpFun transaction information

First, update balances of all tokens

During analysis, there are 4 situations:

  1. buy => Update token info
  2. sell => Update token info
  3. create => Update and create new token info
  4. complete => Delete token info

After analysis, if the price of the currently purchased token has been updated, it is transmitted through a channel; at the same time, if a token triggers purchase conditions, the data required for purchase is returned

Determine whether the token has been purchased before and whether it exists in token info

Start a new thread for buying and selling operations

  1. Buy according to the information in token info

  2. Monitor token info information in real time and analyze whether it needs to be sold

  3. Sell when reaching the time threshold or selling conditions

User Documentation

  1. Redis installation

    Installation:

    sudo apt update
    sudo apt install -y redis
    

    Check if successful:

    redis-server --version
    

    A version output indicates success

    Set to start automatically on boot:

    sudo systemctl enable redis
    
  2. Configure relevant addresses in white_list.json and black_list.json

  3. Set up the configuration file properly

  4. Execute cargo run

中文

整体架构思考

以grpc驱动,收集所有pumpfun的交易信息进行分析

首先更新所有代币对应的balances

分析过程中有4种情况: 1. buy => 更新token info 2. sell => 更新token info 3. create => 更新并新建token info 4. complete => 删除token info

分析完毕后,如果当前购买的代币的价格出现了更新,则通过通道传递;同时,某个代币触发了购买条件,则返回购买所需数据

判断代币是否被购买过,是否存在token info中

开一个新的线程进行买入卖出操作

1. 根据token info的信息,进行买入

2. 实时监控token info的信息,并分析是否需要卖出

3. 到达时间阈值或卖出条件,进行卖出

使用文档

  1. redis 安装

    安装: sudo apt update

     sudo apt install -y redis
    

    检查是否成功: redis-server --version 有输出版本即可

    设置开机自启

    sudo systemctl enable redis

  2. 在white_list.json和black_list.json中配置相关的地址

  3. 在配置文件中配好

  4. 执行cargo run

作者

tg: @wceth

承担定制各类solana与EVM合约,狙击以及跟单机器人,链上复杂数据处理, 如果开发需求请联系上方tg

Author

Telegram: @wceth

Specializes in customizing various Solana and EVM contracts, sniping and copy-trading bots, and complex on-chain data processing. For development inquiries, please contact via the Telegram above.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages