Blog » Finance » What Are Crypto Flash Loans (And Why They Drained $197 Million in One Transaction)
› what-are-crypto-flash-loans

What Are Crypto Flash Loans (And Why They Drained $197 Million in One Transaction)

Table of Contents

What Is a Flash Loan in Crypto?

I first heard about crypto flash loans while watching the Euler Finance exploit unfold in March 2023. Someone had just borrowed $197 million, used it to drain a protocol, and repaid the “loan”—all in a single transaction lasting about 12 seconds. My portfolio took a hit that day, and I sat there thinking: how is this even possible?

Flash loans are one of the weirdest innovations in decentralized finance. They let you borrow millions of dollars with zero collateral. No credit check. No application. No waiting period. The catch? You must repay everything—plus fees—within the same blockchain transaction. Miss that deadline, and the entire thing unwinds like it never happened.

This isn’t a bug. It’s a feature built on smart contracts that execute automatically. According to Chainlink’s flash loan documentation, these loans leverage the atomic nature of blockchain transactions—meaning either everything succeeds, or nothing does.

The Basics: Borrow, Use, Repay—All in One Transaction

Think of a flash loan like a time loop in a heist movie. You borrow the money, execute your plan, and return it before anyone notices it was gone. On Ethereum, this all happens within a single block (roughly 12 seconds). But here’s the twist: inside that block, your transaction contains multiple operations that execute in sequence.

If the final step—repaying the loan—fails for any reason, the blockchain automatically reverses every previous step. It’s like the loan never existed. This atomic property makes flash loans unique to crypto. In traditional finance, this kind of instant, uncollateralized borrowing is simply impossible.

How Flash Loans Differ from Traditional Loans

Traditional Loan: Credit check → Collateral → Approval → Days/weeks to fund → Months/years to repay

Flash Loan: No credit → No collateral → Instant fund → Repay in same transaction (~12 seconds) → Or it never happened

Banks would laugh you out of the building if you asked for this deal. But in DeFi, the smart contract doesn’t care who you are. It only cares whether you can repay within the transaction. This democratization of capital access is revolutionary—and as we’ll see, it comes with serious risks.

How Do Flash Loans Work? (The 3-Step Process)

Flash loans follow a strict sequence that happens atomically inside liquidity pools. Miss one step, and the whole thing evaporates.

Hyperliquid Exchange

Trade on the #1 DEX — No KYC. No middleman.

Get a 4% discount on your first $25M in volume.

Start Trading on Hyperliquid →

Step 1: Borrow from a Liquidity Pool

You initiate a flash loan by calling a smart contract function on platforms like Aave, Balancer, or Uniswap. The protocol’s liquidity pool instantly sends you the requested amount—could be $500, could be $50 million. No questions asked.

Step 2: Execute Your Strategy (Arbitrage, Liquidation, or Attack)

This is where the magic (or mayhem) happens. Within the same transaction, you use those borrowed funds for your intended purpose. Maybe you’re exploiting a price difference between two exchanges. Maybe you’re liquidating someone’s underwater position. Or maybe—if you’re a bad actor—you’re manipulating an oracle to drain a protocol.

Step 3: Repay + Fees or Transaction Reverts

Before the transaction completes, you must return the borrowed amount plus fees. Aave charges 0.09%. Balancer charges nothing. If you can’t repay, the blockchain treats the entire transaction as if it never occurred. You can’t default—but you also can’t profit without a solid strategy.

Real-World Example: A trading bot borrows $500,000 USDC via flash loan → buys ETH at $2,000 on Uniswap → sells at $2,010 on SushiSwap → repays loan + $450 fee → pockets ~$4,550 profit. All in one transaction.

Legitimate Use Cases for Flash Loans

Despite the headlines about exploits, flash loans serve real purposes in keeping DeFi markets efficient. Understanding these use cases helped me see past the fear when I started tracking DeFi yield farming strategies more seriously.

Arbitrage Trading Across DEXs

