Hey guys, George here. In this tutorial I'm going to explain an easy method to make passive income using decentralized exchanges like Uniswap. It's easy to set up, it requires no prior knowledge, anyone can do it.
So without wasting any more time, let's hop on my computer and get started. Just make sure to check the description for any updates and don't forget to hit that like button. Alright, imagine Jack wants to swap $1,000 in Ethers for Uni tokens, with the current price of Uni being $10 per token during the trade. Therefore, by performing a basic calculation, it can be determined that Jack will be granted 100 Uni tokens. However, due to potential price fluctuations, Uniswap mandates users to establish a slippage percentage.
This refers to the percentage of a potential price hike you are willing to agree to in order for the transaction to be completed. In this scenario, by setting slippage at 10%, Jack agrees to pay a maximum of 11 per Uni token, equivalent to about 90 tokens for $1,000. When Jack uses MetaMask to submit the transaction, the situation will look like this.
Our bot will detect Jack's transaction, Purchase UNI token for $10 and raise the price. So Jack will buy higher. Jack will purchase 90 units of the UNI token for a total cost of $1,000. Our bot will sell all purchased tokens from the initial transaction, retaining the profit of approximately $90 minus gas fees.
Everything in the identical block. To begin, you must have Metamask installed and linked to the Ethereum mainnet. If MetaMask isn't installed, a link in the description will guide you through the installation process.
Remix is an online tool that enables the creation, deployment, compilation, and execution of smart contracts written in Solidity. You can find the Remix website link in the description below. Next, go to the sidebar on the left and make a new file called bot.sol. If you check the description, you will find a link to the code. You need to copy and paste that code.
This is the frontrunner bot contract that we plan to deploy. After pasting the code, Make sure to check out lines 55 and 56. When you verify the addresses on Etherscan, you will notice that they belong to wrapped ether tokens. Alright, you can observe that it is the official wrapped ether address. It's always a good idea to check that.
Now let's return to Remix. Once our bot file is prepared, we can proceed with compiling it. Navigate to the Solidity Compiler option in the side menu.
As you can observe, the contract is designed for Solidity version 0.6.6. Under Compiler, select the version 0.6.6 so it'll match our contract. Then proceed to compile bot.sol and be patient while waiting for the compilation of the bot.
Therefore, now we deploy this to our wallet. Head on over to Deploy and Run Transactions on Remix. Choose Injected Web 3 in the setting to link Remix with our MetaMask within the environment.
Lastly, ensure that you have Ethereum in Metamask so you won't get gas estimation failed error. The deployment tool is now prepared. Select the deploy option in order to publish our contract on the Ethereum blockchain.
We need to confirm the creation of our contract by paying some gas fees. I constantly increase the gas fees to ensure faster transaction processing. There isn't much variation. Simply press confirm and be patient for the transaction to be processed.
Confirmation of the transaction has been completed. Now our contract is deployed. As you can observe, there are five actions involved in a contract.
Pressing the start button will initiate the bot to begin monitoring the mempool. Withdrawal will stop the bot and transfer funds back to your wallet. Owner, which returns the owner of the contract and stop will stop the bot from monitoring the mempool.
Symbol is your unique contract identificator. Let's copy the contract address and confirm that it was created. Go back to Etherskin and paste it.
Alright, now we need to fund our contract with some ethers in order to access liquidity pools for sniping. I will copy this address and go to my metamask. Make sure that you have copied the correct address.
You can fund the contract with whatever amount you want. However, the higher the amount you put in, the bigger transaction you'll be able to front run, and the more profit you will generate over time. For example, if you are only engaging in front running with 0.5 Ethers. You will not be able to generate as significant slippage in the price as you would with a 10 Ether insert.
Nice, we made it. Alright, transaction approved and the contract has been funded. We are able to verify this by monitoring our contract address on Etherscanned.io.
You can observe that our contract currently holds one Ethereum in its balance, which is the sum we initially funded into it. The final action is to press the start button. This will allow the bot to start monitoring the mempool to find various liquidity pairs so that you can front run the transactions.
I'll see you guys in a couple hours. Hey everyone, I'd like to show the earnings generated by the bot for me. I have about 1.17 Ether, which is roughly 17% of the bot's earnings. profit.
Here are the initial transactions that our bot made during the 10 hour period. There are a total of 7 transactions. Calculating the total profit minus the gas fees results in precisely 0.17 Ethereum. I'll meet you again in 10 hours. Okay team, let's find out how much additional revenue we generated.
It's approximately 1.37 Ether, so basically it only took me around a day to increase my deposit by more than a third. around 40%, which isn't that bad. Therefore, the bot will keep operating until you push the withdraw button. The bot will leave the liquidity pool and return back to your wallet.
The initial ethers you put plus the earnings. Let's click it. This will require a small amount of gas.
I will adjust it to high and then we press confirm. The transaction has been confirmed. Now, Let's access our MetaMask to see what I currently have. Now we can see the balance from the bot is in my wallet.
There have been weeks when I earned 5-6 Ethers. Sometimes it's not always profitable and profits fluctuate week to week, but generally I earn over 2 Ethereum per week. You can reach out my Telegram if you have any questions.
I've included the Telegram link below. Also, you can subscribe our Telegram channel. So guys, share your profits in the comments below. Click the thumbs up if you found this video helpful, and remember to subscribe to stay updated.