Borrow millions with zero collateral - repay in the same transaction or it never happened
| Borrow | 10,000 tokens |
| Buy ETH on DEX A | 5.0000 ETH |
| Sell ETH on DEX B | 10,250 tokens |
| Gross Arb Profit | 250.00 |
| Flash Loan Fee | -9.00 |
| Net Profit | 241.00 |
Flash loans exploit atomic transactions on blockchain. The entire operation (borrow + trade + repay) happens in a single transaction. If at any point the math doesn't work out (you can't repay), the entire transaction reverts as if it never happened.
No risk to the lender: Either they get repaid with fee, or the loan never existed. The borrower risks only the gas fee for a failed transaction.
The opportunity: Price differences between DEXs (arbitrage) can be exploited without any capital. Anyone with a smart contract can do it.