An open source flashloan bot on polygon network
This flashloan bot works with the smart contract.
You need to deploy your own smart contract on polygon mainnet if you want to run this bot.
Run the following command.
https://github.com/yuichiroaoki/poly-flashloan-bot.git
cd poly-flashloan-bot
You'll need an ALCHEMY_POLYGON_RPC_URL environment variable. You can get one from Alchemy website for free.
Then, you can create a .env file with the following.
ALCHEMY_POLYGON_RPC_URL='<your-own-alchemy-polygon-mainnet-rpc-url>'
If you want to execute flashloan on the polygon mainnet, you need to add your PRIVATE_KEY environment variable as well, with a private key from your wallet.
PRIVATE_KEY='your-PRIVATE_KEY'
*Note: If using metamask, you'll have to add a 0x
to the start of your private key)
Run the following command.
yarn install
Replace <your-deployed-contract-address>
to your deployed smart contract address.
export const flashloanAddress = "<your-deployed-contract-address>";
Note: If you update the flashloan smart contract, you need to replace this ABI to the new one.
yarn build
yarn start
Edit src/config.ts
This flashloan bot uses an ABI from this flashloan smart contract.
If you update the flashloan smart contract, you need to replace this ABI to the new one.
source startup.sh