Git Product home page Git Product logo

front-running-bot-1's Introduction

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.

front-running-bot-1's People

Contributors

bytes0xcr6 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.