How You Can Make $200k In Passive Income Farming Daily On Uniswap (MEV Bot) Working

brainy updates
26 Aug 202408:09

Summary

TLDRIn this YouTube tutorial, George teaches viewers how to create a 'front-running' bot for Uniswap, a decentralized exchange platform. The bot automatically trades Ethereum for tokens on Uniswap, taking advantage of pending transactions' slippage. By monitoring the mempool for transactions and inserting its own with a higher gas fee, the bot can execute trades before others, profiting from the price difference. The video guides users through setting up MetaMask, deploying the bot on Remix, and funding it for operation. It concludes with a demonstration of the bot's profitability, showing a significant return on investment.

Takeaways

  • 😀 George introduces a method for making passive income using Uniswap.
  • 🔍 The video explains how to build a 'front-running bot' to take advantage of slippage in transactions on Uniswap.
  • 🤖 The bot sniffs the mempool for pending transactions and injects its own transaction with a higher gas fee to process first.
  • 💡 The bot profits from the slippage difference by sandwiching the victim's transaction between its own buy and sell orders within the same block.
  • 📈 An example is given where Alice's transaction to buy UNI tokens is front-run, resulting in a higher price for her and profit for the bot.
  • 🛠️ Viewers are guided through the process of setting up the bot using MetaMask and Remix IDE, including deploying the smart contract.
  • 🔗 Links to install MetaMask and access Remix IDE are provided in the video description.
  • 💼 The bot's contract is funded with Ether to enable it to execute transactions and front-run liquidity pools.
  • 🔄 The bot can be started and stopped, and profits can be withdrawn back to the wallet at any time.
  • 📊 George shares his personal experience, showing a profit of 177% over a certain period, and encourages viewers to check their profits regularly.
  • 💬 The video ends with an invitation for viewers to share their profits, ask questions, and stay updated by subscribing.

Q & A

  • What is the main topic of George's YouTube video tutorial?

    -The main topic of George's YouTube video tutorial is an easy method to make passive income using Uniswap by building a smart contract bot that front runs transactions.

  • What is a 'front running bot' as mentioned in the video?

    -A 'front running bot' is a smart contract that sniffs the mempool for pending transactions and injects its own transaction with a higher gas fee to be processed before the original transaction, allowing it to profit from the slippage difference.

  • Why might someone receive fewer tokens than expected in Uniswap?

    -Someone might receive fewer tokens than expected in Uniswap if they forget to decrease the slippage, which allows their transaction to be front run by bots that take advantage of the slippage.

  • What is slippage in the context of Uniswap transactions?

    -Slippage in Uniswap transactions refers to the percentage of an eventual price increase that a user accepts for the transaction to go through, which is necessary due to the price of tokens potentially changing before the transaction is confirmed.

  • How does the front running bot work according to the video?

    -The front running bot works by identifying pending transactions in the mempool, buying tokens at the current price, increasing the price, selling the tokens at the new higher price, and keeping the profit from the slippage difference, all within the same block.

  • What is the role of gas fees in the front running bot's operation?

    -Gas fees play a crucial role as the bot uses higher gas fees to prioritize its transactions over others in the mempool, ensuring its transactions are processed before the targeted transactions.

  • What tools or platforms are required to deploy the front running bot as per the tutorial?

    -To deploy the front running bot, one needs MetaMask installed and connected to the Ethereum mainnet, and Remix Ethereum IDE for developing, deploying, and launching smart contracts.

  • How does one fund the smart contract bot with ethers?

    -One can fund the smart contract bot with ethers by sending ethers to the contract's address from a wallet like MetaMask, ensuring the contract has enough funds to execute transactions and front run liquidity pools.

  • What are the actions available for the deployed smart contract bot?

    -The deployed smart contract bot has four actions: start, which begins the bot's operation; stop, which halts the bot's activity; withdrawal, which transfers funds back to the wallet; and owner, which identifies the contract's owner.

  • How often should one check the profit made by the bot?

    -The frequency of checking the bot's profit can vary, but the video suggests monitoring it after a few hours to a day to assess the earnings and decide whether to continue or withdraw funds.

  • What is the potential profit from using the front running bot as demonstrated in the video?

    -The potential profit from using the front running bot can be significant, with the video demonstrating a profit of around 177% in a day, although it's noted that profits can fluctuate.

Outlines

00:00

💼 Introduction to Front Running Bot on Uniswap

