Learn
 / 
Advanced
checkCircle
Expert verified
6 min read

Flash Loans: What Are They & How Do They Work?

Flash Loans: What Are They & How Do They Work?
Flash Loans: What Are They & How Do They Work?
info
Our Editorial Standards:
Our content is designed to educate the 500,000+ crypto investors who use the CoinLedger platform. Though our articles are for informational purposes only, they are written in accordance with the latest guidelines from tax agencies around the world and reviewed by certified tax professionals before publication. Learn More
on this page
close

Key takeaways

  • Flash loans let you borrow crypto instantly, execute a strategy, and repay it all within a single blockchain transaction, with no collateral or credit check required.
  • Executing a flash loan requires advanced coding knowledge and a deep understanding of smart contracts, making them inaccessible for most beginners.
  • Flash loan hacks have drained over $1.8 billion from DeFi protocols since 2020, mostly exploiting smaller projects, not established platforms like Aave.
Flash loans let you borrow and repay crypto within a single instant

What is a flash loan?

A flash loan is an uncollateralized loan that must be borrowed and repaid within a single blockchain transaction, with no credit check required.

Flash loans are a type of loan in decentralized finance (DeFi). Unlike traditional loans, you don't need to post any collateral. Instead, you're required to show through code what you plan to do with the loan and how you plan to instantly pay it back.

Flash loans are sometimes called "atomic" transactions. That means the transaction either completes entirely or it never happens at all. If any step fails or you can't repay the borrowed amount, the entire transaction automatically reverts, as if the loan never existed.

How do flash loans work?

Here's a simplified version of how flash loans work.

The three steps of a flash loan: borrow, execute, and repay
  1. You borrow funds from a lending protocol like Aave by calling a smart contract function.
  2. You execute your strategy through a series of sub-transactions (trades, swaps, or other DeFi operations) coded into your smart contract.
  3. You repay the loan plus a small fee (typically 0.05% of the borrowed amount on Aave).
  4. The blockchain validates that you've repaid everything within the same transaction block and approves the transaction.

If step 3 doesn't happen successfully and you're unable to immediately repay the loan, the blockchain rejects the entire transaction. The borrowed funds return to the lending pool as if nothing occurred.

While failed flash loans don't leave you with debt, you still pay gas fees for a failed transaction. This means experimenting with flash loans can get expensive.

How do I get started with flash loans?

Flash loans require significant blockchain knowledge and coding ability:

  • Smart contract development skills: You need to write code to define what you plan to do with your flash loan (transaction logic).
  • Blockchain infrastructure knowledge: To get started, you should understand gas fee optimization, transaction simulation, and EVM (Ethereum Virtual Machine) mechanics.

If you're new to crypto, it's recommended to stay away from flash loans. They can be difficult to execute with limited technical knowledge.

It's also important to note that many flash loan tutorials aimed at beginners are actually scams. Users have reported tutorials containing malicious contracts that can drain your wallet. Do your research before interacting with any flash loan platform or tutorial.

How to avoid flash loan scams

If you do decide to explore flash loans, keep these tips in mind:

  • Use official documentation only: Always start from official platform docs, like Aave's developer portal or Uniswap's documentation. Don't follow YouTube tutorials or GitHub repos from unknown sources.
  • Check third-party reviews: Before using any flash loan platform or tutorial, verify it on forums like Reddit's r/DeFi and check for recent exploit reports.
  • Simulate before deploying: Use testnets (Sepolia, Goerli) to test your flash loan logic before executing on mainnet. A logic error doesn't just fail, it costs you gas fees.
  • Avoid "flash loan" apps and websites targeting retail users: Legitimate flash loans require smart contracts and are executed on-chain through DeFi protocols like Aave or Uniswap. There is no mobile app or website that can offer you a flash loan as a simple retail product. Any platform marketing flash loans to non-technical users as a way to "make fast money" is a scam.

Other uses for flash loans

Arbitrage is the most popular use case, but flash loans are also used for several other DeFi strategies.

Liquidations: When a DeFi position falls below its required collateral ratio, anyone can use a flash loan to trigger the liquidation and collect the liquidation bonus. Protocol liquidators use this strategy regularly on platforms like Aave and Compound.

Collateral swapping: You can swap the collateral backing your DeFi loan (for example, replacing ETH collateral with USDC) in a single transaction, without first unwinding the loan. This lets you rebalance your position quickly without extra risk.

Self-liquidation: If your own DeFi position is becoming undercollateralized, you can use a flash loan to close it yourself rather than waiting for a third party to liquidate it at a worse rate.

Best flash loan platforms

Here are some popular platforms you can use to take out a flash loan.

  • Aave: Aave is one of the most popular lending protocols built on Ethereum. Aave V4 launched on Ethereum mainnet in March 2026, introducing a hub-and-spoke liquidity architecture across multiple asset tiers.
  • Equalizer Finance: Equalizer Finance supports flash loans on multiple chains, including Ethereum, Binance Smart Chain, Optimism, and Polygon.
  • Uniswap: The world's biggest decentralized exchange also supports flash loans.
  • DeFi Saver: Take out flash loans using a drag-and-drop recipe interface, with no coding required.

What are the benefits of flash loans?

Flash loans offer several advantages over traditional loans.

No collateral required: With flash loans, there is no need to post any collateral for your transaction.

Low cost: Flash loans are typically less expensive than traditional loans because they don't require middlemen like underwriters and loan agents. Aave charges a flash loan fee as low as 0.05%.

No credit score required: Unlike traditional loans, flash loans do not require any kind of credit check. DeFi platforms don't ask for your identity before giving out a flash loan.

However, it's important to note that flash loans are relatively complex and not accessible for beginners.

What happens if I can't pay back a flash loan?

