JellySwap - Atomic Swap Cross-chain Exchange

Nick Sawinyh on 28 Apr 2020

JellySwap’s co-founder Tito about atomic swaps, JellySwap backstory and how’s multichain future could look like.

Hello! What’s your background, and what are you working on?

My name is Tito, and I am one of the founders of JellySwap. I have a technical and management background. I have completed a bachelor’s degree in computer science and a master’s in business administration. I’ve been working as a full-stack web developer for more than five years. In the last two years, I have been responsible for the biz dev, financials, and company product vision.

As a young, curious geek, I’ve always wanted to be up to date with the latest technology, and I used to find myself often in the middle of fruitful discussions with my colleagues at university. That’s how, at the beginning of 2017, together with a group of friends, I started to pay more attention to blockchain tech, bitcoin, and Ethereum in particular. As a next step we started trading some crypto and even initiated the development of small dApps based on Solidity. A few months later our CTO Krasimir Raykov and I founded a company and started working on outsourcing projects. But our main focus remained on a dream that we had - our own unique project - a blockchain agnostic dApp ecosystem for exchanges. We’ve always wanted to develop a trustless, secure, transparent, and autonomous system that gives equal rules to all the participants. That’s how we started working on JellySwap.

JellySwap is a cross-chain atomic swap protocol. Anyone can participate as a taker, a liquidity provider, or as a part of the dev-community behind the protocol. The uniqueness of our protocol is hidden in its simplicity, transparency, security, trustlessness, and cross-chain interoperability. We can say that JellySwap is the real Uniswap 2.0 - you can add liquidity to the protocol, earn profit from the trades, and exchange your assets for one another. But what takes us to a higher level is the ability to do all that not only for ETH<>ERC20 tokens, but also for BTC, AE, and other blockchains. Thus, we are striving to bridge the gap between BTC and Ethereum’s DeFi.

JellySwap is a whole ecosystem that consists of a few building blocks, each of which is a separate project by its own:

  • Set of Hash Time-Locked Contracts for the different blockchains
  • SDK for interactions with the protocol
  • Market Making Bot - Butler
  • Web interface for the end-users
  • Mobile application (under development)
  • Page with live statistics about the protocol activity

What’s Jelly Swap backstory?

Back in 2017, my close friend Krasi (later to become the CTO of JellySwap) and I went to a casual meeting to discuss the hottest technologies and latest trends in the software industry. We talked about AI, IoT, machine learning, and blockchain. We were already familiar with Bitcoin and how it works, but we were already feeling that something else is coming. Something new and big - programmable pieces of code living on the blockchain called smart contracts. They were built on a cutting edge network called Ethereum.

As software developers, we quickly realized the potential of Ethereum - transparent, trustless, immutable executable code that lives in a decentralized system. It was the solution to the biggest problems in human history - p2p value transfer and many other financial and government trust-related issues. The second significant point is that we felt this technology pretty straight forward, and the transition from web programming to this highly distributed and concurrency system was smooth. It made us feel even more confident that we can build lots of amazing projects on top of the ecosystem.

Last but not least, we understood something that may sound a little bit controversial. Most Ethereum builders and doers say that the technology is still too complicated, that we have to lower the barrier for the newcomers. But is that really true? Is it harder to connect your Metamask to any dApp rather than buy some expensive hardware for the latest IoT gadget or to set up plenty of configurations on your supercomputer to run some AI simulations? Is it more complicated to lend or borrow some DAI from Compound rather than open a bank account and wait a few days only to get 10x lower annual interest than the one that Compound and Aave offer in a few clicks?

Although it was back in 2017 when Compound, Aave, and Uniswap did not exist, we somehow knew that all these things would happen. We knew that we wanted to be part of this space, part of this new movement, new government and new finance. That’s how it all started and how we decided to spend the next decade working in this futuristic space.

From the beginning, we were interested in value transfer, staking, trading, and interconnectivity between the chains. And I think that was the right focus. Three years have passed, and these are still the main use cases of the Ethereum ecosystem. Now we call it DeFi. We always wanted to build a decentralized, trustless, secure, basically unstoppable trading platform. We have developed a DEX based on Ethereum similar to IDEX and most of the 0x-based ones, but with our smart contract logic and UI.

We had one concern that was keeping us awake during the nights - “Why is everything built on Ethereum, why someone is not building an interoperable DEX that connects all networks”. We wanted to do that - to solve the interoperability problem, to remove the centralized bridges, and we wanted it so bad.

We came up with a few ideas - to use mintable/burnable tokens on the different blockchains, to tokenize assets on the Ethereum blockchain, to use second layer solutions and side chains. There was one problem with all of the solutions mentioned above. In essence, they were so complicated and full of points of failure that it was almost impossible to build an efficient system (this may change in the future, but it is still valid for the current state of the technology). We wanted a real value transfer. I bet that you would also prefer a BTC on the BTC network rather than tokenized BTC on Ethereum or tokenized BTC on some sidechain.

