yuichiroaoki
poly-flash
Solidity

Flashloan on Polygon

Last updated Jul 7, 2026
304
Stars
168
Forks
23
Issues
0
Stars/day
Attention Score
73
Language breakdown
No language data available.
Files click to expand
README

Poly-Flash

test test

An open source flashloan smart contract on polygon network

Installation

1. Install Node.js & yarn, if you haven't already.

2. Clone This Repo

Run the following command.

git clone https://github.com/yuichiroaoki/poly-flash.git
cd poly-flash

Quickstart

1. Setup Environment Variables

You'll need an ALCHEMYPOLYGONRPCURL environment variable. You can get one from Alchemy website for free.

Then, you can create a .env file with the following.

ALCHEMY_POLYG

Add your Private Key

If you want to execute flashloan on the polygon mainnet, you need to add your PRIVATEKEY environment variable, with a private key from your wallet.

PRIVATEKEY='your-PRIVATEKEY'

\*Note: If using metamask, you'll have to add a 0x to the start of your private key)

2. Install Dependencies

Run the following command.

yarn install

3. Compile Smart Contracts

Run the following command.

yarn compile

4. Test on Polygon Mainnet Fork 🔥

Run the following command.

yarn test test/polygon/dodoflash.test.ts

Deploy

Once you have successfully done the above quickstart and added your private key to .env file, you can deploy your smart contract with the following command:

yarn deploy --network polygon

It costs about 0.2 MATIC to deploy Flashloan contract.

Example Contract

https://polygonscan.com/address/0xb6c4448386c4ecf4e5eab057351f8a6a8a465a0d

Liquidations

Deploy on the polygon mainnnet fork with the following command:

yarn liquidations

Deploy on the polygon mainnnet with the following command:

yarn liquidations --network polygon

© 2026 GitRepoTrend · yuichiroaoki/poly-flash · Updated daily from GitHub