This is the most common legitimate use. Price differences between exchanges create profit opportunities. Without flash loans, you’d need significant capital to exploit these gaps. With flash loans, anyone can capture these opportunities—though competition from sophisticated bots is intense.

Collateral Swapping and Refinancing

Say you have ETH locked as collateral on Aave, but you want to switch to stETH for better yields. Normally, you’d need to repay your loan, unlock collateral, swap, and re-deposit. Flash loans let you do all this in one transaction—saving gas and avoiding liquidation risk during the swap.

Liquidations in Lending Protocols

When borrowers become undercollateralized, liquidators swoop in to close their positions. Flash loans enable anyone to participate as a liquidator, even without upfront capital. This keeps lending protocols healthy and creates income opportunities for technically skilled users.

The Dark Side: How Flash Loans Enable DeFi Attacks

Here’s where my cynicism kicks in. I’ve watched too many protocols—including one I was invested in—get drained by flash loan attacks. The numbers are sobering.

According to recent security research, 83.3% of eligible DeFi exploits in 2024 used flash loans as part of their attack vector. We’ve seen largest flash loan attacks in crypto history drain hundreds of millions.

Flash Loan Attack Examples That Shocked DeFi

  • Euler Finance ($197M, March 2023): The largest flash loan attack ever. Exploited a vulnerability in the donation function.
  • Beanstalk ($182M, April 2022): Governance manipulation using flash-loaned voting power.
  • Cream Finance ($130M, October 2021): Oracle manipulation combined with flash loan leverage.
  • KiloEx ($7M, March 2025): Recent example showing these attacks continue.
  • Radiant Capital ($4.5M, January 2024): Price oracle manipulation on a lending protocol.

In 2025 alone, the crypto industry has seen $1.7 billion in losses from hacks—surpassing the $1.49 billion lost in all of 2024. Flash loans amplify the damage potential dramatically.

How Attackers Manipulate Protocols

The typical flash loan attack follows a pattern. First, borrow massive amounts via flash loan. Second, use that capital to manipulate an oracle or exploit faulty smart contract logic. Third, drain protocol funds. Fourth, repay the loan and pocket the difference.

“Flash loan attacks are as preventable as any other attack vector. Developers must go through various security audits and take into account flash loans as an attack vector when writing the code.”
— Ren Yu Kong, Blockworks Research Analyst

What’s frustrating is that these attacks often exploit known vulnerability patterns. According to security analysis from Hacken, up to 70% of high-value DeFi hacks in 2021 were enabled or amplified by flash loans. The mechanisms are documented in the OWASP Smart Contract Security Top 10.

This is why I’ve become obsessive about checking whether protocols I invest in have addressed flash loan vulnerabilities in their audits. Understanding MEV (Maximal Extractable Value) helps too—flash loans and MEV exploitation often go hand in hand.

Top Platforms Offering Flash Loans

If you’re a developer interested in flash loans for legitimate purposes, here’s where to find them. If you want to understand the technical implementation, QuickNode’s developer guide is a solid starting point.

Aave: The Market Leader

Aave dominates the flash loan space with $5-10 billion in available liquidity across 30+ tokens. Their 0.09% fee is reasonable for the access you get. Aave V3 improved gas efficiency and added cross-chain capabilities.

dYdX, Balancer, and Uniswap V4

  • dYdX: Formerly offered 0% fee flash loans, but discontinued new flash loans in November 2021. Their V4 focuses on perpetual futures.
  • Balancer: 0% flash loan fees, though lower liquidity than Aave.
  • Uniswap V4: The new singleton architecture achieves 99% cost reduction through “flash accounting”—essentially zero-cost flash operations.
Platform Fee Liquidity Best For
Aave V3 0.09% $5-10B Most use cases
Balancer 0% ~$1B Cost-sensitive arbitrage
Uniswap V4 ~0% $3B+ Flash accounting ops

The Risks Every Crypto User Should Know

Before you get excited about borrowing millions, let me give you the reality check I wish I’d heard earlier.