How did we evaluate the idea? We pitch our deck in front of our first investors, and they enjoyed the idea of a DEX. However, there was one question at the end - “And.. what about Bitcoin?”. They wanted us to integrate bitcoin in the DEX as it is the most well-known cryptocurrency and the most desired trading asset. We have had that same question a thousand times after that. All our clients, supporters, friends, potential investors - they just wanted to buy or sell BTC, not only ETH and ERC20 tokens. The desire for a DEX that supports ETH<>BTC, BTC<>ERC20 was high, and all of our community surveys have proved it.

There is always this question about investments. Of course, we need investments to research and build all these protocols and applications. For that purpose, we found a Blockchain VCs that share our values. They have the same desire to bridge the blockchains and to support us in the hard path of building a multichain, unstoppable decentralized exchange. We have had two investors so far. The first of them is Aeternity Ventures - they are making a highly scalable blockchain and a whole ecosystem around it. The second investor that we had is based in Singapore and supports many of the top Ethereum projects. We have our headquarter in Singapore and a subsidiary company in Bulgaria. We are in preparation for our A round. Therefore new investors and collaborators are more than welcome.

What went into building the Jelly Swap?

We’ve been in this space since the beginning of 2017. We’ve built many dApps and a complex DEX application based on Ethereum. I would say that all these years were part of the preparation for JellySwap protocol and this multichain, multi smart contract cutting edge challenge. We started working heavily on JellySwap in the beginning of 2019 after long hours of discussing, brainstorming and evaluating . We have designed a proof of concept application with limited functionalities, minimalistic UI and basic version of HTLC on Ethereum. After that we’ve developed HTLC contracts for ERC20s, Bitcoin, Aeternity and Tron. We’ve done hundreds of iterations on the smart contracts, UI and UX until we released our public testnet version in November 2019. Many real users, together with our team, have been testing the application for two months. At the end of January 2020, we’ve released the official version on the mainnet. We have passed security audits on our Ethereum HTLC contract, and generally, we have spent more than a year until our mainnet release.

Since the beginning of 2019, there have been many new applications in the Ethereum space. DeFi has been established as one of the most promising movements in the whole blockchain ecosystem. We’ve seen many projects that tried to tokenize BTC as ERC20 on top of Ethereum, many second layer solutions, and the promising progress of Lightning Network. The whole ecosystem was much different and less developed compared to its current state. However, lack of interoperability between BTC and Ethereum remains one of the most significant and still unsolved problems, which was recently confirmed even by Vitalik Buterin.

We’ve used plenty of technologies and smart contract platforms in our JellySwap protocol. First and most fundamental algorithm that we decided to work on was the hash time atomic swap algorithm. It was originally discussed at one of the bitcoin forums. People were addressing the need to swap Bitcoin for some other cryptocurrency in a decentralized, trustless, and secure manner. We used that original idea with hash and time locks, but we have extended it a lot until we reached the current state. We have developed smart contracts for all of the networks that we are supporting. We have hash time lock contracts for Ethereum, Bitcoin, erc20s, Aeternity, and Tron. It was challenging to build even a simple HTLC on Bitcoin - it is the first blockchain, but the Script language, which is stack-based, is lacking resources, and it is much more limited than Ethereum and its Solidity smart contracts. Then we did our front-end widget and connected it to the smart contracts. Last but not least, we have created a market-making software. The idea is that when someone wants to swap, he/she is automatically matched with the best rate and does not have to wait for the counterparty. That was our key innovation and the main difference between the JellySwap HTLC algorithm and the original idea discussed in the forums.

We released our initial version on the testnet in November 2019, and mainnet version 3 months later. We are striving to write clear code and smart contracts which are covered by unit tests. All of the logic and main algorithm are open-source. Therefore anyone can verify the code on their own as well. Last but not least, we have passed a security audit for our Ethereum HTLC contract. A BTC audit is in progress.

We have many friends in DeFi, and we are slowly building our community. We’ve also received massive support from our investors and their communities. We are grateful for all the priceless feedback, code reviews, and suggestions for improvements. We are communicating closely with most of the projects in the space - well-known dex aggregators like Paraswap and 1inch. We are trying to be up-to-date with everything that’s happening in the DeFi space and to be an active part of this community. DeFi is a fantastic environment where everyone is supportive and open to help on a daily bases.

We have faced some difficulties with BTC users onboarding. Most of them are not familiar with brainwallets and would like to use their hardware ones. In DeFi, people used to connect with Metamask to the DApps, but that’s not the case in the Bitcoin ecosystem. We desperately need something like Metamask but more cross-chain oriented - we can build it someday, who knows :).

Now we have integrated Ledger supported, so the issue with brainwallets is not valid anymore. Another technical limitation is the swap execution time. The swap depends on the time needed for each transaction to be executed on the respective networks. E.g., if someone wants to swap ETH for BTC, he/she should wait for TX’s confirmation on both networks. For BTC, it could take 5 minutes, but sometimes it could go up to 30 minutes, depending on the current network usage. I believe that we will solve all these issues soon as technology gets more stable and mature. Regarding the Bitcoin transaction time - we are planning to integrate Lightning Network and to make Bitcoin Lightning swaps faster than Ethereum’s ones.

