z1017371914 / Front-Running-Bot

Front Running / Sniper / Sandwich Bot for Pancake Swap

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Front Running / Sniper / Sandwich Bot for Sandwiching Transactions

🐰 Pancake Swap - Binance Smart Chain 🐰

Captura de pantalla 2023-03-09 123256

This is a front running bot designed to sandwich transactions with high value on the Pancake Swap DEX on the Binance Smart Chain. The bot monitors the mempool for high-value transactions and then attempts to get ahead of them by submitting its own transaction with a slightly higher gas price. Once the bot's transaction is confirmed, it then submits a second transaction with a lower gas price to complete the sandwich.

Getting Started

image

Prerequisites

To use this bot, you'll need:

  • An BSC Wss Node, such as QuickNode, that supports Binance Smart Chain. I used GetBlock.io (As you get 40K free requests per day)
  • A wallet with enough funds to cover the gas fees for the transactions
  • Knowledge of JavaScript and Node.js

Installation

To install the bot, simply clone the repository and install the dependencies:

Copy code

git clone https://github.com/CristianRicharte6/Front-Running-Bot
cd Front-Running-Bot
npm install

Configuration

Before running the bot, you'll need to configure it with your BSC node and wallet information. Copy the example.env file and rename it to .env. Then fill in the following fields:

PORT=<Port>
WSS=<wss Node Url>
PRIVATE_KEY=<the private key of your wallet>

You can also update the next fields in the bot.js:

line41: const budget = "How much you would like to buy when the bot executes the transaction"
line198: if (value > "It will filter transactions with higer value than this number") {}

Running the Bot

To run the bot, simply run the following command:

nodemon bot.js

The bot will start monitoring the mempool for high-value transactions on Pancake Swap router V2 and attempt to sandwich them.

Contributing

If you'd like to contribute to this project, please fork the repository and submit a pull request. Before submitting a pull request, please make sure that your code adheres to the project's style guidelines and passes all tests.

License

This project is licensed under the MIT License.

About

Front Running / Sniper / Sandwich Bot for Pancake Swap


Languages

Language:JavaScript 100.0%