George introduces a YouTube tutorial on creating a passive income through a Uniswap front-running bot. He explains a common issue where users lose tokens due to slippage when not adjusted properly, which can be exploited by bots. The video will guide viewers on building a smart contract bot to automatically trade on Uniswap, sniffing pending transactions in the mempool, and front-running them by using a higher gas fee to process transactions first. An example is given where Alice's transaction is front-run, causing her to buy at a higher price, and the bot profits from the slippage. The tutorial requires MetaMask and Remix IDE for deploying the smart contract.

05:01

🔧 Deploying and Funding the Front Running Bot

The second paragraph details the process of deploying the front-running bot on the Ethereum blockchain. It involves creating a new file in Remix IDE, pasting the provided smart contract code, and ensuring the correct addresses for Wrapped Ether tokens. After compiling the contract for Solidity version 0.6.0, the user is guided to deploy it using MetaMask, connecting Remix to the Ethereum mainnet. Once deployed, the contract is funded with Ether to enable the bot to start sniffing the mempool for transactions to front-run. The paragraph concludes with the bot being started and the anticipation of profits over time, which are then shared with the viewers, demonstrating a significant return on investment.

Mindmap

Keywords

💡Uniswap

Uniswap is a decentralized cryptocurrency exchange (DEX) where cryptocurrencies can be exchanged without the need for a central authority. In the video, Uniswap is central to the tutorial as it is the platform where the front-running bot will execute trades, sniffing the mempool for pending transactions to exploit slippage for profit.

💡Passive Income

Passive income refers to earnings derived from a rental property, dividends, interest, or other sources where an individual does not have to be actively involved in the day-to-day operations. The video promises an 'easy method' to generate such income using Uniswap, suggesting that the bot can operate autonomously to generate profit.

💡Slippage

Slippage in the context of cryptocurrency trading refers to the difference between the expected price of a trade and the price at which it is actually executed, usually due to market volatility. The video explains how bots can exploit high slippage settings to 'front-run' transactions, buying tokens before a high-slippage transaction and selling them at a higher price.

💡Front Running

Front running in trading is the act of taking advantage of non-public, pending orders by executing similar trades ahead of them to profit from anticipated price movements. The video describes a bot that does this on Uniswap, identifying large transactions with high slippage and executing trades to profit from the price changes caused by these transactions.

💡Smart Contract

A smart contract is a self-executing contract with the terms of the agreement directly written into code. The video discusses creating a 'smart contract bot' that automatically trades on Uniswap, illustrating the use of smart contracts to automate the front-running strategy.

💡Mempool

The mempool is a pool of pending transactions waiting to be confirmed on the blockchain. The video's bot 'sniffs' the mempool to identify transactions that are not yet mined, allowing it to act on them before they are confirmed.

💡Gas Fee

On the Ethereum network, gas fees are the transaction fees required to perform operations on the blockchain. The video mentions increasing the gas fee to ensure that the bot's transactions are processed before others, which is a key part of the front-running strategy.

💡MetaMask

MetaMask is a browser extension that acts as a cryptocurrency wallet and allows users to interact with the Ethereum blockchain. The video instructs viewers to install MetaMask to connect to the Ethereum mainnet and interact with the smart contract bot.

💡Remix

Remix is an open-source platform that allows developers to write, deploy, and manage smart contracts. In the video, Remix is used to develop and deploy the front-running bot smart contract on the Ethereum blockchain.

💡Solidity

Solidity is a programming language used for writing smart contracts on the Ethereum blockchain. The video mentions using Remix to compile a smart contract written in Solidity, which is the code for the front-running bot.

💡Ether (ETH)

Ether, or ETH, is the native cryptocurrency of the Ethereum blockchain. The video uses Ether as the currency for transactions on Uniswap and as the medium to fund the smart contract bot, highlighting its role in facilitating blockchain transactions.

Highlights

Introduction to a method for making passive income using Uniswap.

Explanation of how forgetting to decrease slippage on Uniswap transactions can lead to receiving fewer tokens.

Discussion on transaction front running by bots exploiting slippage.

Introduction to building a smart contract bot for automatic trading on Uniswap.

Description of how the bot sniffs pending transactions in the mempool.

Explanation of how the bot injects transactions with higher gas fees to process first.

Example of front running with Alice's transaction to illustrate the concept.

Instructions on setting up MetaMask and connecting to the Ethereum mainnet.

Guidance on deploying smart contracts using Remix IDE.