If you can't pay back a flash loan, you won't receive the loan in the first place.

Remember, flash loans only execute if the loan can be paid off after you make your transactions. If you can't generate a profit, the loan will not execute.

How to make money with flash loans

Traders often make money on flash loans through crypto arbitrage, or in other words, taking advantage of different prices on different exchanges. Let's walk through a simplified example.

Example:

Sarah takes a $100,000 USDC flash loan from Aave (fee: $50, or 0.05%).

ETH is priced at $2,000 on Uniswap and $2,007.50 on a second exchange.

She uses the loan to buy 50 ETH on Uniswap at $2,000 each, then immediately sells all 50 ETH at $2,007.50 each.

Gross profit: $375. Minus the $50 Aave fee and approximately $40 in gas fees: Net profit: $285.

However, the example above doesn't reflect real-world competition. Automated bots (sometimes called MEV bots) scan for the same arbitrage opportunities continuously. By the time most manual traders spot a price gap, the bots have already closed it.

In most cases, you'll need a deep understanding of arbitrage and smart contracts to make a profit with flash loans.

Should I use flash loans?

Flash loans are not for beginners.

Executing a flash loan profitably requires Solidity coding skills, a strong grasp of EVM mechanics, and the ability to simulate and test transactions before deploying on mainnet. Missing any of these means paying gas fees and watching the transaction revert.

Most individual traders cannot realistically profit from flash loan arbitrage. MEV bots execute the same strategies faster and with lower costs. The edge largely belongs to developers building automated systems.

If you're looking to explore crypto arbitrage without writing smart contracts, simpler options include centralized exchange arbitrage or DeFi yield strategies that don't require custom contract development.

Are flash loans illegal?

Flash loans are completely legal.

However, criminals have used flash loans as a source of capital to take advantage of bugs in smart contracts. That's why the FBI issued a warning about cyber criminals using flash loans.

Can flash loans be used for hacks?

Flash loans themselves aren't the problem. Vulnerabilities in poorly audited smart contracts are the problem. Flash loans simply provide the capital to exploit them at scale.

In one of the largest known flash loan exploits, hackers drained $197 million from Euler Finance in March 2023. Since 2020, flash loan attacks have resulted in over $1.8 billion in total losses across the DeFi ecosystem, according to blockchain security firm CertiK.

Established protocols like Aave and Compound have significantly strengthened their defenses. Most recent exploits target newer, less-audited projects.

You should avoid using flash loans for illegal activities, as it could lead to jail time.

Can I do a flash loan without coding?

Platforms like DeFi Saver and Furucombo let you build flash loan transactions using a drag-and-drop interface, with no coding required.

Alternatively, check out the official Aave V3 flash loan documentation to learn how to get started with coding flash loans directly.

As noted earlier, some flash loan platforms and tutorials aimed at beginners are scams that can drain your wallet. Do your research before interacting with any flash loan provider.

Are crypto loans taxable?

Generally speaking, loans are not taxable.

However, any profits you make on cryptocurrency flash loans are subject to capital gains tax.

For more information, check out our guide to cryptocurrency loan taxes.

Looking to track your DeFi transactions and file your crypto taxes? Try CoinLedger, the platform that makes crypto tax reporting stress-free.

CoinLedger serves more than 700,000 crypto investors across the globe. With integrations with hundreds of exchanges and blockchains, you can generate a comprehensive tax report in just minutes!

Get started with a free CoinLedger account today.

Frequently asked questions

  • Are flash loans risky?
    MinuPlus
  • Do flash loans still work?
    MinuPlus
  • How long does a flash loan last?
    MinuPlus
  • Do you have to pay back a flash loan?
    MinuPlus
  • What is the fee for a flash loan?
    MinuPlus
  • Is flash loan arbitrage still profitable?
    MinuPlus
  • MinuPlus
  • MinuPlus
  • MinuPlus
  • MinuPlus
  • MinuPlus
  • MinuPlus
...
Track your crypto portfolio for free.
Track your crypto portfolio for free.
Claim your free preview tax report.

Join 500,000 people tracking their gains and losses with CoinLedger.

Join 500,000 people tracking their gains and losses with CoinLedger.

Join 500,000 people instantly calculating their crypto taxes with CoinLedger.

How we reviewed this article

Edited By
Sources

All CoinLedger articles go through a rigorous review process before publication. Learn more about the CoinLedger Editorial Process.

Dhiraj Nallapaneni
Written by:
Dhiraj Nallapaneni
Crypto Tax Writer

Dhiraj Nallapaneni is a Crypto Tax Writer at CoinLedger. As an Economics degree holder from the University of California Santa Barbara, he’s well versed in topics like cryptocurrency markets and taxation.

About the Author

CoinLedger has strict sourcing guidelines for our content. Our content is based on direct interviews with tax experts, guidance from tax agencies, and articles from reputable news outlets.

KNOWLEDGE BASE

Demystify Crypto Taxes

The Ultimate Crypto Tax Guide (2026)

This guide breaks down everything you need to know about cryptocurrency taxes, from the high level tax implications to the actual crypto tax forms you need to fill out.

Crypto taxes overview
howToHandleCryptocurency
Crypto Tax Rates 2026: Complete Breakdown

Here’s how much tax you'll be paying on your income from Bitcoin, Ethereum, and other cryptocurrencies.

Crypto tax rates
howToReportCryyptoLosses
How Crypto Losses Can Reduce Your Taxes

Crypto and bitcoin losses need to be reported on your taxes. However, they can also save you money.

How crypto losses lower your taxes
calculatorellipseellipse

Calculate Your Crypto Taxes

  • Check
    No credit card needed
  • Check
    Instant tax forms
  • Check
    No obligations
Get Started For Free
percent
Jump to
list