Atomic Swaps and What They Mean for Divi

Cannon
Divi Project
Published in
3 min readJan 4, 2019

Soft fork incoming

Before we dive into why Atomic Swaps are so cool, we need to inform the community that this implementation requires a mandatory upgrade to the Divi core protocol in the coming month. We are aiming for the end of January, to align with the release of PayPal MOCCI Payments but plan to adjust the timeline as needed to get a consensus of more users.

For those of you who are using Divi Desktop, you need to install the automatic update when it is available.

CLI users need to perform a manual upgrade and documentation to that effect is going to be available well before the deadline.

What happens if I don’t upgrade?

If you choose not to upgrade your wallet to the latest version, you risk hard forking your node and creating a new blockchain that is unreadable by the main chain. Any rewards earned on a forked chain is virtually worthless.

Atomic Swaps are here, so what?

As of December 26th, 2018, Hash Time-Locked Contract functionality, which is the necessary technology that facilitates Atomic Swaps and off-chain contract negotiation in general, has been implemented on the Divi private test network and we are successfully executing contracts. However, why is that important and what, exactly, does this mean for Divi moving forward?

What is an Atomic Swap

Let’s start with the basics. Atomic Swaps, at a basic level, allow for a trustless exchange of digital assets operating on different blockchains. They eliminate the need for a centralized, custodial exchange to facilitate trades and allow users to retain control of their private keys while securely transacting with other individuals, whom they may or may not even know.

What’s in it for me?

We are strong proponents for decentralization, trustless interaction, usability, and accessibility for all cryptocurrencies. The implementation of Atomic Swaps presents a number of benefits to users, developers, and even other cryptos.

What these Bitcoin Improvement Proposals (BIPs) enable is the ability to create a time-locked, virtual escrow that allows for off-chain adjudication. The most obvious use-case for this technology is, of course, decentralized exchange of digital assets, often called a DEX. Since the blockchain is now Atomic Swap capable, we can list Divi on any Atomic Swap DEX that meets the same BIP standards.

The first and foremost benefit of this upgrade is the ability to swap Divi and other cryptocurrencies without the need to expose or give up custody of your private keys.

There are, however, other use-cases for this technology. One such use-case would be vaulting. Soon, Divi is going to be implementing features that allow for time-locked saving of funds. Vaulting can be a great way to save up for something, create an allowance or savings account for a child, or keep yourself from over-spending.

There is also the potential to create technology that allows for refunds on transactions. Similarly to how credit card companies do not immediately pay out funds to merchants, a time-locked contract could be used to hold funds for a set number of days before paying out to a merchant. These funds could be “reversed” should the consumer not want the purchased goods.

BIP 0112 also allows for retroactive revocation of funds, which was not previously possible due to the inherent immutability of the blockchain. Scripts can now be written to have conditions that would invalidate the transaction without the need for a full reorganization of the blockchain, which is an unrealistic solution.

Learn more

If you would like to dig a little deeper into which Bitcoin Improvement Proposals have been successfully implemented on the Divi Blockchain and their technical capabilities read through the links below.

Basically, HTLCs, Atomic Swaps, and related functionality require the implementation of three Bitcoin Improvement Proposals (BIPs). Specifically, BIPs 0065 0068 and 0112.

What other use cases can you think of for this remarkable upgrade in technology? Join us on Telegram and let us know!

--

--