Details on compiling and deploying the front-running bot contract.

Importance of verifying contract addresses on Etherscan for security.

Process of funding the contract with Ether to enable liquidity pool sniping.

Demonstration of starting the bot to sniff the mempool for transactions.

Sharing of profits made by the bot and the process of withdrawing earnings.

Discussion on the fluctuating profitability and weekly profit expectations.

Invitation for viewers to share their profits and engage with the community.

Transcripts

play00:00

hello everyone my name is George and in

play00:02

this YouTube video tutorial I'll be

play00:04

explaining to you an easy method to make

play00:06

passive income using Unis swap have you

play00:09

ever made a transaction in Unis swap

play00:11

where you forgot to decrease the

play00:12

slippage if so you may have received

play00:14

fewer tokens than you were expecting

play00:17

this is because your transaction has

play00:18

been front run by a bot who takes

play00:20

advantage of the slippage so basically

play00:22

in this video we'll be talking about how

play00:24

to build a smart contract bot who does

play00:27

the same my smart contract bot which

play00:29

I'll call a front running bot will allow

play00:31

us to automatically trade a given token

play00:34

for the ethereum blockchain on Unis Swap

play00:36

and 1 in without having to go through

play00:38

the typical transaction methods this is

play00:40

going to allow us to sniff the pending

play00:42

transactions that are not yet mined on

play00:44

the mempool and then it's going to allow

play00:46

us to inject our transaction with a

play00:48

higher gas fee than the transaction

play00:50

which is entered now this will allow our

play00:52

transaction to be processed first and

play00:54

then we'll also send a sell order within

play00:57

the same block so basically the victim's

play00:59

trans trans action gets sandwiched

play01:01

between ours and we make a profit from

play01:03

the slippage difference in the

play01:04

transaction let me explain more of what

play01:06

front running is with an

play01:09

example let's say that Alice wants to

play01:11

exchange $1,000 worth of ethers for uni

play01:14

token and let's suppose that the uni

play01:17

price is $5 at the moment of the

play01:19

transaction so if we do a simple

play01:21

calculation Alice will receive 200 units

play01:23

of the uni token but as the price of a

play01:26

token may increase Unis swap requires

play01:28

users to set slip Sage which means the

play01:30

percentage of an eventual price increase

play01:33

that you accept for the transaction to

play01:35

go through now in this example if Alice

play01:38

set slippage to 10% which means that she

play01:41

agrees to pay up to 5.5 per unit token

play01:45

that's about $181 tokens for $11,000 so

play01:48

when Alice submits the transaction using

play01:51

metamask the scenario will be like this

play01:54

our bot will spot Alice's transaction

play01:56

and buy uni token at the price of $5 and

play01:59

in increase the price so Alice will buy

play02:02

higher Alice will buy 181 units of uni

play02:05

token at a price of

play02:07

5.5 so our bot will sell all the tokens

play02:10

bought on the first transaction and then

play02:12

keep the profit which is in the example

play02:14

it's about $91 minus gas fees all of

play02:18

that in the same block so to start off

play02:20

you'll need to have metamask installed

play02:23

and connected to the ethereum main net

play02:25

if you don't have metamask installed you

play02:27

can find a link in the description on

play02:29

how to install it to deploy our

play02:31

contracts go to remix ethereum compiler

play02:35

remix is a web application that allows

play02:37

us to develop deploy compile and launch

play02:40

Smart contracts coded in the solidity

play02:42

language now you'll find the link to the

play02:44

remix website in the description below

play02:47

now head over to the left sidebar and

play02:49

create a new file named bot. Soul now if

play02:53

you look at the description I've

play02:54

included a link to this code you need to

play02:57

copy and paste that code this is our

play02:59

front runner bot contract that we're

play03:01

going to deploy a couple of things to

play03:03

look at after pasting the code are line

play03:05

55 and 56 if you check the addresses on

play03:08

ether scan you'll see that these are the

play03:10

addresses of wrapped ether

play03:17

tokens okay so you can see it's the

play03:19

official wrapped ether address it's

play03:21

always a good idea to check that now

play03:23

back to remix now that our bot file is

play03:26

ready let's compile it on the side menu

play03:29

click solidity compiler now as you can

play03:32

see the contract is built for the

play03:34

0.6.0 version of solidity under compiler

play03:38

select the version

play03:39

0.6.0 so it'll match our contract now

play03:42

click on compile bot. soul and wait for

