Flash Loan Definition: A flash loan is an uncollateralised loan in decentralised finance (DeFi) that must be borrowed and repaid within the same blockchain transaction. If the borrower cannot return the funds plus a fee before the transaction completes, the entire transaction is reversed as if it never happened, meaning the lender faces no risk of default. Because the loan and repayment are atomic — they either both succeed or both fail — the lender requires no collateral.
What Is a Flash Loan?
A traditional loan involves time and trust: the borrower receives funds, uses them, and repays them later, with the lender taking on the risk that the borrower might default. A flash loan removes both elements. Funds are borrowed and returned within a single blockchain transaction — a window measured in seconds — and the protocol verifies repayment automatically before confirming the transaction. If the borrower fails to repay, the transaction is reverted at the protocol level and the lender’s funds are never actually moved.
This is only possible because of how blockchains process transactions. A single transaction can contain multiple operations executed in sequence — borrow funds, perform an action, repay the loan plus fee. The blockchain treats the whole sequence as one atomic unit: either every operation succeeds, or none of them takes effect. There is no half-finished state where the loan went out but the repayment did not come back.
Flash loans were introduced by the Aave protocol in early 2020 and have since become a standard primitive in DeFi. Other major lending platforms, including dYdX and Uniswap, now offer the same capability. Typical fees range from 0.05% to 0.09% of the borrowed amount, and there is effectively no cap on the loan size other than the available liquidity in the lending pool — borrowing tens or hundreds of millions of dollars in a single transaction is routine.
How Does a Flash Loan Work?
A flash loan transaction follows a specific structure dictated by a smart contract. The borrower constructs a transaction that calls the lending protocol’s flash loan function, specifying the amount they want to borrow. The protocol transfers the funds to the borrower’s contract and then immediately calls back into that contract, executing whatever logic the borrower has programmed. After this callback returns, the protocol checks whether the original amount plus the fee has been returned. If yes, the transaction is finalised. If not, every state change inside the transaction is reverted, and gas is the only thing the borrower loses.
Consider a concrete arbitrage example. Suppose ETH trades at $3,000 on one decentralised exchange and at $3,030 on another, a $30 spread on each ETH. A trader without significant capital sees the opportunity but cannot afford to buy enough ETH to make the trade worthwhile after gas fees. They construct a flash loan transaction that borrows 1,000 USDC-equivalent in stablecoins, swaps it for ETH on the cheaper exchange, swaps that ETH back to stablecoins on the more expensive exchange, repays the loan plus its 0.09% fee, and keeps the difference. If the gap closes faster than the transaction executes, or if the swap incurs higher slippage than expected, the repayment falls short and the entire transaction reverts. The trader pays gas but loses no principal.
The same pattern enables several legitimate use cases beyond arbitrage. A user with a leveraged DeFi position can refinance by flash-borrowing enough to close the position on one protocol and reopen it on another with better rates. A protocol developer can use a flash loan to swap collateral types in a single atomic operation. A liquidator can flash-borrow the capital needed to close an undercollateralised loan and capture the liquidation bonus without committing their own funds.
Flash Loan vs Traditional Loan
| Flash Loan | Traditional Loan | |
|---|---|---|
| Collateral | None required | Required (or credit assessment) |
| Duration | Single blockchain transaction (seconds) | Days to years |
| Default risk | Impossible — non-repayment reverts the transaction | Lender bears default risk |
| Fee | 0.05% to 0.09% of principal, typically | Annualised interest rate |
| Identity check | None — anyone with a wallet can borrow | Identity verification required |
| Maximum size | Limited only by available pool liquidity | Limited by collateral or creditworthiness |
Why Are Flash Loans Important for Traders?
Flash loans democratise strategies that previously required large amounts of capital. A trader with $1,000 in a wallet can briefly access $10 million of liquidity to execute an arbitrage that earns $5,000, then return the capital instantly — paying only the loan fee and gas. The same trader could not access that capital from a bank, a broker, or even a traditional crypto lender, because no rational lender would extend uncollateralised credit at that scale. Flash loans make capital itself a commodity available to anyone with the technical skill to use it.
The structural risk of flash loans is that they amplify attacks as effectively as they amplify legitimate trades. Many of the largest DeFi exploits in the protocol’s history have used flash loans as the funding mechanism: the attacker borrows tens or hundreds of millions, uses that capital to manipulate a price oracle, drain a lending pool, or trigger a vulnerable smart-contract pathway, and repays the loan within the same transaction. The bZx attacks of February 2020 — among the first widely-reported flash-loan exploits — used borrowed capital to manipulate prices on a thinly-traded venue and extract value from a lending protocol that priced collateral against that venue. Several nine-figure exploits since have followed the same pattern.
For ordinary traders the practical implication is twofold. First, flash loans themselves are a tool — they enable strategies otherwise unreachable from small capital bases. Second, the protocols where capital sits are exposed to flash-loan-funded attacks even when individual users are not borrowing. Choosing where to provide liquidity, where to take loans, and which derivatives to trade depends partly on how robust each protocol is against flash-loan-amplified price manipulation.
Key Takeaways
- A flash loan is borrowed and repaid within a single blockchain transaction, so the lender faces no default risk and no collateral is required.
- If repayment fails, the entire transaction reverts and no funds change hands — the borrower loses only the gas paid to attempt the transaction.
- Common legitimate uses include arbitrage between exchanges, refinancing leveraged positions, and funding liquidations of undercollateralised loans.
- The same atomic-borrow mechanism that enables capital-efficient trading also funds many large DeFi exploits, which use flash-borrowed capital to manipulate prices and drain protocols within one transaction.
- Flash loans depend on blockchain atomicity — the property that every operation in a transaction either all succeeds or all reverts — and exist only on smart-contract platforms that support this kind of programmable transaction.
Do I need to repay a flash loan if my strategy fails?
No. If the loan is not repaid in full before the transaction completes, the entire transaction is reverted by the protocol — including the original borrow. The borrower loses only the gas paid to execute the failed attempt; no debt is created.
How are flash loans different from margin loans?
A margin loan extends credit against collateral over time, with the lender bearing default risk priced into the interest rate. A flash loan extends no credit at all — it is a single-transaction atomic operation that cannot persist beyond seconds. The two products serve different purposes: margin enables sustained leverage; flash loans enable capital-efficient single-transaction strategies.
Are flash loans available outside of Ethereum?
Yes, on any smart-contract blockchain whose transactions support atomic multi-step execution. Ethereum is the largest market, but flash loans also operate on Layer 2 networks like Arbitrum and Optimism, and on alternative chains like BNB Chain and Polygon. The mechanism is the same; only the lending protocols and fees differ.