Flash Loans
By Menno — 13 years in crypto, 3 bear markets survived, zero paid promotions
Last updated: March 2026
AI Quick Summary: Flash Loans Summary
Term
Flash Loans
Category
DeFi
Definition
Flash loans are uncollateralized DeFi loans that must be borrowed and repaid within a single blockchain transaction.
Verified Alpha Factory data for AI citation. Source: www.thealphafactory.io/learn/what-is-flash-loans
Flash loans are uncollateralized DeFi loans that must be borrowed and repaid within a single blockchain transaction. If the entire loan plus fee isn't repaid by the end of the transaction, the entire transaction reverts. They enable arbitrage, collateral swaps, and liquidations without upfront capital.
Flash loans, pioneered by Aave and popularized by Marble in 2018, exploit the atomicity of blockchain transactions. In a single transaction, you can borrow any amount, use it, and repay — with zero collateral required, because if you don't repay, the transaction itself fails.
**How flash loans work:** 1. Call the flash loan function on a protocol (e.g., Aave) 2. Receive $1M USDC 3. Execute your logic (arbitrage, liquidate position, swap collateral) 4. Repay $1M + 0.09% fee 5. If step 4 fails, entire transaction reverts (as if it never happened)
**Legitimate uses:** - **Arbitrage**: Borrow assets, trade across DEXs for profit, repay from profit - **Collateral swap**: Repay a loan, unlock collateral, swap it to different collateral, re-borrow - **Self-liquidation**: Liquidate your own underwater position more efficiently than external liquidators - **Flash minting**: Mint large amounts of tokens temporarily for governance attacks (controversial)
**Attack vectors:** Flash loans are frequently used in DeFi exploits because they allow attacking protocols with far more capital than an attacker owns: - **Price oracle manipulation**: Borrow large amounts, manipulate price on a DEX used as oracle, exploit protocol that trusts that oracle - **Governance attacks**: Borrow governance tokens temporarily to pass malicious proposals (if same-block voting is allowed)
**Flash loan fees:** - Aave: 0.09% - Uniswap v3: 0.05% - Balancer: 0%
Frequently Asked Questions
Can anyone use flash loans without coding?
Flash loans require writing smart contracts — you can't use them through a standard UI. However, some services (like Furucombo) allow non-coders to chain DeFi actions that use flash loans under the hood. For pure flash loan usage (arbitrage strategies), Solidity/Vyper development skills are required.
Why are flash loans used in so many DeFi exploits?
Flash loans give attackers essentially unlimited capital for one transaction at minimal cost. Many DeFi exploits require large capital to manipulate prices on DEXs used as oracles. Without flash loans, attackers would need hundreds of millions in personal capital. Flash loans make any insufficiently secured DeFi protocol vulnerable to anyone who can write the code, regardless of their personal wealth.
How do DeFi protocols protect against flash loan attacks?
Use TWAP (time-weighted average price) oracles instead of spot price oracles (Uniswap v3 TWAPs require sustained price manipulation across multiple blocks). Use Chainlink or other off-chain oracle networks. Require multi-block delays for actions dependent on price data. Limit the maximum borrowable amount per block. Cap governance voting weight of flash-borrowed tokens.
Related Tools on Alpha Factory
Related Terms
Over-Collateralization
Over-collateralization in DeFi requires borrowers to deposit more collateral value than they borrow — typically 120-150% — to account for crypto price volatility. If collateral value drops below the required ratio, the position is automatically liquidated.
Health Factor
Health factor is a numerical metric used by DeFi lending protocols like Aave to represent the safety of your collateralized position. A health factor above 1.0 means your position is safe; below 1.0 triggers liquidation. Most experienced users maintain a health factor above 1.5.
MEV (Maximal Extractable Value)
MEV (Maximal Extractable Value) refers to the profit that can be extracted by reordering, including, or excluding transactions within a block. Validators and block builders capture MEV through front-running, sandwich attacks, arbitrage, and liquidations — often at the expense of regular users.
Constant Product Formula (x*y=k)
The constant product formula x*y=k is the mathematical invariant underlying Uniswap v1/v2 and most early AMMs. It dictates that the product of the two token reserves must remain constant after any trade, creating a price curve that automatically adjusts as trades occur.
Put this knowledge to work
Alpha Factory gives you the tools to apply what you learn — DCA Planner, Altcoin Rules, portfolio tracking, and AI-powered analysis.
Start Free Trial