Certified Crypto Market

Flash Loans Explained

A flash loan lets you borrow crypto with no collateral if you repay in the same transaction. Learn how flash loans work, legitimate uses and attack risks.

CCM ResearchCertified Crypto Market17 жовт. 2026 р.4 хв читання
Поширити в XLinkedIn

A flash loan is an uncollateralized crypto loan that must be borrowed and repaid within a single blockchain transaction; if the money plus any fee is not returned by the end of that transaction, the whole transaction is reversed as if it never happened. This makes it possible to borrow very large sums without collateral, for a few seconds, to perform actions such as arbitrage, refinancing or collateral swaps.

Flash loans are one of the clearest examples of something only possible in decentralized finance. They are useful tools for developers and are also famous for their role in many DeFi exploits. Understanding them helps you read DeFi news and assess protocol risk.

How a Flash Loan Works

On blockchains like Ethereum, a transaction is atomic: either every step succeeds, or none do. Flash loans rely on this property.

A typical flash loan transaction:

  1. 1Borrow. A smart contract requests a large amount of a token from a lending pool that offers flash loans.
  2. 2Use. Within the same transaction, the contract performs actions with the borrowed funds, such as swapping on several exchanges.
  3. 3Repay. The contract returns the borrowed amount plus a small fee to the pool.
  4. 4Check. The lending pool verifies it has been repaid. If not, the transaction fails and every step is reverted.

Because the borrower never has the funds outside that single transaction, the lender cannot lose its principal through default.

Aave helped popularize flash loans as a product feature in 2020, and several other protocols and DEXs offer similar functionality.

Legitimate Uses

UseHow a flash loan helps
ArbitrageBuy a token cheaply on one exchange and sell it higher on another without owning capital
Collateral swapReplace one type of collateral in a lending position with another in a single step
Debt refinancingMove a loan from one protocol to another with a better rate
Self-liquidationRepay debt and withdraw collateral to avoid a costly liquidation penalty
LiquidationsLiquidators borrow to repay underwater loans and collect the liquidation reward

Example: a collateral swap

Imagine you have ETH deposited as collateral and a stablecoin loan against it on a lending platform. You want to switch your collateral to a different asset without first repaying the loan from your own funds. A flash loan can borrow enough stablecoin to repay the debt, withdraw your ETH, swap it for the new asset, redeposit, borrow again and repay the flash loan, all in one transaction.

How Flash Loans Are Used in Attacks

Flash loans give anyone temporary access to huge capital. On their own they are harmless, but combined with a vulnerable protocol they can be devastating. Common patterns:

  1. 1Oracle manipulation. The attacker uses borrowed funds to move the price in a thin liquidity pool that a protocol uses as its price source, then borrows or liquidates against the false price. See oracle manipulation attacks in DeFi.
  2. 2Governance attacks. If voting power is based on tokens held at the moment of voting, an attacker can borrow tokens, vote and repay in one transaction. The Beanstalk protocol lost about $180 million in 2022 this way, when an attacker used flash-borrowed funds to pass a malicious proposal.
  3. 3Logic and rounding bugs. Large amounts make tiny calculation errors profitable.

Some of the first widely reported flash loan exploits targeted the bZx protocol in February 2020. Our article on flash loan attacks explained simply covers more examples.

How Protocols Defend Against Flash Loan Attacks

  • Robust oracles. Using decentralized oracle networks or time-weighted average prices instead of a single pool's spot price.
  • Snapshot-based voting. Measuring voting power at an earlier block, so tokens borrowed in the voting transaction do not count.
  • Timelocks on governance. Delaying execution of passed proposals so the community can react.
  • Audits and formal verification to catch logic errors.
  • Limits on single-transaction actions such as minting or borrowing caps.

What Flash Loans Mean for Ordinary Users

You are unlikely to take out a flash loan yourself, but they affect you indirectly:

  • Protocol risk. A protocol with a weak oracle or governance design can be drained by anyone, not just wealthy attackers. Check how a protocol prices assets before depositing.
  • Efficient markets. Arbitrage via flash loans helps keep prices aligned across DEXs.
  • Better tools. Some interfaces use flash loans to offer one-click collateral swaps or refinancing.

Common Misconceptions

  • "Flash loans are a hack." They are a legitimate feature; exploits come from flaws elsewhere.
  • "Flash loans create free money." They only make money if an opportunity exists; otherwise the transaction reverts and the borrower still pays gas.
  • "Banning flash loans would stop exploits." Wealthy attackers could perform many of the same attacks with their own capital. Fixing the underlying flaw is what matters.

Bottom line

A flash loan is a loan that exists only within a single transaction, made safe for the lender by the atomic nature of blockchains. It is a powerful tool for arbitrage, refinancing and collateral management, and a powerful amplifier for anyone exploiting a weak protocol. When you evaluate a DeFi protocol, ask how it prices assets and secures governance, because those are the doors flash loan attackers try first. Browse more in our DeFi articles.

Поширені запитання

What is a flash loan?

A flash loan is an uncollateralized loan in decentralized finance that must be borrowed and repaid within a single blockchain transaction. If the borrower does not repay the loan plus any fee by the end of the transaction, the entire transaction is reverted, as if it never happened.

Why don't flash loans need collateral?

Because the lender's risk is removed by the blockchain itself. All steps run inside one atomic transaction. If repayment fails, every step is undone, so the lender either gets its money back with a fee or the loan never happened.

Can beginners use flash loans?

Not easily. Flash loans normally require writing or using smart contracts that perform all steps in one transaction. Some tools offer flash-loan-powered features, such as collateral swaps, behind a simple interface, but understanding the risks is still important.

Are flash loans used for hacks?

Flash loans are often used in DeFi exploits because they give attackers large amounts of capital for a moment. The flash loan itself is not the vulnerability; it amplifies existing weaknesses such as manipulable price oracles or flawed governance designs.

Ця стаття має виключно освітній характер і не є фінансовою, юридичною чи податковою порадою. Криптовалюти волатильні, і ви можете втратити гроші. Перш ніж діяти, перевірте актуальні ціни та відомості про проєкт на сторінці кожної монети.