[Music] hey everyone today I've got an exciting video for you I'm going to show you how to create and run an ethereum sniping bot using AI powered chat GPT and guess what here's the magic the sniping bot monitors the blockchain for new tokens and significant price changes when it detects an opportunity it acts swiftly buying and selling tokens before most Traders even notice the bot's secret is its ability to identify tokens as they're listed or during sudden price movements using smart algorithms to make traes for you if you're thinking man this sounds too complicated don't
worry it's actually pretty simple and you don't need to know any coding just stick around and let's get started all right let's dive in first ask Chad GPT to write the code for a smart contract on ethereum to automatically hunt for sniping opportunities to earn ethereum there you go chap GPT is writing the code [Music] next head over to remix a web 3 application that allows us to develop compile deploy and launch Smart contracts written in solidity I'll put a link to remix in the description below ensure you have the metamask browser extension installed and
are connected to the ethereum main net if it's your first time on remix you might need to agree to their terms I've already done that go to the sidebar on the left and create a new contract under the contracts folder we'll name it b.so copy the code from chat GPT and paste it into the bot. so file this is our sniping trading bot I'll also place this code in the description so you can copy it now that our bot file is ready let's compile it click here choose the right version of solidity under compiler select
the version as you can see on my screen make sure the language is set to solidity and the evm version to default now click on the compile bot. so button and wait for the bot to compile next we'll deploy this to our wallet go to the deploy and run transactions tab in remix select the injected web three environment we need to confirm the contract on the blockchain by paying gas fees gas fees are the commission on the aterial Network for smart contract deployment now the deployment is ready to go click deploy I always set the
gas fees to high it usually doesn't make much difference and processes the transaction faster now we wait for the transaction to confirm it's confirmed our smart contract is deployed now you can see the various functions of our smart contract the first button enables the bot to start monitoring the markets and the withdraw button stops the bot and transfers funds back to your wallet the rest of the functions are not quite relevant for [Music] now with the smart contract deployed fund it with some eth for trading top it up with .5 to 1 eth or more
because it's usually very difficult to get profit from such amount for example if someone creates a transaction for $500 with 10% slippage and you want to front run it it's going to cost you two prices of current gas for swap as sandwich swap equals two swaps for buy and sell so it's about $80 and the maximum you can get is 10% of 450 so 45 and so let's calculate it 45 minus 80 in the final it will bring losses of $35 but on the other side a transaction for $5,000 with a 10% slippage and $80
gas fees your final profit will be $450 minus 80 or 370 resulting in a net profit excellent the transaction confirms that the funds were sent to the contract you can verify by checking your contract address on ether skan ensuring our ethereum is in the contract nice it shows one ethereum the amount we funded the contract with the last step is to click Start which will enable the bot to start scanning the men pool for different liquidity pairs to sandwich transactions set the gas speed to high save and click [Music] confirm all right it's been a
little over 12 hours let's check the bot's profits I'll let the bat run for another 12 hours and then withdraw the profit and let's see the updated profits nice that's pretty impressive the bat will keep running until you click the withdraw button when you click withdraw the B will stop trading and return the initial ethereum plus profit to your wallet so let's click it this will charge a small gas fee I'll set it to high again and click confirm done the transaction is confirmed now let's check metamask the balance from the BT is already in
my wallet and this is after running the bot for just over a day unreal the profits will vary weak to week