Flash loans are a powerful tool in Decentralized Finance (DeFi) that allow users to borrow millions of dollars in assets with **zero collateral**, under one condition: **the borrowed funds must be returned in the exact same blockchain transaction block.**
### The Single-Transaction Lifecycle
If the borrower fails to pay back the loan (plus fees) by the end of the transaction execution, the entire transaction reverts as if it never happened. This eliminates risk for the lender.
### The Manipulation Vector
Because attackers can access massive capital instantly, they use flash loans to manipulate DeFi platforms:
1. **Borrow:** The attacker takes a flash loan of 10,000,000 stablecoins.
2. **Slippage:** They dump the stablecoins into a low-liquidity pool, severely depressing the token’s price.
3. **Exploit:** A lending platform uses this single pool as its price source (**Price Oracle**). Because the oracle now registers the asset as cheap, the attacker buys or borrows other assets at an undervalued price.
4. **Repay:** They swap the assets back, repay the flash loan, and walk away with the arbitrage profit, leaving the lending pool drained.