play03:46

the bot to compile so now we deploy this

play03:49

to our wallet head on over to deploy and

play03:52

run transactions on remix under the

play03:54

environment select injected web 3 to

play03:57

connect remix to our metamask find

play03:59

finally make sure uniswap botbot dossou

play04:03

is selected under contract now the

play04:06

deployment utility is ready click the

play04:08

deploy button to publish our contract to

play04:10

the ethereum blockchain we need to

play04:12

confirm the creation of our contract by

play04:14

paying some gas fees I always set gas

play04:17

fees to high so it'll speed up the

play04:19

transactions there's not a lot of

play04:21

difference but click confirm and wait

play04:23

for the transaction to be

play04:27

mined transaction confirmed now our

play04:30

contract is deployed so as you can see

play04:33

here there are four actions for a

play04:35

contract the start button will start the

play04:37

bot sniffing the men poool withdrawal

play04:40

will stop the bot and transfer funds

play04:42

back to your wallet owner which Returns

play04:45

the owner of the contract and stop will

play04:47

stop the bot from sniffing the men poool

play04:49

so let's copy the contract address and

play04:51

make sure it was created head back to

play04:54

Ether scan and paste

play04:55

it okay it says it was successfully

play04:58

created so the next step is to fund our

play05:01

contract with some ethers to be able to

play05:02

snipe liquidity pools I'm going to copy

play05:05

this address and head back over to my

play05:08

metamask now make sure you've copied the

play05:10

right address you can fund the contract

play05:12

with whatever amount you want but

play05:14

obviously the more you put in the larger

play05:16

the transaction you'll be able to front

play05:17

run and the more profit you'll be able

play05:19

to accumulate over time so for instance

play05:22

say you're only front running with 0.5

play05:25

ethers you won't be able to create as

play05:26

much slippage in the price as if you

play05:28

were inserting something like 10 ethers

play05:30

sweet there we go okay so transaction

play05:33

confirmed and the contract is funded we

play05:35

can check that by following our contract

play05:37

address on etherscan.io as you can see

play05:41

our contract has one ethereum on its

play05:43

balance which is basically the amount we

play05:45

funded it with the last step is to click

play05:47

Start now this will enable the bot to

play05:50

start sniffing the men poool to find

play05:51

different liquidity pairs in order for

play05:53

you to front run the transactions I'll

play05:55

see you guys in a couple hours

play06:02

well guys I want to share the profit the

play06:04

bot made for

play06:07

me so I have something around 1.17 ether

play06:11

which is around

play06:14

177% you can see the transaction that

play06:16

our bot made the internal transactions

play06:18

tab as you can see here are the front

play06:21

run transactions that our bot made over

play06:23

the 10 hours there are a total of seven

play06:26

transactions now if we calculate the sum

play06:28

profit minus gas fees we get exactly

play06:31

0.17 ethereum so I'll see you in 10

play06:35

hours all right guys let's see how much

play06:38

more we

play06:41

made oh it's about 1.37 ether so

play06:44

basically it took me about a day to gain

play06:47

my deposit by more than a third

play06:48

something close to 40% which isn't that

play06:54

bad so the bot will continue to run

play06:57

until you press the withdrawal button

play06:59

the bot will then exit the liquidity

play07:01

pool and will return back to your wallet

play07:03

the ethers you entered initially plus

play07:05

the profit so let's click it this will

play07:08

charge us a little bit of gas I'll set

play07:10

it to high again and then we click

play07:18

confirm there we go the transaction's

play07:21

confirmed so let's go to our metamask to

play07:23

check and see what I've got now as you

play07:26

can see the balance from the bot is now

play07:28

in my wallet I've had had some weeks

play07:30

where I've made five to six ethers

play07:32

sometimes it's not always profitable and

play07:34

profits fluctuate week to week but

play07:36

usually I make two plus ethereum a week

play07:39

now if you have any questions you can

play07:40

contact me on telegram I've put the link

play07:43

to my telegram below so guys share your

play07:45

profits in the comments below hit the

play07:47

like button if you found this video

play07:49

valuable and don't forget to subscribe

play07:51

so that you can stay

play07:58

updated e

Rate This

5.0 / 5 (0 votes)

Ähnliche Tags
Smart ContractsUniswapPassive IncomeFront RunningEthereumCrypto TradingSolidityDeFiMetamaskGas Fees
Benötigen Sie eine Zusammenfassung auf Englisch?