downandout 74 days ago | parent | favorite | on: Ethereum 2.0 launches
They are primarily used for arbitrage transactions. Token swaps on decentralized exchanges are instant - there is no order book. So you can compose a single transaction that involves many exchanges, swaps involving different tokens, flash loans, etc. If the transaction ends with a profit after the loan is paid back, at the market prices that exist at the time the transaction is executed, the flash loan occurs, and profits are collected by the person that created the transaction. If it does not end with a profit, then the transaction is reverted as if it never existed.