Flash Loan
Definition
An uncollateralized loan that must be borrowed and repaid within a single blockchain transaction. If the repayment fails, the entire transaction reverts as if it never happened.
Flash loans are one of DeFi's most innovative and controversial primitives. They allow anyone to borrow millions of dollars worth of cryptocurrency with zero collateral, as long as they repay the loan within the same transaction. If repayment fails, the blockchain automatically reverts the entire transaction — the lender never loses funds.
This is possible because blockchain transactions are atomic — they either complete entirely or revert entirely. A flash loan transaction contains multiple steps: borrow funds, use them for arbitrage or other operations, then repay. If any step fails, everything unwinds. The lender's risk is effectively zero because default is technically impossible.
Legitimate flash loan uses include: arbitrage (exploiting price differences across exchanges), collateral swaps (replacing one type of collateral with another without closing a position), self-liquidation (repaying debt to avoid liquidation penalties), and interest rate refinancing.
Flash loan attacks are more widely known. Attackers use flash loans to temporarily manipulate prices, exploit oracle vulnerabilities, or drain liquidity from vulnerable protocols. Major attacks have stolen millions by borrowing large amounts, manipulating a price feed, and exploiting a protocol that relied on that feed — all in a single transaction.
Flash loan providers like Aave and dYdX charge a small fee (typically 0.09% of the borrowed amount). The technical barrier is high — executing a flash loan requires writing smart contract code that orchestrates all the steps within a single transaction. Flash loan aggregators like Furucombo have attempted to make them more accessible through visual interfaces.
Where this appears in Clarity
Clarity automatically tracks and calculates these concepts across your connected accounts.
Related Terms
Frequently Asked Questions
Can I use flash loans to make money?
Flash loans are technically complex and competitive. Simple arbitrage opportunities are captured by bots within milliseconds. Profitable flash loan strategies require deep technical knowledge, understanding of DeFi protocol mechanics, and competition against sophisticated MEV bots. They're not a beginner-friendly way to earn money.
Are flash loan attacks illegal?
The legality is unclear and jurisdiction-dependent. Some flash loan 'attacks' exploit coding vulnerabilities rather than violate laws. The Mango Markets exploiter was convicted of fraud in 2024, establishing some legal precedent. The distinction between legitimate arbitrage and market manipulation is evolving.
