Definition
A flash loan is a decentralized finance lending primitive that allows users to borrow assets without collateral, under the strict condition that the loan is repaid within the same atomic blockchain transaction. If the repayment plus any required fee does not occur by the end of that transaction, the entire transaction is reverted by the protocol, as if it never happened. This construct relies on the atomicity of smart contract execution to eliminate traditional credit risk, rather than on overcollateralization or off-chain enforcement. Flash loans are commonly implemented in lending protocols such as Aave and interact programmatically with other DeFi components.
Because flash loans execute within a single transaction, they are often used in complex sequences of on-chain operations that involve multiple protocols and liquidity sources. These operations can include interactions with a DEX, a liquidity pool, or an AMM, where temporarily borrowed capital is routed through different pricing environments. The design of flash loans makes them highly composable within DeFi, but also exposes them to protocol-level risks when smart contracts or pricing mechanisms are misconfigured or economically vulnerable. In such cases, flash loans can be used as a tool to exploit those vulnerabilities without requiring large amounts of upfront capital.
Context and Usage
In the broader DeFi ecosystem, flash loans function as a capital-efficient mechanism for temporarily accessing large liquidity pools without persistent leverage or long-term borrowing. They are tightly coupled with smart contract logic, which encodes the conditions under which the borrowed funds move between protocols and must be repaid. When integrated with AMM-based DEXs and other liquidity pool architectures, flash loans can influence on-chain pricing, pool balances, and the distribution of trading fees. These interactions can indirectly affect metrics such as impermanent loss for liquidity providers when large, transient trades rebalance pools.
Flash loans highlight the difference between traditional finance lending models and smart contract–native credit primitives. Instead of relying on identity, reputation, or collateral, they depend on deterministic execution guarantees provided by the underlying blockchain. Their existence is closely tied to the programmability and composability of DeFi protocols like Aave and on-chain exchanges, where multiple contracts can be orchestrated within a single transaction. As a concept, flash loans underscore how atomicity, liquidity aggregation, and automated market making combine to enable novel, transaction-bounded forms of credit in decentralized markets.