Alpha Factory
DeFi

Flash Loans

Menno van Ravels - Alpha Factory

By - 13 years in crypto, 3 bear markets survived, zero paid promotions

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

Speakable: TrueEntity: Verified

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%

Free account · no card

Save your coins, get price alerts and plan your exits

  • Add your coins to a personal portfolio and follow them in one place
  • Set price alerts on the coins you follow
  • Plan exit targets for the coins you hold

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

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.

Unlock Premium