This bot require you to run the GETH client + use ethers framework.

Mad Liquidity Sniper

This bot require you to run the GETH client + use ethers framework. All addresses and private keys contained have been changed for the sake of this public repo.

This is heavily based on https://github.com/Supercycled/cake_sniper, so major thanks to him.

Use at you own risk.

Global Workflow

This is a frontrunning bot primarily aimed at liquidity sniping on AMM like PancakeSwap. Liquidity sniping is the most profitable way I found to use it. But you can add pretty much any features involving frontrunning (liquidation, sandwich attacks etc..).

Being able to frontrun implies building on top of GETH client and having access to the mempool. My BSC node was running on AWS, hence the cmd/mad-liquidity-config folder that I needed to send back and forth to the server with sniping config.

The bot is divided in 2 sections:

  1. Configurations: An initial phase (previous to the snipe) where we configure the environment:
  • A trigger contract which is setted up with the configuration of the token you want to snipe (token address, route of swap, amount, wallet address that receives, etc).
  • A swarm of accounts/wallets that will clogg the mempool once the liquidity is added, executing the snipe. This swarm of accounts is useful because we will be racing against other bots trying to frontrun the liquidity addition. So the more accounts trying the better the odds. Ideally one of all the accounts will succesfully snipe while the others will fail/revert (without doing nothing, except wasting gas).
  1. Sniping: An observation phase where we listen to txs in the mempool waiting for the liquidity addition to appear. Once we spot it we clogg the mempool with our own txs executing the trigger that will perform the snipe (one tx per account in the swarm). All txs have the same gas as the liquidity addition tx, so the mempool sets them (ideally) at the same priority as the liq. addition, hence frontrunning others.

