πŸš€ Premium Banner Placement β€” Reach 100K+ daily crypto readersAdvertise with us β†’
LIVE
BTCβ€”ETHβ€”SOLβ€”BNBβ€”XRPβ€”ADAβ€”AVAXβ€”DOGEβ€”LINKβ€”DOTβ€”MATICβ€”ATOMβ€”LTCβ€”TRXβ€”TONβ€”BTCβ€”ETHβ€”SOLβ€”BNBβ€”XRPβ€”ADAβ€”AVAXβ€”DOGEβ€”LINKβ€”DOTβ€”MATICβ€”ATOMβ€”LTCβ€”TRXβ€”TONβ€”
β€”β–²0.0%
DeFi

What Is a Flash Loan in DeFi?

4 min readGuide
What Is a Flash Loan in DeFi?

A flash loan is a loan with no collateral and no credit check that must be borrowed and repaid inside a single blockchain transaction. If it is not paid back by the end of that transaction, the whole thing is cancelled as though it never happened. That is why the lender can hand over millions to a stranger: not because it trusts you, but because the rules of the blockchain make an unpaid flash loan impossible.

How can a loan with no collateral be safe?

Because a transaction on Ethereum is all-or-nothing. Everything inside it either succeeds together or is undone together. Imagine a shop that lets you walk out with a diamond, but the door simply will not open unless you have paid by the time you reach it. The borrow, whatever you do with the money, and the repayment are all steps in one transaction. Miss the repayment and every step is reversed, so the lender ends up exactly where it started.

What are they actually used for?

Aave popularised them and still charges a small fee on each one. The honest uses are mostly plumbing:

  • Arbitrage. If a token is cheaper on one exchange than another, a flash loan funds the buy and the sell in one go, and the difference is the profit.
  • Swapping collateral. Someone who has borrowed against ether can use a flash loan to repay the debt, switch the collateral to another asset, and reopen the position, without finding the cash first.
  • Refinancing. Moving a loan from one protocol to another to get a better rate, in one step.

Why do flash loans show up in hack headlines?

Because they give an attacker temporary firepower. Borrow enough of a token, push its price around on a thin market, and a badly built protocol that reads that price may be tricked into paying out. The loan was never the flaw; it just made an existing flaw cheap to exploit.

One thing to be clear about: a flash loan is not something you take out in a wallet app. It requires writing and deploying a smart contract, and anyone offering to arrange one for you is selling something. If you want to understand where the borrowed money comes from, start with liquidity pools.

← All guides