Atomics Swaps in Nimera Blockchain 2.0

Nimera Blockchain brings Atomic Swap support to the ecosystem. Learn what Atomic Swaps are and how they work.
min to read
Back to the Blog

Sending assets from one blockchain to another directly is normally impossible. At least, it’s not possible in a trustless way. As a result, the cryptocurrency market is fragmented — centralized intermediaries are required to move funds from one network to the other. And that’s now what we want.

What are Atomic Swaps?

Atomic Swaps use Hash Timelock Contracts (HTLC) — a type of time-bound smart contract that requires both users participating in a transaction to acknowledge the receipt of funds. If both parties don’t confirm that the transaction is successful, the operation is reverted and funds return to original senders.

Atomic Swaps enable a cross-chain exchange of assets without intermediaries. In other words, without a centralized exchange. Thus, Atomic Swaps deliver on the true promise of cryptocurrency, making the market decentralized.

How do Atomic Swaps Work?

For example, imagine that two traders, Alice and Bob, want to exchange a token, based on NEO with a token, based on EOS.

Alice initiates his transaction on the NEO blockchain and generates a secret string. The created string is then used to generate a unique hash that is included in the transaction. On the other end, Bob sees Alice’s hash, initiates a transaction in the EOS blockchain with the same hash.

Alice and Bob then need to confirm the transaction by unlocking their respective funds using Alice’s secret. Unless they do it within a specified time-frame, the transactions will be deemed failed and funds will return to senders.

First, Alice sees the transaction from Bob and unlocks Bob’s funds using the secret that was generated earlier. Bob sees that Alice successfully unlocked his funds and unlocks Alice’s funds using the same secret, which Alice made public by unlocking Bob’s funds.

The image below shows how Atomic Swaps function:

Atomic Swaps enable cross-chain trustless exchange.

Learn more about Nimera Blockchain 2.0 on the website.

Like article? Tell your mates!
You've got the mail!
Currated selection of our posts one time per week
Thank you for your subscription!
Oops! Something went wrong. But don't worry, just try again!

Hungry for more awesome content?

What Is SEPA In Banking

What Is SEPA In Banking

If you've ever tried to make a bank transfer you probably have heard about SEPA at one point or another. But what exactly is it and when should you use it? Let's find out!
Ivan Skladchikov
Ivan Skladchikov
February 12, 2020
There are Mistakes You Must Avoid When Investing in Crypto. Here are 8 of Them

There are Mistakes You Must Avoid When Investing in Crypto. Here are 8 of Them

Cryptocurrency does not work like traditional cash, so if you want to invest, there are a few things to keep in mind. In this article, we will talk about the things you should know before buying Bitcoin.
Ivan Skladchikov
Ivan Skladchikov
August 9, 2020