Transaction Atomicity Risks
Transaction atomicity risks arise from the assumption that all parts of a transaction will succeed or fail together. While the Ethereum Virtual Machine guarantees this for a single transaction, complex interactions across multiple protocols can still lead to partial failures.
If a contract relies on the success of an external protocol's call, it must handle cases where that call reverts or behaves unexpectedly. Failure to properly account for atomicity can leave a contract in an inconsistent state, where funds are moved but records are not updated.
This is a common source of bugs in complex DeFi composability. Developers must implement robust error handling to maintain system integrity during multi-step operations.