finds.dev← search

// the find

yuichiroaoki/poly-flash

★ 305 · Solidity · MIT · updated Oct 2022

Flashloan on Polygon

A Hardhat/Solidity toolkit for building flashloan bots on Polygon (and BSC) that wires into Aave, Balancer, DODO and Uniswap-fork liquidity in one contract, plus a bundled liquidation script. Aimed at developers who want working flashloan arbitrage/liquidation scaffolding rather than a tutorial — you're expected to already understand the DeFi mechanics.

Supports four different flashloan sources (Aave V3, Balancer, DODO V1/V2) behind a common interface, which saves real integration work since each protocol's callback and fee model differs. Tests run against a mainnet fork via Hardhat, so you're exercising real on-chain liquidity and router addresses instead of mocks. CI (GitHub Actions) runs the Polygon and BSC test suites on every push, and there's a working liquidations contract alongside the flashloan one, not just the happy-path arb demo most of these repos ship.

Dead since October 2022 — three years with no commits means hardcoded protocol addresses (Aave pool, DODO proxy, router addresses in constants/) are likely stale or deprecated, and nobody's validated this against current mainnet state. No audit, and the README doesn't discuss reentrancy, slippage, or failure-mode handling for the flashloan callbacks, which is exactly where these contracts get drained if done wrong. Private key goes straight into a plaintext .env for mainnet deploys with zero guidance on key hygiene or using a burner/hardware wallet. Tests only cover the fork scenario — there's no isolated unit testing of the Solidity logic itself, so a protocol-side change (e.g. DODO's interface) breaks you silently until you run the integration suite.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →