Updated December 12th 2024
My name is Nick, and I am a blockchain developer specializing in Solidity.
I’ve spent hours pouring over the smart contract and directories for the infamous Ethereum sandwich bot (JaredFromSubway.eth) which utilizes slippage on the blockchain to generate a consistent profit after it is deployed.
While some of the actual contract is public on the blockchain, most of it is behind private .sol files within the smart contract itself. It took quite a bit of time to deconstruct the code to mimic the slippage capabilities of the original bot.
Today I’ll be breaking down the code to deploy a similar Ethereum trading bot I recently built in Solidity which mimics the trader algorithm of the original bot to generate small, consistent profits.
Once deployed, our slippage bot will allow you to automatically trade a token from the Ethereum blockchain without needing to manually transact through traditional methods. Everything is handled by the smart contract itself.
It takes advantage of decentralized platforms like Uniswap or Pancake swap, to sandwich transactions for arbitrage.
Theses exchanges handle thousands of transaction requests to swap tokens and our bot is designed to explore the mempool for transactions that are pending within a block, allowing us to inject the transaction with a higher gas fee. The mempool is a cryptocurrency node’s mechanism for storing information on unconfirmed transactions.
This will allow us to process our order first, then process a sell order in the same block right after.
Essentially, the pending transaction on the swap network gets sandwiched between ours, and the sell transaction, and we make a small fee per transaction.
It may only be $1-10 per transaction, but when the bot is automatically processing multiple transactions per hour it can really add up.
I am sharing this code because each bot can only do 1 transaction every few block seconds, and there is hundreds of thousands of transactions every minute on the Ethereum blockchain.
After the transaction is confirmed, your new slippage bot is live on the blockchain.
Deposit funds (we recommend at least 0.25 ETH to prevent missing transactions) to your exact contract / bot address.
After your transaction is confirmed, start the bot by clicking the ‘start’ button.
You are off to the races!
You can withdraw profit anytime by clicking “withdraw”.
I’d typically recommend letting the bot run for 24 – 48 hours before withdrawing ETH.
I am also hosting the code here on Pastebin in if you’d like to save just the code for future use, but the full code can be copied and pasted below.