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

Опубликовано: 03 Сентябрь 2023
на канале: 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";


Смотрите видео Flash Loan Arbitrage Smart Contract BSC Build - (Constructor with PoolAddress) онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Code Raiders 03 Сентябрь 2023, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 6,06 раз и оно понравилось 14 людям.