What’s your business model?

Building a smart business model in DeFi space is a hard task. It is based on experiments and tests until you find the right formula. Many projects have already proved that fact, and many pivots have occurred even with the most successful projects. We have to generate profit to continue the development of the project, but at the same time, we want to share as much profit as possible with participants in the protocol. Therefore we have a few main revenue streams:

  • We are one of the market makers. Thus we will be earning some profit from the market spreads;
  • We are integrating other blockchain protocols for lending/borrowing, fiat on-ramps, and off-ramps and we may try to monetize these features at some point in future;
  • We are also offering a corporate version of JellySwap for private companies that want to automate their OTC service and to deliver better products to their end-users.

Our competitors are other atomic swap providers, interoperability focused protocols, and non-custodial exchanges. Some similarities can be easily recognized, but Jelly has its pretty innovative features:

  • Cross-chain value transfer - allow people to exchange e.g., BTC<>ETH, BTC<>ERC20 in completely trustless, secure and permissionless manner;
  • Non-custodial - users fund are kept in their wallets or secure smart contract during the whole process;
  • An effective market-making mechanism that enables end-users to provide liquidity and to lend at the same time;
  • Competitive trading pair rates due to the flexible market making strategy;
  • Compatibility with other DeFi apps and one-click lending features;
  • Open-source and community-driven development.

As we do have some competitors, we also have many partners to work with. Almost everything in DeFi is open source and permissionless. Therefore we are looking forward to integrating many of the lending and trading tools, and getting embedded as well in such dApps and wallets.

What’s your position on the regulatory landscape today?

I do believe that we are still in the early years of blockchain adoption and DeFi. There is not a clear legal framework in many countries. The other problem is that each country has a different definition of cryptocurrencies and blockchain assets. In some places, they are equal to securities, e-money, or stocks, while in other jurisdictions, they are taken as utilities or other non-regulated digital assets. Nowadays, most countries have their regulations when it comes to financial instruments and fintech. However, this cannot be valid for blockchain and DeFi as they are based on global and permissionless technology. I am not against regulations, but they should be designed in such a way that the core principles of blockchain are not compromised while at the same time end-users are protected from losses and bad actors (at least to some degree).

From my monthly talks with lawyers, I could say that regulations in Europe are not that strict at the moment, which is great news for startups and entrepreneurs. If a service/product is non-custodial, supports the only crypto to crypto interactions, and all transactions are peer to peer, it is not obliged to follow some burdensome regulations or to acquire expensive licenses - at least this is what I know. I can’t say if we will have a more regulated or non-regulated DeFi and crypto market. Balanced legal framework that protects the privacy and personal data of the individuals and supports transparency, immutability, and decentralization of the blockchain technology, and prevents illegal activities is the best option. It is hard for both the developers and the regulators to find the balance, but it should be our ultimate goal.

What are your goals for the future?

We have concrete plans and many ideas for the future, but more what’s more important is our vision. We do believe that JellySwap can become a trustless and decentralized standard for cross-chain atomic swaps. We want to allow anyone from anywhere to participate in the protocol. We want to develop a network of liquidity providers that will interact directly with the takers. Our code and ecosystem are open-source, and we are determined to keep it like that. We want to generate maximum profit for the liquidity providers and the best possible service for the end-users.

Here is our roadmap for the next two quarters:

  • to bring more liquidity in the protocol via our incentivized market making program
  • to build a more user-friendly version of Butler - our automated market-making software
  • to release our mobile version
  • to integrate more DeFi lending/borrowing protocols (We already have DSR by MakerDAO and Aave is coming in May)
  • to add more wallets
  • to be integrated with at least one widely used crypto wallet like Exodus and other DeFi apps

What are your future thoughts for the DeFi market?

I believe that DeFi is one of the most practical use cases of blockchain. There are, of course, applications (built on Ethereum and its competitive blockchains) that are focused on other spheres, but the most obvious and well-developed are Finance and Fintech. DeFi is trying to create a better financial framework, accessible by a few clicks to everyone who wants to join and participate. DeFi is way more transparent, open, and simple to use than traditional finance. Moreover, it is supposed to become more secure and scalable over time.

Currently, we can’t say that DeFi is stable enough - the market capitalization of DeFi and crypto is relatively low compared to the traditional markets. We have experienced lots of hacks, exploits, and market manipulation for the past year. Still, DeFi is the most promising experiment held on the blockchain so far, and it has the potential to change our understanding of finance, trading, and open markets. And if that happens, I want to witness it with my own eyes and to be part of it along with thousands of innovative projects, founders, developers, and entrepreneurs in the growing space.

Where can we go to learn more?

DeFi is coming. Don't get left behind

About the author
Nick Sawinyh
Nick Sawinyh is a crypto entrepreneur based in LA. He founded DeFiprime in 2019 to offer information on emerging DeFi ecosystem. He owns small amounts of different cryptocurrencies.

The Latest: