Hey guys, David here. I have decided to test the potential of chat EBT and see if it could generate anything interesting or useful in decentralized finance. I asked it to generate a trading bot that uses D5 liquidity pairs to take advantage of certain arbitrage opportunities for earning passive income. What it generated was insane! The bot allows you to automatically trade given tokens from the Ethereum blockchain without needing to manually transact through traditional methods. It takes advantage of decentralized finance platforms such as Uniswap to sandwich transactions for arbitrage.
Basically, it sniffs mempools for transactions that are pending within a block, allowing us to inject our transaction with a higher gas fee than the transaction which is trying to be entered. This will allow us to process our transaction first, then process a sell order right after in the same block. Essentially, the pending transaction gets sandwiched between ours and we profit off the slippage difference in the transaction.
If this sounds complicated, don’t worry, it’s really not. I’ve been using this bot to earn passive income for weeks, and you don’t need any coding experience whatsoever since the script was generated entirely by chat GBT.
Let’s get started! Make sure you have the MetaMask browser extension installed and you’re connected to the Ethereum mainnet. Now, head over to Remix. Remix is a web3 application that allows us to develop, compile, deploy, and launch smart contracts coded in the Solidity language. I’ll put a link to Remix in the description below.
For your first time on Remix, it may ask you to agree to their terms. I’ve already done it. Move over to the sidebar on the left and create a new contract under the contract folder. Name it bot.sol. In the description, I’ve included a link to the bot’s source code. Copy this code and paste it into the bot.sol file you’ve just created. This is our bot.
After pasting the code, check lines 55 and 56. These should be the addresses for RAPT and Ether tokens. Feel free to check them on Etherscan to make sure they’re correct.
Now, go back to Remix. Now that our bot file is ready, let’s compile it. Make sure the compiler is set to version 0.6.6 of Solidity, and the language is set to Solidity with the EVM version set to default. Click on the Compile bot.sol button and wait for the bot to compile.
Now, we’re going to deploy the bot from our wallet. Head over to Deploy and Run Transactions on Remix. Here, select Injected Provider as the environment. MetaMask will pop up, just connect it to Remix. Now, deploy the contract on the blockchain. You’ll need to pay gas fees, which are a commission on the Ethereum network for smart contract deployment.
Once the deployment is confirmed, you can see the four actions for our smart contract: start, sniff mempools, withdraw, and transfer funds. The start action enables the bot to start sniffing the mempools. The withdraw action stops the bot and transfers the funds back into your wallet.
Now, let’s fund the contract with some Ethereum to snipe liquidity pools. Copy the smart contract address and head over to MetaMask. Make sure you have the right address in there. You can fund the contract with whatever amount of Ethereum you want, but the more you put in, the larger the transactions you’ll be able to sandwich and the more profit you’ll be able to accumulate over time.
Once you’ve funded the contract, the bot will continue to run until you click the withdraw button. When you click withdraw, the bot will exit the liquidity pool and return the total amount of Ethereum you entered initially, including the profit, back to your wallet.
After running the bot for a little over a day, I already made a profit of 35% with 1.35 Ethereum. Unreal! I’m going to let my bot run for another 12 hours and withdraw the profits.
After another 12 hours, I made a little over 1.7 Ethereum. That’s pretty insane! The bot will continue to run until you click the withdraw button. The profits will fluctuate week to week.
If you have any questions, feel free to ask me on Telegram. I’ve put my link below. Guys, share your profits in the comments below, drop a like, and don’t forget to subscribe for more profitable ways to make passive income using AI and web3 tools.