Smart contract systems allow users to swap their crypto assets known as atomic swaps. Assets present on two different blockchains can interchange without the requirement of a third party with the help of these smart contracts. The first ever atomic swap took place between Litecoin and Decred in 2017.
Atomic swaps help in the exchange of tokens without involving the exchanges. The coins can be exchanged with a single transaction by leveraging a system known as timelock contracts (HTCL). The advantage of using an atomic swap is to offer decentralization. Atomic swaps are conducted from one wallet to the other thereby making the entire process cheap and decentralized. It’s a peer to peer exchange.
These swap systems are highly secure and the use of HTCL assures both parties that the trades conducted are secure. If the trades do not go through, investors can even receive a refund. However, as secure and decentralized as the system is it also has a few drawbacks. Complexity and privacy issues are a few of them. These swaps could be insecure of the time spent on the chain and since it involves direct interaction between two parties there are chances that a privacy issue might arise. Transactions become attack prone the longer the time they spend over the network.