paint-brush
Qtum Atomic Swaps — Zero Value UTXOsby@michielmulders
356 reads
356 reads

Qtum Atomic Swaps — Zero Value UTXOs

by Michiel MuldersJanuary 9th, 2019
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

<strong>TLDR;</strong> Today’s article is dedicated to Atomic swap technology, a smart contract that allows to directly exchange one type of crypto asset with another without the assistance of a mutually trusted intermediary party. Today as well, Qtum deployed atomic swap technology on their mainnet.

Companies Mentioned

Mention Thumbnail
Mention Thumbnail

Coin Mentioned

Mention Thumbnail
featured image - Qtum Atomic Swaps — Zero Value UTXOs
Michiel Mulders HackerNoon profile picture

TLDR; Today’s article is dedicated to Atomic swap technology, a smart contract that allows to directly exchange one type of crypto asset with another without the assistance of a mutually trusted intermediary party. Today as well, Qtum deployed atomic swap technology on their mainnet.

Use Case; Imagine Alice wants to exchange her QTUM into BTC. Lucky for her, Bob is looking to buy QTUM. However, as the QTUM and Bitcoin blockchain are not related to each other, either party can cheat and just disappear with the funds.

Before the introduction of Atomic Swap technology, you could find many escrow offers on the famous BitcoinTalk forum from third parties who acted as a mean of trust between Alice and Bob. Again, trust issues could arise with the escrow agent, so the best solution was to reveal their identities one way or another which affects their privacy.

Time-locked smart contract; Therefore, Atomic Swap technology is created to solve the above issue. Basically, a time-locked smart contract is created that allows both parties to deposit their corresponding funds.

The contract contains an output that is spendable by either party, but the rules required for redemption are different for each party involved.

Under the hood; One party generates a secret and pays the intended trade amount into a contract transaction. The contract output can be redeemed by the second party as long as the secret is known. If a period of time (typically 48 hours) expires after the contract transaction has been mined but has not been redeemed by the participant, the contract output can be refunded back to the initiator’s wallet. If both deposits are successful, the tokens will be swapped and anonymity is maintained.

Qtum Deploying Atomic Swaps; Blockchain platform Qtum is introducing Bitcoin (BTC) atomic swaps to its mainnet infrastructure, according to a press release shared on Jan. 9. This development will allow users to swap QTUM into BTC without any meditating third party. Qtum used a fork of Decred’s code to accomplish this. The code was initially intended for Decred to perform cross-chain atomic swaps between Decred and various other cryptocurrencies.

Zero Value UTXOs

In brief, Qtum is working on a draft to allow Person A to make a contract call without owning any Qtum. Doing so, this means that Person B is paying for the fees for the contract call transaction. This holds a lot of value as users are enabled to interact with Qtum DAPP’s without having to own QTUM. Added to that, Person A is still the owner of the transaction.

Tech Details; Sending a transaction while having 0 Qtum in your account is not possible as the transaction would never be broadcasted. Therefore, Qtum came up with a workaround where an external address is used that holds a bare minimum of Qtum to pay for the transaction fee. This address is added to the UTXO to cover for the transaction fees. It’s a simple solution, with a large impact. (Reference article by Alexis)

What is the importance of Atomic Swap technology?

Jordan Earls, Qtum co-founder and lead developer insisted on answering this question: “Third-party dependency in transactional scenarios presents a hurdle that slows us from achieving complete decentralization. Atomic swaps enable us to get past that barrier, while still maintaining a level of trust and fidelity that in some cases, may rival that of exchanges. This also means that users will have an easier time onboarding themselves to the Qtum mainnet, by way of using Atomic Swaps as a means to procure Qtum tokens.”

With atomic swaps you don’t need to go through middlemen in order to exchange different types of coins in a p2p manner. This is considered to be the future of decentralized exchanges and a crucial part of transactions in a “token world”.

It allows BTC holders to easily access and use dApps based on QTUM. Also, any coin that enables atomic swaps with Bitcoin will now be able to easily deploy atomic swaps with Qtum, thereby allowing its community same said access.

In short; Benefits:

  • Stimulate adoption and remove entry barriers for dapps users
  • No need to own Qtum in order to interact with DApps
  • Increase decentralization
  • Removal of middlemen
  • More privacy, lower cost

Further Reading Material

There’s a lot of information to be found about Atomic Swap technology, I’ve selected a few outstanding pieces:

  • Blockgeeks has created an in-depth article how Atomic Swaps work technically under the hood.
  • Source code Atomic Swap (Decred)