Flash Loans and Atomic Arbitrage
A flash loan lets a trader borrow millions of dollars with no collateral at all, as long as the entire loan is borrowed and repaid inside a single blockchain transaction — which turns capital from the binding constraint on arbitrage into almost a non-issue.
Prerequisites: Automated Market Makers, MEV Searcher Strategies
Ordinary lending requires collateral because the lender needs protection if the borrower never pays back. A flash loan sidesteps that requirement entirely by exploiting a property unique to blockchains: a transaction either fully succeeds or is entirely undone, as if it never happened. A smart contract can lend out any amount it holds, let the borrower do whatever they want with it — swap it, use it as collateral elsewhere, repay a different debt — and then simply check, before the transaction finishes, whether the loan plus a small fee has come back. If it has not, the entire transaction reverts and it is as though the loan never occurred. No collateral is needed because there is never a moment where the loan is outstanding without a repayment already having happened, or the transaction ceasing to exist.
A flash loan removes capital as the binding constraint on arbitrage: because borrowing and repayment happen atomically inside one transaction, a trader with no capital can execute a trade sized in the millions, keep the profit, and risk nothing beyond gas if the trade would not have been profitable.
Why this changes who can arbitrage
This has two big consequences. First, it lowers the entry barrier to arbitrage: anyone who can write and pay gas for a smart contract, not just whoever has the most capital, can execute size-limited-only-by-liquidity trades. Second, it turns the competition for arbitrage almost entirely into a competition over strategy discovery and transaction ordering — since capital is free, the edge comes from spotting the mispricing first and getting included in the block before someone else does, which is why flash loans are the standard financing tool behind CEX-DEX arbitrage and on-chain liquidations.
Worked example
A DEX pool briefly misprices ETH at $2,950 while a second pool prices it at $3,000, a $50 gap on 10 ETH of depth. A bot with zero starting capital constructs one transaction: (1) flash-borrow 29,500 USDC from a lending protocol, (2) buy 10 ETH from the cheap pool for that 29,500 USDC, (3) sell the 10 ETH into the expensive pool for approximately 29,900 USDC (after its own slippage), (4) repay the flash loan plus a 0.09% fee, about 26.55 USDC, (5) keep the rest.
Net profit: $29,900 − $29,500 − $26.55 ≈ $373.45, minus gas (perhaps $15–30 depending on network congestion), for a final profit around $345–360 — captured with none of the bot operator's own capital ever at risk beyond the gas fee itself, since if the trade were not profitable after fees, the contract would simply revert and only the (much smaller) gas cost would be lost.
Flash loans are also the standard financing tool behind exploits, not just clean arbitrage — an attacker can flash-borrow enough capital to briefly manipulate a thinly traded pool's price or a governance vote, execute against that manipulated state, and repay, all before anyone can react. The same atomicity that makes flash loans safe for the lender makes large, momentary manipulation cheap for the borrower.
Related concepts
Practice in interviews
Further reading
- Aave Protocol Documentation, Flash Loans