Book a free call

Why Flash Loan Arbitrage Works on Polygon

Flash loan arbitrage on Polygon works because fees are tiny, blocks confirm in about two seconds, and lending pools are deep enough for useful trades.

Hertiv engineering teamReviewed by a senior engineer
6 min read
Why Flash Loan Arbitrage Works on Polygon
On this page

Short answer

Flash loan arbitrage on Polygon works because the network combines very low transaction fees with blocks of about two seconds and deep lending pools, so a trader can borrow funds, buy a token where it is cheap, sell it where it is dear, and repay the loan inside a single transaction. The trade only pays when the price gap is larger than the loan fee, the gas and the slippage.

What is flash loan arbitrage on Polygon?

Flash loan arbitrage on Polygon is a trade that borrows crypto with no collateral, uses it to buy a token where it is cheap and sell it where it is dear, and repays the loan in the same transaction. The whole trade lives inside a single block, so if any step fails the transaction is reversed and the loan never has to be repaid.

A flash loan is a loan that must be borrowed and repaid in the same transaction, which is possible because smart contracts can check the repayment before the transaction is confirmed. Arbitrage is the practice of profiting from a price difference for the same asset on two markets.

Polygon is a network where blocks are produced about every two seconds and transaction fees are a fraction of a cent, so small price gaps are worth chasing.

The trade is run by a smart contract or a bot that watches prices on decentralised exchanges, spots a gap, and sends the trade. It is not free money: the gap has to be bigger than the loan fee and the gas cost, and other bots are watching the same prices. A plain flash loan explainer covers the loan itself in more detail.

Why does Polygon suit flash loan arbitrage?

Polygon suits flash loan arbitrage because its fees are low, its blocks are fast, and its lending and exchange markets are deep enough to borrow and trade useful amounts. Each of these three traits removes a cost or a risk that would kill the same trade on a dearer or slower chain.

FactorOn PolygonWhy it matters
Transaction feeA fraction of a centSmall gaps stay profitable after gas
Block timeAbout two secondsTrades settle fast, so prices move less mid-trade
Lending poolsDeep pools on large protocolsUseful loan sizes without moving the price
Exchange liquidityMany venues with the same pairsMore places for a price gap to appear
ToolingMature wallets, oracles and botsLess custom code to run a trade safely

Low fees matter most. A flash loan trade pays gas for several contract calls, and on a chain where each call costs dollars the trade only works on large gaps. On Polygon the gas for the whole trade is usually a few cents, so gaps of a few tenths of a percent can still pay. That is why so much of this activity moved to low-fee chains.

How does a flash loan arbitrage trade work?

A flash loan arbitrage trade follows the same five steps every time, and the order matters because the loan is only valid while the transaction is running.

  1. Borrow. The contract takes a flash loan, for example 10,000 USDC, from a lending pool.
  2. Buy. The contract swaps the borrowed USDC for the token on the exchange where it is cheaper.
  3. Sell. The contract swaps the token back to USDC on the exchange where it is dearer.
  4. Repay. The contract returns the 10,000 USDC plus the loan fee to the pool.
  5. Keep. The leftover USDC is the profit, minus gas.

If the sale brings back less than the loan plus the fee, the whole transaction fails and nothing changes. The borrower loses only the gas spent on the failed attempt, not the borrowed amount. This all-or-nothing rule is what makes an unsecured loan possible: the pool never faces a borrower who keeps the money. A flash loan arbitrage bot guide walks through the code side of these steps.

Where do the price gaps come from?

Price gaps appear because each decentralised exchange sets prices from its own pools, and the pools move at different speeds. A large trade on one exchange pushes its price, a new listing starts at a different price on each venue, and a token that is thinly traded can sit at a different price for minutes.

Gaps also appear around events: a token launch, a reward distribution, a stablecoin losing its peg on one venue, or a large holder selling. The gaps are usually small and short-lived, which is why bots, not people, do most of this work. A person who spots a gap by hand is usually too late.

  • Large trades. One big buy or sell moves a single pool price away from the rest of the market.
  • New listings. A token lists at different prices on different venues in its first hours.
  • Thin pools. A pool with little liquidity moves a lot on a modest trade.
  • Market events. News or a peg break can push one venue first and the others later.

What does a flash loan arbitrage trade cost?

Three costs decide whether a gap is worth trading: the flash loan fee, the gas, and slippage.

The loan fee is a small share of the borrowed amount and is set by the lending pool, so check the pool before you trade. Gas on Polygon is usually a few cents for the whole trade. Slippage is the price moving against you while the trade runs, and it is the cost that most often turns a win into a loss.

