What Is an Atomic Transaction in the Context of Blockchain?
An atomic transaction, or atomic swap, is an operation where a series of actions must all be completed successfully, or none of them are. It's an "all-or-nothing" principle.
In the context of DeFi and flash loans, this means the borrowing, arbitrage trading, and loan repayment are all bundled into a single transaction. If any part of this sequence fails, for instance, if the arbitrage trade is not profitable, the entire transaction is reverted, and it's as if it never happened.