{
  "id": "146afebc-822a-51f1-ac98-40e709dacadb",
  "slug": "flash-loan",
  "term": "Flash Loan",
  "aliases": [],
  "category": "Crypto & Digital Assets",
  "category_slug": "crypto-digital-assets",
  "difficulty": "advanced",
  "definition": "A flash loan is an uncollateralized loan executed within a single blockchain transaction that must be borrowed and fully repaid (with fees) within the same transaction block; if the repayment condition is not met, the entire transaction is atomically reverted as if it never occurred, eliminating traditional credit risk for the lending protocol. Flash loans are unique to decentralized finance (DeFi) and exploit the atomic composability of smart contract execution on programmable blockchains.",
  "key_takeaways": [
    "Flash loans require zero collateral because atomicity ensures the loan is always repaid within the same transaction—if any step fails, the entire transaction reverts, leaving the lending pool unaffected.",
    "Primary legitimate use cases include arbitrage between decentralized exchanges (DEXs), collateral swaps in lending protocols, self-liquidation of undercollateralized positions, and complex multi-protocol yield optimization strategies.",
    "Flash loans have been weaponized in several high-profile DeFi exploits: attackers borrow large sums, manipulate oracle prices or liquidity pool balances, extract protocol funds, and repay the loan—all within a single transaction block, netting millions of dollars.",
    "The size of flash loans is limited only by the liquidity available in the lending pool; on Aave (the largest flash loan provider), flash loans have reached hundreds of millions of dollars in a single transaction.",
    "Flash loan fees are typically minimal (e.g., 0.09% on Aave), making even tiny arbitrage spreads economically viable at scale, and their existence is often cited as evidence that DeFi markets can achieve efficient price discovery through arbitrage."
  ],
  "detailed_explanation": "Flash loans represent one of the most intellectually novel financial primitives introduced by decentralized finance, with no analog in traditional financial markets. The concept is made possible by a combination of blockchain-specific properties: the atomic execution of smart contract transactions (where either all operations in a transaction succeed or all are reverted), the composability of DeFi protocols (allowing multiple protocol interactions within a single transaction), and the absence of counterparty identity requirements inherent in permissionless blockchain systems.\n\nIn a traditional lending transaction, a borrower must provide collateral, undergo credit assessment, and wait for settlement—processes that take minutes to days. Flash loans bypass all of these requirements by enforcing repayment through code rather than law. The lending smart contract releases funds at the beginning of the transaction, the borrower's code executes a series of arbitrary operations using those funds, and the contract verifies that the loan plus fees have been returned before the transaction is finalized. If the final balance check fails, the EVM (Ethereum Virtual Machine) reverts the entire state change to its pre-transaction state, ensuring the lending pool is never at risk.\n\nAave Protocol, launched in 2020, popularized flash loans as a named, accessible feature. Compound, dYdX, and Uniswap V3 offer similar mechanics. The use case that initially excited the DeFi community was arbitrage: if the price of ETH on Uniswap is $1,800 but $1,820 on SushiSwap, a trader can flash-borrow $1 million in USDC from Aave, buy ETH on Uniswap, sell it on SushiSwap, profit from the $20 spread, repay Aave's $900 fee, and pocket the remainder—all atomically, without ever risking personal capital beyond gas fees.\n\nHowever, the dark side of flash loans emerged rapidly. The bZx protocol was attacked twice in February 2020 in what became the first major flash loan exploits: an attacker borrowed ETH via flash loan, used it to manipulate prices on Uniswap (a low-liquidity reference price used by bZx's oracle), took a leveraged short position on bZx that became immediately profitable due to the manipulated price, and unwound the entire sequence profitably within a single transaction. Subsequent attacks on protocols including Harvest Finance, Value DeFi, Cream Finance, and Pancake Bunny followed similar patterns, collectively resulting in hundreds of millions of dollars in losses and demonstrating that oracle security and price manipulation resistance are existential design requirements for DeFi protocols.\n\nFrom a hedge fund perspective, flash loan mechanics are relevant in several contexts. Quantitative traders with DeFi exposure analyze flash loan arbitrage activity as a signal of cross-exchange price efficiency and liquidity fragmentation. Risk managers at crypto-native hedge funds model flash loan attack vectors when assessing smart contract risk of DeFi protocol investments. Governance token holders in DeFi protocols must consider flash loan governance attacks—where an attacker borrows governance tokens, votes on a malicious proposal in a single transaction, and returns the tokens—as a genuine governance risk requiring time-locks and other protective mechanisms.",
  "example": "In October 2020, the Harvest Finance DeFi protocol suffered a flash loan attack that resulted in losses of approximately $34 million. The attacker borrowed $50 million in USDC and $11.5 million in USDT from the Curve Finance stablecoin pool using flash loans from Uniswap. Using these funds, the attacker repeatedly traded USDC for USDT in the Curve Y pool, temporarily imbalancing the pool and depressing the USDC price as measured by Harvest's USDC/USDT price oracle. With USDC artificially cheapened, the attacker deposited USDC into Harvest's fUSDC vault at the manipulated lower price, then reversed the Curve trades to normalize prices, withdrew from the fUSDC vault at the restored higher price, and pocketed the difference. The flash loans were repaid within the same transaction. The attacker repeated this cycle 17 times within a 7-minute window, draining $34 million from Harvest's yield farming vaults before returning the flash-borrowed funds to Uniswap.",
  "formula": "Flash Loan Profit = (Arbitrage Gain or Exploit Proceeds) − Flash Loan Fee − Gas Costs",
  "formula_latex": null,
  "interactive_type": "model",
  "calculator_id": null,
  "related_terms": [
    "arbitrage",
    "blockchain",
    "credit-risk",
    "ethereum",
    "exchange",
    "hedge-fund",
    "liquidity",
    "nft-non-fungible-token",
    "perpetual-swap",
    "settlement",
    "smart-contract",
    "stablecoin",
    "yield",
    "yield-farming"
  ],
  "backlinks": [
    "defi-decentralized-finance",
    "ethereum",
    "layer-2-protocol",
    "smart-contract",
    "yield-farming"
  ],
  "cross_references": [
    "arbitrage",
    "blockchain",
    "credit-risk",
    "ethereum",
    "exchange",
    "hedge-fund",
    "liquidity",
    "settlement",
    "smart-contract",
    "stablecoin",
    "yield",
    "yield-farming"
  ],
  "tags": [
    "level:advanced",
    "cat:crypto-digital-assets"
  ],
  "asset_classes": [
    "crypto"
  ],
  "regulators": [],
  "see_also": [],
  "sources": [],
  "wordcount": 895,
  "checksum": "205ed4a55114da67",
  "version": "2026.05.03",
  "license": "CC-BY-4.0",
  "updated_at": "2026-09-07T02:15:24+00:00",
  "_links": {
    "self": "https://hedgefund.wiki/api/v1/terms/flash-loan",
    "jsonld": "https://hedgefund.wiki/api/v1/terms/flash-loan?format=jsonld",
    "markdown": "https://hedgefund.wiki/api/v1/terms/flash-loan?format=md",
    "graph": "https://hedgefund.wiki/api/v1/graph/flash-loan",
    "category": "https://hedgefund.wiki/api/v1/categories/crypto-digital-assets",
    "schema": "https://hedgefund.wiki/schema/term.schema.json",
    "html": "https://hedgefund.wiki/#/terms/flash-loan"
  }
}