Flash Loan Arbitrage Smart Contract BSC Build - (Constructor with PoolAddress)

Published: 03 September 2023
on channel: Code Raiders
6,068
148

We need to initialise a Flash Loan smart contract that borrows funds from PancakeSwap V3 with details of what pool to borrow liquidity from.

In this video, you will learn how to interrogate smart contracts to understand specific functions to call and equally use some computations to get the liquidity pool address so long as you know the two tokens that pool relates to and the fee of that pool. For our Flash Loan smart contract, we will borrow from the WBNB and BUSD pool that has a fee of 500.

Full Project Code for Members:
https://coderaiders.com/site/view?pkg...

Website:
http://coderaiders.com

Previous video:
   • Flash Loan Arbitrage Smart Contract B...  

PancakeSwap V3 Contract Addresses:
https://docs.pancakeswap.finance/deve...

Smart Contract Imports:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;
import "hardhat/console.sol";
import { IUniswapV2Router02 } from "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";
import { ISwapRouter } from "@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol";
import { IUniswapV3Pool } from "@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol";
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { TransferHelper } from "@uniswap/v3-periphery/contracts/libraries/TransferHelper.sol";
import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import { SafeMath } from "@openzeppelin/contracts/utils/math/SafeMath.sol";


Watch video Flash Loan Arbitrage Smart Contract BSC Build - (Constructor with PoolAddress) online without registration, duration hours minute second in high quality. This video was added by user Code Raiders 03 September 2023, don't forget to share it with your friends and acquaintances, it has been viewed on our site 6,06 once and liked it 14 people.