Setup

  1. Make sure to first deploy all contracts using the truffle migrations (create a .env file with BINANCE_MAINNET_WALLET_PRIVATE_KEY or BINANCE_MAINNET_WALLET_MNEMONIC). Running them should configure:
  • The trigger custom router address with your CustomPCSRouter
  • The trigger admin with the deployer wallet (this is important)
  1. Create a config/local.json file following the template provided inside the directory (`config/template.local.json). This will be used by our scripts in the configuration phase.

  2. If you don't have a swarm yet, create one running npm run create-swarm. This should create a config/bee_book.json similar to the template one (config/template.bee_book.json) to be used by the sniper on each snipe

  3. [Optional] Preview the order you will create and snipe with npm run order-preview, to avoid undesired results.

  4. Configure the trigger contract with the provided order running npm run configure-trigger

  5. [Optional] If you want to recover the spread bnb in the swarm or rollback the trigger configuration (recovering the bnb supplied), run npm run swarm-refund / npm run withdraw-trigger. Else leave it there for future snipes.

  6. Configure the config/configurations.json file, which will be used at the 'sniping' phase. It's important to have a read and write node where you will stream de mempool txs (read) and write your own ones once the addLiquidity one is found. So bear in mind you will need to either set up your own node or get one from somewhere.

In future snipes, you can avoid most of the steps and just run step 2 & 5 & 7, simply configuring the trigger for a new snipe.

Usage

If you have already configured the trigger contract, simply leave the client running with go run ./.... Once the liquidity is added it should snipe it transparently.

And that's it! the bot should be working without hassles! The bot is currently defined to work with BSC and PancakeSwap. But you can adapt is to whatever EVM blockchain with its equivalent copy of Uniswap V2. To do this, just change the variables in the config directory + contracts.

Donations and setup help

If you found the bot useful and you want to share some of those juicy profits with me, I accept donations through BEP20 (BSC) at 0xd061121C0c5dA61516e38B2A5E4d40cB263e8D10 in any type of token (hopefully one with liquidity hehe)

You are interested in using this tool but you dont have the needed experience to set everything up? Contact me on telegram, I can setup everything for a fee that depends on your experience with command line tools.

My telegram: https://t.me/cryptoismad

Cheers and happy sniping!

Similar Resources

Balabola-go-client - GO client for Yandex balabola service

Balabola GO Client GO client for Yandex balabola service Yandex warning The neur

Jan 29, 2022

Client-server-golang-sqs - Client Server with SQS and golang

Client Server with SQS and golang Multi-threaded client-server demo with Go What

Feb 14, 2022

🤖🚀📦 A Discord Bot for accessing the cdnjs platform

🤖🚀📦 A Discord Bot for accessing the cdnjs platform

A bridge between https://cdnjs.com/api and Discord Big shoutout to Br1ght0ne for helping me with writing helpers.go/SplitIn

Aug 17, 2022

🤖 Chegg answers requested and sent by the Discord BOT to the targeted user.

🤖 Chegg answers requested and sent by the Discord BOT to the targeted user.

"I believe that open-source resources are a must for everyone around. Especially in the field of education. As Chegg costs some money monthly, unfortunately, not all of us are capable of to charge ourselves that cost, which ends up blocking all those valuable resources to us. That is why, I have developed this bot, which unblurs the blurred question answers and sends them to you. I will develop it to a next level in the upcoming days, whereas, it will send the images/text, answers in short, directly through the Discord server you are in, or just DM/PM."

Aug 20, 2021

Golang bindings for the Telegram Bot API

Golang bindings for the Telegram Bot API

Jan 2, 2023

A bot that tweets posts with the Go tag on Qiita

A bot that tweets posts with the Go tag on Qiita

GoTwitterBot A bot that tweets posts with the Go tag on Qiita go mod init main/main go get github.com/joho/godotenv go get github.com/ChimeraCoder/a

Oct 4, 2021

Chat bot for twitch

Microbot Chat bot for twitch. Run You need to provide config and cred files.

Oct 23, 2021

The telegram bot for reading and synchronizing notes in markdown format

notesbot The telegram bot for reading and synchronizing notes in markdown format.

Mar 13, 2022

Mrrobot - A simple greetings bot for Slack that uses events api and hosted on AWS Lambda

Mr. Robot a greeter bot for your slack community build_docker

Aug 21, 2022
Client-go - Clusterpedia-client supports the use of native client-go mode to call the clusterpedia API

clusterpedia-client supports the use of native client-go mode to call the cluste

Dec 5, 2022
A compute service that lets you run code without provisioning or managing servers

AWS Lambda for Go Lambda is a compute service that lets you run code without provisioning or managing servers. Lambda runs your code on a high-availab

Oct 13, 2021
A Go client implementing a client-side distributed consumer group client for Amazon Kinesis.
A Go client implementing a client-side distributed consumer group client for Amazon Kinesis.

Kinesumer is a Go client implementing a client-side distributed consumer group client for Amazon Kinesis.

Jan 5, 2023
Elastos.ELA.Rosetta.API - How to write a Rosetta server and use either the Client package or Fetcher package to communicate

Examples This folder demonstrates how to write a Rosetta server and how to use e

Jan 17, 2022
Run proprietary modpack in built in Darwin/macOS sandbox-exec to prevent it from doing malicious things.
Run proprietary modpack in built in Darwin/macOS sandbox-exec to prevent it from doing malicious things.

sandbox-exec lunarclient Run LunarClient in built in Darwin/macOS sandbox-exec to prevent lunar from taking screenshots of your desktop. LunarClient l

Jul 12, 2022
Run vscode task in command line

vstask Run vscode task in command line install go install "github.com/ttttmr/vstask" usage NAME: vstask - Run vscode task in command line USAGE:

Jul 1, 2022
Client for the cloud-iso-client

cloud-iso-client Client for the cloud-iso-client. Register an API token Before using this client library, you need to register an API token under your

Dec 6, 2021
Go-http-client: An enhanced http client for Golang
Go-http-client: An enhanced http client for Golang

go-http-client An enhanced http client for Golang Documentation on go.dev ?? This package provides you a http client package for your http requests. Y

Jan 7, 2023
Nutanix-client-go - Go client for the Nutanix Prism V3 API

nutanix-client-go This repository contains portions of the Nutanix API client code in nutanix/terraform-provider-nutanix. It has been extracted to red

Jan 6, 2022
Aoe4-client - Client library for aoe4 leaderboards etc

AOE4 Client Overview This is a go client used to query AOE4 data from either the

Jan 18, 2022