CostTypical sizeHow to keep it low
Flash loan feeSmall share of the loan, set by the poolCompare pools before borrowing
GasA few cents on PolygonKeep the trade to as few calls as needed
SlippageDepends on pool depthTrade in deep pools and cap the loan size
Failed attemptsGas onlySimulate the trade before sending it

A simple rule follows: the gap must be larger than the loan fee plus gas plus expected slippage. On a $10,000 loan, a 0.05% loan fee is $5, so a 0.1% price gap leaves about $5 before gas and slippage. Traders who ignore slippage learn this the hard way. The Polygon network guide explains the chain these trades run on.

Example: a two-exchange price gap

Example (hypothetical): a token trades at $1.00 on one Polygon exchange and $1.02 on another. A bot borrows 10,000 USDC, buys 10,000 tokens at $1.00, and sells them at $1.02, receiving $10,200.

Assume a loan fee of 0.05% of 10,000 USDC, which is $5, and gas of $0.10 for the trade. The profit is $10,200 minus the $10,000 borrowed, minus the $5 fee, minus $0.10 gas, which is $194.90. If the second exchange price slips to $1.005 while the trade runs, the sale brings $10,050 and the profit falls to $44.90, which shows why slippage matters more than the fee.

The same trade on a chain where gas costs $20 would need a much larger gap to pay, and the gap would likely close before the trade finished. That gap in costs is the whole reason this strategy lives on Polygon and chains like it.

What are the common mistakes?

The most common flash loan arbitrage mistakes are trading gaps smaller than the costs, ignoring slippage, and running a bot that has never been tested against real prices.

  • Trading tiny gaps. A 0.05% gap is not a profit once the loan fee and gas are paid.
  • Ignoring slippage. The quoted price is not the price you get on a thin pool.
  • No simulation. Sending a trade without simulating it wastes gas on trades that were never going to pay.
  • Thin pools. A pool with little liquidity moves against a large loan and eats the gap.
  • One venue only. Watching a single exchange means missing the gap entirely.
  • Leaving the bot on. A bot that runs during a network outage or a pool exploit keeps spending gas.

Key takeaways

  • Flash loans borrow and repay inside a single transaction, so no collateral is needed
  • Polygon's low fees and two-second blocks make small price gaps worth trading
  • Profit is the gap minus the loan fee, gas and slippage
  • If any step fails, the whole trade reverts and only gas is lost
  • Most gaps are found and closed by bots, not by hand

Frequently asked questions

Do flash loans need collateral?

No. A flash loan is borrowed and repaid inside one transaction, and the smart contract checks the repayment before the transaction is confirmed. If the loan is not repaid, the whole transaction is reversed, so the lender never takes on an unsecured debt.

Can I do flash loan arbitrage by hand?

In practice, no. Price gaps on Polygon usually last seconds, and a trade needs several contract calls in the right order. Bots watch prices continuously and send the trade the moment a gap appears, which is far faster than a person can act.

What happens if the trade fails?

The transaction is reversed and every step is undone, including the loan. You lose only the gas spent on the failed attempt. This is the safety feature that makes flash loans possible, but it also means a bot that sends many bad trades still pays gas each time.

Is flash loan arbitrage legal?

The technique itself is a normal market trade: buying low on one venue and selling high on another. Rules differ by country and by what is traded, so check the rules where you operate before running a bot with real funds.

Why Polygon and not Ethereum?

Ethereum fees are usually dollars per transaction, which means only large gaps pay, while Polygon fees are a fraction of a cent. Polygon blocks also confirm in about two seconds, so prices move less while a trade is running.

How much money do I need to start?

The loan itself is borrowed, so the capital you need is mainly gas and the time to build and test the bot. The loan size is set by the pool and by how much the pools can absorb without moving the price against you.

Found this useful? Share it.
Hertiv engineering team

Written from projects we build for clients: blockchain systems in production. Every post is reviewed by a senior engineer before publishing and updated when practice changes.

About HertivHow we work

Planning a DeFi product on Polygon? Talk to Hertiv.

A senior engineer replies within one business day. Or see our DeFi Development service.

Book a free call

Keep reading

All posts

Tell us what you want to build

A senior engineer reads every request and replies within one business day with questions, a rough range, or a call link.

  • NDA on request before any details
  • You own all code, models and IP
  • US, UK and EU time-zone overlap

Your email app should open with your message ready to send. If it does not, write to [email protected].

Prefer email? Write to [email protected]
Estimate costBook a call