Smart Contract Vulnerabilities

Writing flash loan transactions requires advanced Solidity knowledge. One bug in your code could mean losing everything—not just failing to profit, but potentially losing gas fees on failed transactions. Make sure you can spot malicious protocols before interacting with any DeFi platform.

Regulatory Gray Zone

Flash loans exist in regulatory limbo. The US and EU are exploring “safe harbor” frameworks for neutral DeFi tools, but nothing is settled. Using flash loans for arbitrage is legal—using them to exploit protocols sits in murky territory.

Why You Probably Shouldn’t Use Flash Loans (Yet)

Here’s my honest take: unless you’re a developer with smart contract skills or have access to sophisticated trading bots, flash loans aren’t for you. Gas fees on Ethereum mainnet can eat profits. Competition from professional arbitrage bots is brutal. The risk of costly mistakes is high.

Instead, focus on understanding flash loans for defensive purposes. When you research DeFi protocols thoroughly, check if their audits specifically address flash loan attack vectors. That knowledge protects your investments.

Flash Loans in 2025: What’s Next?

Layer 2 solutions are making flash loans cheaper and faster. Arbitrum, Optimism, and Base all support flash loan operations at a fraction of mainnet gas costs. This accessibility is expanding who can participate—for better or worse.

Cross-chain flash loans are emerging, allowing borrowed funds to move across different blockchains within a single atomic transaction. Imagine borrowing on Ethereum, executing on Arbitrum, and settling on Base. We’re not fully there yet, but the infrastructure is building.

Security is improving too. More protocols now design their oracles and governance systems with flash loan resistance built in. Time-weighted average prices (TWAPs), multi-block delays on governance votes, and sophisticated audit requirements are becoming standard.

Should You Care About Flash Loans?

After watching flash loans evolve from cool innovation to billion-dollar exploit mechanism, here’s my breakdown:

  • DeFi Users: Understand flash loans for security awareness. Check protocol audits for flash loan resistance.
  • Developers: Critical knowledge. Flash loan vulnerability is now a standard audit checklist item.
  • Traders: Legitimate arbitrage opportunity if you have technical skills and fast bots.
  • Regular Investors: Focus on choosing protocols that take flash loan security seriously.

Flash loans represent DeFi’s double-edged nature perfectly. The same atomic transaction property that enables permissionless capital access also enables permissionless exploitation. The technology itself is neutral—it’s how we use and defend against it that matters.

If you’re diving deeper into DeFi security, start by understanding how liquidity pools work and why smart contracts are the backbone of everything happening in decentralized finance. The more you understand the building blocks, the better you’ll spot both opportunities and red flags.

Frequently Asked Questions

Can anyone use flash loans?

Technically yes, but practically no. Flash loans require coding smart contract interactions or using specialized bots. Most retail investors don’t have the technical skills needed.

Are flash loans illegal?

Flash loans themselves are legal. Using them for arbitrage is legitimate. Using them to exploit protocol vulnerabilities exists in legal gray area—several attackers have faced prosecution.

How much can you borrow with a flash loan?

Whatever the liquidity pool holds. On Aave, this can mean billions in available capital. The only limit is the protocol’s total liquidity in that asset.

Can flash loans be used on Bitcoin?

No. Flash loans require smart contract functionality. Bitcoin’s scripting language doesn’t support the complex transaction logic needed. They’re primarily an Ethereum and EVM-chain phenomenon.

What happens if I can’t repay a flash loan?

The entire transaction reverts automatically. It’s like it never happened. You’ll lose the gas fee for the failed transaction, but you can’t actually default on the loan itself.

author avatar
Alexa Velin
I'm Alexa Velinxs, a finance writer and market analyst passionate about demystifying investing for everyday people. Drawing from years of trading experience and community education, I share practical insights on risk management, portfolio strategy, and financial independence. When I'm not analyzing charts, you'll find me exploring market trends and connecting with our growing community of thoughtful investors.
Related Posts