Last weekend I went to a crypto meetup where the topic was atomic swaps. Of course I had no idea what this was so I was totally intrigued.
Atomic swaps are basically a way for 2 parties to swap different cryptocurrencies on their own without the need for an exchange which we all know can come with high fees and wait times. The “swap” on the other hand can be done without the need of an exchange or miners being involved. This kind of swap also has no to low transaction fees and can be done on or off the blockchain. The basic idea is sort of like a 3-way handshake between both parties that want to set up a transaction between themselves. Once they decide what they want to trade, they set up a contract that cannot be broken and only completes when both parties get what they agreed to.
Right now the only catch of these transactions are that:
- Both currencies support HTLC
- Both have the same hashing algorithm
This transaction is possible through a process called Hashed Timelock Contracts(HTLCs). Both parties agree to predetermined contract that is set up for them to verify the transaction and trade their coins through a secret channel that only they have access to. A more detailed explanation can be found at Blockgeeks website.
I thought this was pretty cool because this a great way to get something that you want without going through a lot of hassle and paying a lot of money in fees. The technology is still fairly new but there have been successful swaps and I’m definitely looking forward to more news on swaps in the coming year.