An atomic swap is a smart-contract-based mechanism that allows two parties to exchange cryptocurrencies directly with each otheroften across different blockchains or different assets on the same chainwithout using a trusted intermediary or centralized exchange. The swap is “atomic”: it either completes in full for both sides or fails entirely.
Most atomic swaps are implemented using hashed timelock contracts (HTLCs), which ensure that if one party does not fulfill their part of the deal within a set time, the other party automatically gets their funds back.

