---
title: "What is a flash loan attack? Definition and examples"
description: "A flash loan attack uses a large uncollateralized loan, borrowed and repaid within one blockchain transaction, to manipulate prices or exploit a flaw in a…"
canonical: "https://finic.ai/glossary/flash-loan-attack"
last-updated: "2026-12-03"
---

# What is a flash loan attack?

A flash loan attack uses a large uncollateralized loan, borrowed and repaid within one blockchain transaction, to manipulate prices or exploit a flaw in a DeFi protocol for profit.

Also called: flash loan exploit

## What a flash loan is

Some [DeFi](https://finic.ai/glossary/defi) protocols offer flash loans: anyone can borrow a large amount with no collateral, as long as the loan is repaid in the same transaction. If it is not repaid, the whole transaction fails and nothing happens. Flash loans have honest uses, such as moving a position between protocols or trading on price gaps.

## How the attack works

The flash loan is usually not the flaw itself. It gives an attacker huge, brief buying power to exploit a weakness elsewhere. A common pattern is price manipulation: the attacker uses borrowed funds to move the price in a thin liquidity pool, then uses that false price to borrow or withdraw too much from a protocol that trusts the pool as a price source.

Other attacks use the borrowed funds to gain voting power in governance for a moment, or to trigger a bug in a [smart contract](https://finic.ai/glossary/smart-contract). The attacker repays the loan at the end of the transaction and keeps the profit.

## Why it matters

Flash loans mean that an attacker does not need their own capital to exploit a bug. Any weakness that would be profitable with a large balance is open to anyone. Because everything happens in one transaction, there is no time to react while it is in progress.

## How protocols defend against it

- Use price feeds that are hard to move in one transaction, such as time-weighted prices or multiple sources.
- Do not let voting power or limits depend on balances held for only one block.
- Get independent code audits and test against extreme market conditions.
- Add limits and pauses for unusually large or fast changes.

## Related terms

- [Decentralized finance (DeFi)](https://finic.ai/glossary/defi.md): Decentralized finance (DeFi) is financial services such as trading, lending and borrowing that run as smart contracts on a blockchain instead of through a bank or broker.
- [Smart contract](https://finic.ai/glossary/smart-contract.md): A smart contract is a program stored on a blockchain that runs automatically when called, holding and moving assets according to its code.
- [Maximal extractable value (MEV)](https://finic.ai/glossary/mev.md): Maximal extractable value is the profit that can be made by choosing which transactions go into a block and in what order, beyond the normal fees and rewards.
- [Cross-chain bridge](https://finic.ai/glossary/cross-chain-bridge.md): A cross-chain bridge moves tokens or data between separate blockchains, usually by locking assets on one chain and issuing matching tokens on another, which makes it a large target for attackers.
- [Rug pull](https://finic.ai/glossary/rug-pull.md): A rug pull is a crypto scam in which the creators of a token or project attract investors' funds and then take those funds and disappear.
