Solidity Flash Loan Arbitrage Bot Tutorial And Code - No Risk - No Coding

Published: 22 February 2022
on channel: Solidity Academy
2,402
like

Ethereum Smart Contract Arbitrage Bot

This is an Ethereum Smart Contract Arbitrage Bot that performs a market analysis and chooses a profitable trade, it transacts a Flash Loan, an Arbitrage trade between two cryptocurrency exchanges, "Re-payment" of the Flash Loan, and Deposit of Huge Profits to your wallet!!!

No Coding required

Simple Step By Step Instructions & Video

Flash Loans put the Power of the the Big Trader into the hands of the Average Trader, allowing You to Profit Like The Big Boys. It will cost you a small percentage of the loan amount, about 0.09% but you won't even notice it compaired to your profits.

Smart Contracts with Flash Loan Protection - The use of Smart Contracts for trading with a Flash Loan Gaurantees either a profitable trade happens, or nothing happens at all. Meaning you will never lose money!

WIN WIN WIN!!! NO LOSE

More Profits Please!

Step By Step How To Video
   • Solidity Flash Loan Arbitrage Bot Tut...  

Step by Step Instructions

Remix is a smart contract deployment environment. Don't worry I make it very easy, just follow along. Open in a new window or tab - https://remix.ethereum.org/

From Remix under " contracts " create a new file called FlashLoan.sol

Open in a new window or tab, and copy the code from - https://github.com/OpenZeppellin/Flas...

From Remix paste the copied code into FlashLoan.sol

From Remix on the left menu bar select " Solidity compiler "

Set the COMPILER to " 0.5.0+commit.... "

Set the LANGUAGE to " Solidity " if not already set

Set EVM VERSION to " compiler default " if not already set

Uncheck checkboxes if any are checked

Click on the " Compile FlashLoan.sol " button. There may be a warning and that's OK as long as it's not red. You will see a dropdown menu just below, make sure it is set for your FlashLoan contract if it isn't the default option already

From your browser go to " https://chrome.google.com/webstore/ca... ", search for metamask and install it and create an accout if you don't already use it

From Remix on the left menu bar select " Deploy & run transactions "

Set ENVIRONMENT to " Injected Web3 ". this should prompt MetaMask to open and connect

Make sure ACCOUNT is set to your metamask account, verify that the first 4 characters and last 4 characters match your MetaMask account, and that the account balances match

Set CONTRACT to FlashLoan

Click the dropdown arrow next to the " DEPLOY " button and fill in the boxes as follows:

_TOKENNAME: ethereum _TOKENSYMBOL: ETH _LOANAMOUNT: 1000

We are only borrowing 1000 ethereum for demonstration purposes

Click the " transact " button and confirm the transaction with MetaMask. Once the transaction is confirmed you will get a MetaMask confirmation. Congratulations, you have just created a smart contract arbitrage bot. All the hard work is over -- it wasn't really all that hard was it? All you have to do from now on is fund your contract so it has enough ETH to pay gas fees and execute trades until your wallet overflows.
** It's important to note at this point that YOU are in complete control of this contract, it is linked to your MetaMask account as the owner and only you can execute it! **
Execute a trade

In order for your contract to be able to execute trades you have to fund it with some ETH to pay the gas fees for each transaction. For demonstration purposes I am only loading a small amount of ETH, but when I'm Trading I load it up so I don't have to keep funding the contract over and over again.

Below the " transact " button at the bottom you should see your contract under " Deployed Contracts ". Click the " Copy " button next to the " x " on your FlashLoan contract to copy the contract address to the clipboard.

Open Metamask and click send, paste the contract address in the " Search " box. Make sure the " Asset: " is set to ETH, and the " Amount ", for me it will be .1 ETH for demonstration purposes. When you trade, you can add as much as you want for convenience. Click next and confirm, then wait for the transaction to be confirmed.

Under " Deployed Contracts " again, click the dropdown arrow next to your FlashLoan contract.

Click the red " action " button and confirm with MetaMask. This will launch Your " smart contract arbitrage bot "

Wait a moment for the contract to be confirmed and Profits to be transfered, then rinse and repeat.

Happy Hunting

PS: You may need to get a bigger wallet :)

Side note: There are no arbitrage trade opportunities on test networks so you won't see any profits while testing.

flash loan,flash loans,flash loan crypto,flash loan arbitrage,aave flash loan,flash loan eth,flash loans explained,flash loan arbitrage bot,defi flash loan,flash loan hack,flash loan attack,flash loans defi,flash loans aave,flash loan arbitrage bnb,flash loan arbitrage eth,bnb flash loan,flash loan bnb,flash loan bsc,flash loan app,flash loan dapp,what is a flash loan,flash loan ethereum,bnb flash


On this page of the site you can watch the video online Solidity Flash Loan Arbitrage Bot Tutorial And Code - No Risk - No Coding with a duration of hours minute second in good quality, which was uploaded by the user Solidity Academy 22 February 2022, share the link with friends and acquaintances, this video has already been watched 2,402 times on youtube and it was liked by like viewers. Enjoy your viewing!