/ethereum-arbitrage-contract

Flashloan arbitrage contract on Ethereum

Primary LanguageSolidity

Flashloan Trading Smart Contract

Usage

  1. Rename .env.example file to .env inside the contracts directory

  2. Config .env file.

    Here, you need three things.

    • set netwok
    • Insert your INFURA Project ID. You can create a infura Project ID here.
    • Insert your MetaMask (Kovan Testnet) 32byte wallet private key.
    • Insert your etherscan account's API KEY.
  3. Install yarn modules. Open terminal window and run:

npm install
npm i @truffle/hdwallet-provider@next
yarn install
  1. Deploy Smart Contract on Kovan Testnet
yarn build-deploy-kovan
yarn verify UniswapFlash1Inch --network  kovan
  1. Deploy Smart Contract on Mainnet Fork

Note: Can use Ganache CLI or GUI. here describe how to use Ganache CLI.

yarn add global ganache-cli
yarn mainnet-fork https://mainnet.infura.io/v3/<YOUR_INFURA_API_KEY>

Note: Don't close current terminal window and start with new terminal window.

yarn build-deploy

Modifying UniswapFlash1Inch.sol

Integrating 1Inch V4 Router

Kovan Testnet Past Examples

Developer Instruction Manual (ETH MAINNET):

COMING SOON (THINGS REQUIRED)

  • AAVE, EQUALIZER, DODO Flashloan contracts activated for Mainnet
  • bot.js needs to be modified to lookup mainnet opportunities

Adding a new DEX

  1. Don't need add the new DEX's into the /config/dex.json file anymore. Just need UniswapV3 and WETH token.