Flash-Loan-Mechanismus
Context
This figure appears in Section 3.7 'Flash Loans' and illustrates the atomic borrow-and-repay cycle that must complete within a single Ethereum transaction. Flash loans are one of Aave's most novel contributions to DeFi. The diagram shows the sequence from the initial call through the external contract execution and the final balance check.
What This Figure Shows
The Flash Loan workflow begins when a user calls flashLoan() on the LendingPool, specifying a reserve, amount, and the address of an external smart contract implementing IFlashLoanEnabledContract. LendingPoolCore transfers the requested funds to that external contract without requiring any upfront collateral. The external contract's executeOperation() function is then called, giving the borrower the opportunity to use the funds for any purpose — such as arbitrage, collateral swaps, or self-liquidation. After executeOperation() completes, LendingPool checks that the full borrowed amount plus a fee has been returned to the pool. If the balance is not restored, the entire transaction is atomically reverted, as if the loan never happened. The fee accrues to the reserve, benefiting depositors. Because Ethereum transactions are atomic, there is no credit risk: the loan either completes fully or is rolled back entirely.
Significance
Flash loans are a genuinely new financial primitive enabled by blockchain atomicity — they have no equivalent in traditional finance and cannot be built on non-programmable payment rails. They unlock capital-efficient strategies like arbitrage, self-collateral unwinding, and protocol migrations that previously required large upfront capital. The zero-collateral design is safe precisely because the atomicity guarantee of the EVM ensures funds are never actually at risk. This feature significantly expands Aave's utility to sophisticated DeFi users and protocols.