Jelly Swap Project Insight: A Cross-Chain Atomic Swap Protocol

The lack of interoperability between blockchains makes it cumbersome to swap assets in a decentralized manner across chains. The cross-chain Jelly Swap Dex has developed an innovative solution to the problem.

By
Ahamdi Abarikwu
on
March 19, 2021
Category:
Project Insight

Introduction

Decentralization started out as one of the significant ideologies behind cryptocurrencies. People yearned to have the freedom to choose what to do with their money without governments or anyone dictating to them how to go about it. Many people grumble about the awkward requirements of banks. Many desire to have a system where they can carry out their financial transactions while remaining anonymous. Therefore, it was not a big surprise that cryptocurrencies quickly caught the fancy of a lot of people and were adopted on a massive scale.

Yet, there was still a problem. In the early days of cryptocurrencies till recently, the exchanges that facilitated crypto transactions were fully centralized. Many exchanges demanded that users give up personal information to be able to make transactions. Most of them also required users to keep assets in their custody. The pesky middleman was still present in these centralized exchanges. They fell short of the expectations of decentralized finance.

Eventually, fully decentralized exchanges (Dex) that do not keep a user's assets or personal information etc evolved. They were only limited by the fact that they did not support interoperability between different blockchains. Thus, a user can only make conversions between tokens on the same blockchain. It was not possible to directly swap an Ethereum-based asset to one on the Tron blockchain within the same Dexfor example. Lack of interoperability between blockchains needed to be solved. Now, we finally have decentralized solutions that offer multiple cross-chain transactions.

What is Jelly Swap

Jelly Swap is a futuristic decentralized application that solves the interoperability problem in blockchain transactions. It makes swapping between different blockchains possible within one application. It does not keep users' assets in its custody and entirely does away with a middleman's need. A user deals directly with another user peer-to-peer, and the interface is so simple to use.

Jelly Swap is the brainchild of founders Tito Titov and Krasimir Raykov, who developed the DApp to provide a fully decentralized service. The public testnet was launched in November 2019 while the mainnet went live in January 2020.

What are the Features of Jelly Swap?

  • The app has a very easy-to-use interface. Simplicity is very essential for wide adoption of decentralized solutions.
  • It supports cross-chain swaps between multiple blockchains. The exchanges are executed quickly.
  • It is completely trustless. The transactions are done peer-to-peer.
  • It does not require a user's KYC and does not have custody of users' assets at any point during transaction.
  • It is ultra secure and protects users funds. Jelly has embedded mechanisms that eliminate the possibility of users losing their funds to fraudulent counterparts.
  • Jelly's smart contracts have been fully audited. The source codes are publicly available and verifiable.
  • It is fully decentralized.

How does Jelly Swap achieve all it promises?

That must be the question of many of us. Jelly Swap is free of unnecessary complications. It takes away the complexities of blockchain from users and handles it in the backend. To accomplish swaps between different blockchains, Jelly Swap uses two main mechanisms:

  1. Cross-chain Swap.

Things is the mechanism that enables transactions to be executed across different blockchains. It makes interoperability of blockchains possible.

  1. Atomic Swap.

The foundation on which Jelly Swap is built, is the Atomic Swap concept. Atomic swap technology enables assets to be exchanged peer-to-peer fairly without any party defrauding the other. It does this by putting a lock on the assets being transferred, and ensuring that neither the sender nor receiver can hold the two assets being exchanged at the same time. If the smart contract confirms that the terms of the deal have been met by both peers, the assets are then released to each party. If any of the parties does not meet the terms, the funds are returned to the sender.

Atomic Swap makes use of what is called Hashed Time Locked Contracts (HTLCs). HTLCs lock every swap transaction twice with a time function and a hash function. The two functions are explained as follows,

  • Time Lock Function

This function puts a time limit within which the receiver must claim the assets. If the receiver fails to claim the funds, the transaction is reversed, and the funds are returned to the sender.

  • Hash Lock Function

With each transaction, a secret key is created from the sender's side. This secret key is the only data that can unlock the transaction. From the secret key, a hash is generated, which secures the secret key. The receiver is now required to have access to the secret key to receive the assets. Let us consider a simple breakdown of the process.:

  1. Two users want to exchange assets on different blockchains, say, Ethereum and Bitcoin. The sender has ETH, and the receiver has BTC. The sender initiates a transaction and creates a secret key consisting of random characters.
  2. From the sender's secret key a hash is generated. The sender submits the transaction on the Ethereum blockchain. Then the HTLC mechanism locks the transaction with both the time function and hash function. The transaction is sent to the receiver's address.
  3. The sender submits the hash to the receiver, who then creates a counterpart time-locked transaction on the Bitcoin blockchain using the same hash.
  4. The sender unlocks the transaction sent by the receiver using the secret key. The secret key now becomes visible to the receiver and unlocks the sender's transaction.
  5. After the mutual unlocking, the smart contract then releases the assets to the respective parties' addresses.

Here is a step-by-step guide on how to make use of Jelly Swap. A video demonstration can also be seen here.

Jelly Swap's Use Cases

The greatest utility of Jelly Swap is its role as a bridge to different blockchains. It is now possible for a user to interface two otherwise mutually exclusive blockchains and carry out transactions such as swaps, lending services across them. Jelly Swap also has integrated gateways through which fiat-to-crypto conversions can be done.

Conclusion

Cryptocurrency through blockchain put back control of people's finances onto their hands. Despite that, the lack of interoperability between blockchains was a major issue. Through the use of cross swap and atomic swap mechanisms, Jelly Swap has provided a means for users to transact across different blockchains. This will go a long way in giving people access to the full benefits of decentralization.

For more information about Jelly Swap and the benefits derivable from its use, follow the project's media channels

Website

Medium

Twitter

Telegram

Facebook

Tags:
No items found.
Ahamdi Abarikwu

Ahamdi Abarikwu is an Electrical Engineer and a lover of anything crypto. He is also an avid writer, proofreader and editor. He loves to play Scrabble in his spare time.