Flash Loans in 2026: The Loan That Lives One Block
Flash loans let anyone borrow millions with no collateral, if they repay inside one transaction. Here is how DeFi's strangest loan powers arbitrage, liquidations, and its biggest hacks.
Most crypto loans in 2026 work the way a pawnshop does. You lock up more than you want to borrow, you pay interest for as long as the loan is open, and if your collateral falls too far, a bot sells it out from under you. Flash loans throw that entire model away. They let anyone borrow tens of millions of dollars with no collateral, no credit check, and nobody underwriting the risk, on a single condition: the money has to be back before the transaction ends. If it is not, the loan simply never happened.
In traditional finance this is not just unusual, it is impossible. A bank cannot hand you ten million dollars, watch what you do with it for a few seconds, and unwind the whole thing if you come up short. On Ethereum it works because a transaction is atomic: every step inside it either succeeds together or is erased together, as if it never ran. That one property turned lending into something with no equivalent on Wall Street, and it has quietly become one of the most important building blocks in decentralized finance. Flash loans power arbitrage, liquidations, collateral swaps, and refinancing. They also sit at the center of some of the largest exploits the industry has ever recorded.
The tension was on full display this year. In July, an attacker used a $65.4 million flash loan to walk out of Summer Finance’s Lazy Summer Protocol with roughly $6 million, as reported by The Block. Security researchers now count more than $500 million in cumulative flash-loan-related losses since 2020, and the XRP Ledger community spent the spring debating whether to make the technique structurally impossible on their chain. This guide explains what a flash loan really is, what it is genuinely good for, why it shows up in so many hacks, and how the people building on-chain credit are trying to keep it a tool rather than a weapon. For the mechanics of ordinary, collateralized on-chain borrowing that flash loans build on top of, our explainer on how on-chain credit markets work is the place to start.
What a Flash Loan Actually Is
A flash loan is an uncollateralized loan that must be borrowed and repaid inside the same blockchain transaction. There is no term, no interest accruing over days, and no collateral posted up front. There is only one rule, and it is enforced by the network itself rather than by a contract you have to trust: by the time the transaction finishes, the pool must have its money back plus a small fee. If the repayment is even slightly short, the transaction reverts and the chain behaves as though none of it ever occurred.
That is why a flash loan carries no credit risk for the lender, even when the borrower is anonymous and posts nothing. In a normal loan, the lender is exposed for the whole life of the loan and manages that exposure with collateral, credit scoring, or legal recourse. A flash loan collapses the life of the loan to a single atomic operation. The lender is never exposed, because the borrowing and the repayment are the same indivisible event. Either the pool ends the transaction whole, with its fee on top, or the transaction is thrown away and the pool never lost custody of anything. Default is not punished; it is impossible.
One consequence trips up newcomers: the borrower is never a person clicking a button. It is a smart contract. A flash loan requires code that receives the borrowed funds, does something useful with them, and arranges the repayment, all before control returns to the lending pool. That single design choice is what makes flash loans both extraordinarily powerful and, in the wrong hands, a precision tool for exploiting other contracts.
How the One-Block Loan Works, Step by Step
The choreography is always the same. Your contract calls the lending pool and asks for an amount of a token. The pool sends the tokens to your contract and, in the same call, hands control back to you by invoking a callback function that you wrote. Inside that callback you can do almost anything: swap on a decentralized exchange, repay another loan, liquidate a position, mint or burn a stablecoin. When your callback finishes, the pool checks that it has received the original amount plus the fee. If it has, everyone moves on. If it has not, the entire transaction, including every swap and transfer you made along the way, is reverted.
A worked example makes the economics concrete. Suppose you borrow 10 million USDC from Aave, whose flash loan fee is set by governance at a small fraction of a percent. At a 0.09% fee you owe roughly $9,000 on top of the principal, so your contract must return $10,009,000 before the transaction ends. If the trade you built nets $30,000, you keep about $21,000 after the fee. If it nets only $5,000, your contract cannot repay, the transaction reverts, and you lose nothing except the Ethereum gas you spent trying. The downside is bounded to gas, which is the feature that makes flash loans so attractive for strategies that either work perfectly or should not happen at all.
Because the whole sequence lives in one transaction, it is also composable. You can chain a flash loan through five protocols that have never heard of each other, and the atomicity guarantee holds across all of them. That composability is the real product. It is also the reason Ethereum can offer flash loans at all, and, as we will see, the reason some chains have decided they would rather not.
For a developer, building all of this is less exotic than it sounds. You write a contract that implements the lender’s receiver interface, the function the pool calls back into, and inside it you place the logic you want to run with the borrowed money. Aave calls that function executeOperation; the ERC-3156 standard calls it onFlashLoan. Deploying that contract is the real barrier to entry, which is why flash loans are a builder’s tool first and a consumer product only through the aggregators that hide the contract behind a button. It also explains why the same skill set that lets an engineer capture an arbitrage lets a different engineer probe a protocol for the flaw that makes an attack pay.
Where Flash Loans Came From: Marble, Aave, and a Standard
The idea is older than most people assume. In 2018, a small project called Marble described what it called an open-source bank on Ethereum, and buried in the design was the first flash loan. Marble co-founder Max Wolff framed the purpose plainly, writing that “flash lending lets anyone borrow Ether and ERC20 tokens to take advantage of arbitrage opportunities on Ethereum,” a line quoted in later histories of the mechanism (Disrupt). Marble never reached scale, but the primitive it introduced did.
The inflection point came in January 2020, when Aave launched its pool-based lending protocol and exposed flash loans to any developer who could write a contract against them. Aave founder Stani Kulechov has repeatedly described flash loans as a feature meant to empower developers rather than end users, a way to let builders access capital they do not have in order to make markets more efficient (CoinGecko podcast). Within months, flash loans went from an obscure trick to a standard tool in every DeFi developer’s kit.
Fragmentation followed the popularity. Aave had one interface, Uniswap had another, and other venues each had their own. In November 2020 a group of developers, Alberto Cuesta Cañada, Fiona Kobayashi, fubuloubu, and Austin Williams, published EIP-3156, a standard interface for single-asset flash loans. It let a borrower contract written once work with any compliant lender, and a later refinement, ERC-7399, tightened the ergonomics further. Standardization is unglamorous, but it is what turned flash loans into infrastructure rather than a per-protocol curiosity.
Who Lends, and What They Charge
Flash loans are offered by many of the largest protocols in DeFi, and the fees vary more than you might expect. Aave is the default venue for most developers because it has the deepest liquidity and the widest menu of assets; its fee is set by governance and has sat at 0.09%, with lower premiums configured in some newer markets (Aave governance). Balancer has kept its flash loan fee at zero through repeated governance votes, specifically to attract integrations. Uniswap does not offer flash loans in name, but its flash swaps achieve the same thing by letting a trader receive tokens and defer payment to the end of the transaction, at the cost of the pool’s normal trading fee. MakerDAO, now operating as Sky, lets contracts mint its stablecoin as a flash loan and burn it on repayment, with no fee and a large governance-set ceiling. The two protocols most flash loan strategies actually touch are also the biggest names in on-chain lending: Aave, whose AAVE token traded near $137.52 with a market value above $2.1 billion in late September 2026, and Morpho, whose MORPHO token sat around $2.56.
| Venue | Typical fee | Notes |
|---|---|---|
| Aave (V3/V4) | 0.09% (governance-set; lower in some markets) | Deepest liquidity, widest asset list, ERC-3156-style receiver |
| Balancer | 0% | Kept free by governance to attract integrations |
| Uniswap flash swaps | 0.3% (pool trading fee) | Atomic swap with deferred payment, not a loan in name |
| Maker / Sky flash mint | 0% | Mints and burns its stablecoin up to a large ceiling (around 500 million) |
| Morpho Blue | 0% | Free flash loans of pooled assets via a singleton callback |
| dYdX | Retired | Ended after the 2023 to 2024 move to a Cosmos app-chain |
Most users never touch these contracts directly. Aggregators such as DeFi Saver and Instadapp wrap flash loans into point-and-click actions, routing to whichever venue is cheapest for a given asset and bundling the surrounding steps. That is how an ordinary borrower can, for example, swap the collateral behind an Aave position without first finding the cash to unwind it.
What Flash Loans Are Actually Good For
Strip away the headlines and flash loans are, most of the time, a plumbing upgrade. They let anyone execute a multi-step financial operation that would otherwise require either a large balance sheet or several transactions and the risk that prices move in between. The most common honest uses cluster into a handful of patterns.
| Use case | What happens in one transaction | What it replaces |
|---|---|---|
| Arbitrage | Borrow, buy where cheap, sell where dear, repay, keep the spread | Needing large capital to profit from small price gaps |
| Collateral swap | Flash-borrow to repay a loan, withdraw one collateral, deposit another, reopen | Selling into cash and re-buying, exposed to price moves |
| Debt refinancing | Move a loan from one protocol to another with a better rate | Closing a position and reopening it elsewhere |
| Self-liquidation | Close your own underwater position before a bot does | Paying a liquidator’s 5% to 15% penalty |
| Leverage looping | Build a levered position in a single step instead of many | Dozens of manual deposit-and-borrow rounds |
Arbitrage is the oldest use. If ETH trades cheaper on one venue than another, an arbitrageur can flash-borrow, buy low, sell high, repay, and pocket the difference, all without owning the ETH in the first place. This is not a loophole; it is the mechanism that keeps prices consistent across a fragmented market. Collateral swaps and refinancing are quieter but just as useful: a borrower who wants to change the asset backing a loan, or chase a lower rate on another protocol, can do it in one atomic step instead of unwinding a position and rebuilding it while the market shifts around them.
A concrete example shows how thin the honest margins usually are. Say a stablecoin briefly trades at $0.995 on one venue and $1.000 on another. An arbitrageur can flash-borrow several million dollars of the cheaper side, sell it into the richer pool, repay the loan, and capture roughly half a cent per dollar, minus the flash loan fee and gas. On a five million dollar loan that is a few thousand dollars of profit for a few seconds of work, and the act of doing it nudges the two prices back together. Multiply that across thousands of pairs and venues and you have described a large part of what keeps DeFi prices coherent, all funded by money the arbitrageur never actually had.
Self-liquidation is the one that most directly puts money back in ordinary users’ pockets. If your position is about to be seized by a liquidator who will take a penalty of several percent, you can instead flash-borrow the amount you owe, close the position yourself, and keep the bonus that would have gone to a stranger. It is a small thing, but it captures the spirit of the tool: flash loans let a person with a good idea act like they have a bank behind them.
The Liquidation Engine Runs on Flash Loans
Flash loans do more than help individuals; they hold the whole lending system together. When a borrower’s collateral falls too far, someone has to step in, repay the bad debt, and take the discounted collateral before the position goes underwater. Those someones are keeper bots, and most of them do not hold inventory. They flash-borrow the asset needed to repay the loan, seize the collateral at a discount, sell it, repay the flash loan, and keep the spread, all in one transaction with none of their own capital at risk.
This is why on-chain lending can stay solvent without a central risk desk. Because anyone with code can fund a liquidation through a flash loan, the pool of potential liquidators is effectively everyone, which keeps underwater positions from lingering. The same technique a professional keeper uses to protect a protocol is available to a hobbyist, and the competition between them is what makes liquidations fast and cheap. It is worth holding onto this point, because the exact machinery that keeps the system honest is also what an attacker reaches for first.
The same dynamic connects flash loans to the wider world of maximal extractable value, or MEV. Searchers who compete to capture profitable ordering opportunities, from liquidations to arbitrage to more predatory sandwich trades, lean on flash loans to size their positions far beyond their own balances, then bid for block position to make sure their bundle lands first. In that sense a flash loan is a force multiplier for whoever is fastest and most sophisticated, honest searcher and attacker alike. It lowers the capital barrier to participation and raises the technical one, concentrating the rewards among those who can write and optimize the code.
The Dark Side: Why Every Big Exploit Has a Flash Loan in It
Here is the single most important thing to understand about flash loans, and the point most headlines get wrong: a flash loan is almost never the vulnerability. It is the amplifier. Nearly every attack people call a “flash loan attack” is really an exploit of some other flaw, a manipulable price feed, a governance system that counts votes badly, an accounting function that can be tricked, that happens to require a very large temporary position to pull off. Before flash loans, exploiting such a flaw meant being a whale. After flash loans, it means being a competent programmer.
That is the uncomfortable symmetry at the heart of the tool. The same feature that democratizes arbitrage democratizes attacks. A weakness that would have sat dormant because no honest actor had a spare hundred million dollars becomes reachable by anyone who can borrow that sum for a single block and give it back at the end. Security firm Consensys Diligence found that flash loan and price manipulation attacks were the most frequent category in the first quarter of 2026, appearing in at least ten separate incidents and making up roughly a fifth of all cases. Cumulative losses tied to the technique now run past $500 million since 2020. The recurrence is its own kind of pattern, much like the way bridge hacks keep repeating year after year, and to see why flash loans keep showing up, it helps to walk through the cases that defined the technique.
bZx, 2020: The First Weaponized Flash Loan
The template was set in February 2020, when the lending protocol bZx was hit twice in the space of days. The attacker took a flash loan of 10,000 ETH from dYdX and used part of it to trade through a thinly traded decentralized exchange, spiking the price of a wrapped Bitcoin token to roughly three times its real value. Because bZx read that manipulated on-chain price as its oracle, it let the attacker borrow against wildly inflated collateral. Repeated on a second market days later, the two attacks netted around $954,000, as chronicled in CoinDesk’s contemporaneous account.
By later standards the sums were small, but the lesson was enormous: never use a spot price you can move as your only source of truth. bZx taught an entire industry that a decentralized exchange’s instantaneous price is not an oracle, it is a number an attacker with enough capital can set, and flash loans meant that capital was now free. The scramble to adopt time-weighted average prices and decentralized oracle networks that followed traces directly back to these two nights.
Beanstalk, 2022: When the Vote Was for Sale
If bZx was about prices, Beanstalk was about power. In April 2022, an attacker drained roughly $182 million from the Beanstalk stablecoin protocol, keeping about $80 million after costs, in what remains the cleanest example of a flash-loan governance attack (Halborn). The setup was patient. The attacker first submitted two governance proposals: a visible one donating $250,000 to a Ukraine relief address, which looked like the whole story, and a second one, sitting quietly beside it, that actually transferred the protocol’s assets to the attacker.
The execution took a single transaction. The attacker flash-borrowed more than a billion dollars from Aave, Uniswap, and SushiSwap, used it to acquire a two-thirds supermajority of Beanstalk’s governance token, and called a function named emergencyCommit that let a supermajority execute a proposal immediately, bypassing the normal waiting period. The malicious proposal passed and drained the treasury; the flash loan was repaid; the borrowed voting power evaporated, all before the transaction closed. The flaw was that Beanstalk measured voting power at the instant of the vote rather than from a fixed point in the past. The fix, adopted across DeFi governance since, is to snapshot voting power at an earlier block and to force timelocks between a vote and its execution, so borrowed tokens cannot buy a majority that exists for one block. It is the same principle that makes account-level composability safe elsewhere; our look at what happens when deposit addresses run code covers how atomic, multi-step transactions are becoming normal for ordinary users, not just attackers.
Euler, 2023: A $197M Bug, Then an Apology
The March 2023 attack on Euler Finance showed that flash loans could amplify a subtle logic bug just as easily as a price or a vote. The vulnerability lived in a function called donateToReserves, which let a user donate funds without triggering the health check that normally protects the protocol. The attacker used flash loans to build a large leveraged position, donated in a way that pushed their own account into an artificial bad-debt state, then triggered the protocol’s own liquidation logic to seize collateral without carrying the matching liability. The total came to about $197 million, the largest DeFi hack of that year, detailed by Chainalysis.
Then something unusual happened. Over the following weeks, the Euler team negotiated in public, offering the attacker a bounty to keep a share and threatening a reward for information that would identify them. The attacker, who signed messages as Jacob, returned essentially all of the funds. It was a reminder that on-chain theft is uniquely reversible in one narrow sense: the money sits at public addresses, in full view, and moving it out through exchanges is hard when the whole world is watching. Euler survived and later rebuilt around modular vaults. Not every protocol gets that ending, which is exactly why audits and monitoring matter so much.
2026: The Same Playbook, New Names
Six years after bZx, the pattern has not changed; only the target has. In July 2026, Summer Finance’s Lazy Summer Protocol was drained through its accounting rather than its prices. The attacker had quietly accumulated a position in one of the protocol’s yield vaults and donated it to a contract in a way that inflated the value the protocol assigned to each share. They then took a $65.4 million flash loan, deposited $64.8 million, and redeemed $70.9 million against the manipulated share price, netting roughly $6 million. Auditor CertiK summarized the mechanism bluntly, saying the “attacker was able to redeem $70.9M following a $64.8M deposit thanks to manipulation of FleetCommander’s accounting,” per The Block. Monitoring firms Blockaid and Cyvers flagged the breach in real time.
Summer Finance was not alone. Earlier in the year, other protocols were hit by variations on the same idea, using borrowed capital to bypass a supply cap or trip an accounting rule. The vulnerability keeps migrating, from oracles to governance to share math, but the amplifier stays constant.
| Incident | Date | Loss | What the flash loan amplified |
|---|---|---|---|
| bZx (Fulcrum) | Feb 2020 | ~$954K | Spot-price oracle manipulation |
| Beanstalk | Apr 2022 | ~$182M | Instantaneous governance voting power |
| Euler Finance | Mar 2023 | ~$197M (returned) | A donation function that skipped health checks |
| Summer Finance | Jul 2026 | ~$6M | Vault share-accounting manipulation |
It is worth separating this class of event from the year’s largest disaster. The roughly $292 million KelpDAO exploit that saddled Aave with around $200 million in bad debt was a cross-chain bridge failure, not a flash loan attack; borrowed capital played no part in the theft itself. We cover that episode and its audit failures in our account of the $292M Kelp DAO hack. The distinction matters, because the defenses are different, and conflating them leads protocols to solve the wrong problem.
Zoom out and the numbers put flash loans in proportion. Cross-chain bridges alone have lost on the order of $2.8 billion since 2021, a figure the XRP Ledger proposal cited when it argued for closing the door on composable exploits, and total DeFi losses run to several billions more. Flash-loan-amplified attacks are a meaningful slice of that total rather than the whole of it, which is the point: they are one weapon in a large arsenal, effective precisely because they turn any latent pricing, governance, or accounting bug into something a lone coder can monetize in a single block.
How Protocols Defend Against Flash-Loan Attacks
The wrong instinct is to try to block flash loans. They are too useful, too deeply embedded, and in most designs impossible to distinguish from legitimate composability. The right instinct is to build every contract as if an attacker already has infinite capital for one block, because on Ethereum they effectively do. In practice that comes down to a few disciplines.
The first is oracles. Protocols learned from bZx to stop reading a single manipulable price and to rely on time-weighted averages and decentralized feeds instead. The opposite failure is just as dangerous, though: a price that is hardcoded or stale cannot be manipulated, but it also cannot be trusted. Omer Goldberg, chief executive of the risk firm Chaos Labs, has warned repeatedly about the latter, noting after one 2026 depeg that a token “oracle is hardcoded and thus never repriced,” leaving collateral marked at $1.13 while it traded near $0.63 on the open market (The Defiant). Good oracle design threads the needle between the two.
The second is governance. After Beanstalk, serious protocols snapshot voting power from a past block and impose timelocks, so a flash-borrowed majority cannot execute anything before it has to be repaid. The third is accounting: invariant checks, reentrancy guards, and share math that cannot be moved by a donation, which is precisely what Euler and Summer Finance failed to get right. The fourth is monitoring, with firms like Blockaid, Cyvers, and Hypernative watching for the signature shape of an attack. And running underneath all of it is auditing, though as the Kelp episode showed, an audit that checks code line by line can still miss an economic or configuration flaw, which is why the strongest teams pair audits with continuous risk assessment rather than treating a clean report as a finish line.
Can You Just Ban Them? The XRP Ledger Bet
Some chains have concluded the whole category is not worth the risk. In the spring of 2026, as the XRP Ledger community debated adding a more capable automated market maker, a draft amendment argued that the design should keep flash loan attacks off the chain entirely. Its security-considerations section put it flatly: “Flash loan attacks are structurally impossible. XRPL transactions are atomic without composable intra-transaction calls,” as reported by CoinDesk. The claim is true, and it reveals the trade-off precisely.
Flash loans require exactly the thing the XRP Ledger refuses to allow: arbitrary, composable calls to other contracts inside a single transaction. Take that away and flash loans become impossible, but so does much of what makes Ethereum-style DeFi work in the first place. It is not a bug fix; it is a different philosophy about what a transaction should be allowed to do. Ethereum is moving in the opposite direction. Standards like EIP-7702 and account abstraction are making atomic, multi-step transactions normal for ordinary wallets, not just for developers and attackers. You cannot fully embrace composability and also forbid flash loans, because at the level of the virtual machine they are the same capability wearing different clothes.
Flash Loans, the SEC, and the Law
A flash loan is not a security, and neither is the software that offers one. In the United States, the current Securities and Exchange Commission under chair Paul Atkins has leaned toward treating self-custody and permissionless protocols as software rather than regulated intermediaries, part of a broader push its leadership has branded around clearer crypto rules (SEC). A DeFi lending protocol is not a bank; deposits are not insured, and there is no federal backstop if a pool takes on bad debt.
That permissiveness has a limit, and it falls on conduct rather than code. Using a flash loan to manipulate a market or drain a protocol is not shielded by the fact that the transaction was technically valid. US prosecutors have treated oracle and market manipulation as wire fraud and commodities fraud, and the argument that “the code allowed it” has not worked as a defense. The line is the same one that governs markets everywhere: borrowing money is legal, and lying to a machine to move a price so you can profit from it is not.
The macro backdrop shapes the honest side of the ledger too. Arbitrage exists because prices diverge, and prices diverge more when rates move. The Federal Reserve’s September decision to raise its target range to 3.75% to 4%, which we covered in our read on crypto after the Fed hike, resets the risk-free rate that every arbitrageur measures against. When on-chain yields and off-chain rates fall out of line, flash-loan arbitrage is one of the mechanisms that drags them back together, quietly, block by block, for a fee of a few thousand dollars and the cost of gas.
Frequently Asked Questions
What is a flash loan in simple terms?
A flash loan lets you borrow crypto with no collateral, as long as you pay it back within the same blockchain transaction. If you cannot return the amount plus a small fee before the transaction ends, the whole thing is cancelled automatically, so the lender never risks losing money.
Are flash loans legal?
Yes. Flash loans are a normal feature of DeFi protocols such as Aave and Balancer, and they are widely used for arbitrage, refinancing, and liquidations. What can be illegal is using a flash loan to manipulate a market or drain a protocol, which prosecutors have charged as fraud rather than treating the borrowing itself as the crime.
How much does a flash loan cost?
The main cost is a protocol fee plus Ethereum gas. Aave has charged about 0.09% of the amount borrowed, while Balancer and Maker charge nothing, and Uniswap flash swaps cost the pool’s normal trading fee. You pay gas whether or not the transaction succeeds.
Can an ordinary person take a flash loan?
Not directly from a wallet. A flash loan has to be requested by a smart contract that borrows, uses, and repays the funds in one transaction, so you either need to deploy code or use a tool such as DeFi Saver or Instadapp that wraps the logic for you.
Why are flash loans used in so many hacks?
Flash loans do not create bugs; they remove the need for capital to exploit them. Any weakness that requires briefly controlling a huge position, such as moving a price, buying a governance majority, or breaking an accounting rule, becomes reachable by anyone who can write the code, which is why flash loans appear in a large share of DeFi exploits.
Written by Yuki Tanaka, senior on-chain markets writer at HOGE Wire.