Flash Loan Definition in Crypto

A flash loan is a short-lived, uncollateralized crypto loan that starts and ends inside a single blockchain transaction. Smart contracts handle the process from approval to repayment. If the borrowed amount plus the fee is not paid back within that same transaction, the whole thing is canceled, and the chain behaves as if nothing happened. This setup makes default basically impossible because repayment is a condition for the transaction to finalize. Sources at the end.

How a flash loan works

  1. A user or bot calls a flash-loan function on a DeFi protocol that holds a liquidity pool.
  2. The smart contract lends the assets, runs the user’s steps in the same transaction, then checks repayment with fees.
  3. If the repayment checks out, the transaction gets confirmed. If not, the transaction reverts, and no funds move.

Because everything is wrapped into one transaction, the timing is tight. Networks finalize blocks in seconds, and the loan must be repaid before finalization, or it is rolled back by design.

Typical use cases

  • Arbitrage: Borrow temporarily to buy an asset where it is cheaper and sell where it is pricier. Profits remain after the loan and fees are repaid in the same transaction.
  • Liquidations: Provide funds to liquidate under-collateralized positions on lending platforms, then repay the loan and keep the liquidation bonus.
  • Collateral swaps and debt moves: Replace one form of collateral with another or move a position between protocols without first closing it out.
  • Creating a temporary leveraged position: Momentarily scale trade size for a specific on-chain strategy, settle, then repay.

Fees and access

Flash loans usually charge a small fee on top of the borrowed amount. Access comes through DeFi protocols that expose flash-loan functions backed by on-chain liquidity pools. There is no credit check or posted collateral because the smart contract handles repayment within the transaction itself.

Risks and known attack patterns

Flash loans are powerful but also add pressure on protocol design. Attackers have used them to quickly borrow large sums and exploit weak points in DeFi apps. A common theme is manipulating prices that a protocol trusts, for example, an unsafe price oracle, to trigger bad trades or faulty liquidations. Robust smart-contract logic, safer oracle designs, and thorough audits help reduce these risks, but any bug can be amplified by the speed and size a flash loan enables.

How flash loans differ from traditional loans

Traditional loans last from months to years, need collateral or credit checks, and rely on legal contracts. Flash loans are enforced by code, need no collateral, and either fully succeed within one transaction or fully fail. Repayment happens immediately, including fees, and there is no concept of partial default inside the chain’s final state.