What Happens If One Leg of an Atomic Swap Fails?

If one leg of an atomic swap fails (e.g. due to insufficient gas, an expired time lock, or a contract error), the entire transaction is reverted to its original state. The funds remain in their original wallets or are returned to the sender after the time lock expires.

This is the core guarantee of atomicity: no party is left with a partial or incomplete trade, eliminating counterparty default risk.

How Does a ‘State Root’ in Ethereum Compare to the Merkle Root in Bitcoin?
How Does the Blockchain Ensure the Atomicity of a Complex Transaction?
How Does the Liquidation Risk in the Futures Leg of a Basis Trade Impact the Strategy?
What Happens If the Interactions Step Fails?
What Is the Defense against a Read-Only Reentrancy Attack?
How Is the ‘K’ Constant Maintained When a Trade Occurs in the Pool?
What Is the Difference between Require() and Checking the Call Return Value?
What Is the Fundamental Security Mechanism That Prevents Flash Loan Abuse in a General Sense?

Glossar