November 2, 2026

Capitalizations Index – B ∞/21M

Decentralized Exchanges, Off-Chain Atomic Swaps, And A Brief Look Into The Future

Decentralized exchanges, off-chain atomic swaps, and a brief look into the future

Decentralized Exchanges, Off-Chain Atomic Swaps, And A Brief Look Into The Future

The views expressed here are the author’s own and do not necessarily represent the views of Cointelegraph.com.

For an economy that emphasizes decentralization, cryptocurrency has ironically relied primarily on centralized platforms of exchange. This is problematic as they often hold funds in giant “honeypot” addresses that attract sophisticated attackers. This has resulted in several cases where exchange funds have been drained. In fact, there were two in the past 3 months alone! Bitgrail reported on Feb.12 that over $170 mln in XRB was stolen from their wallets. Coincheck suffered one of the largest losses ever with over $400 mln in NEM being stolen.

Decentralized Exchanges

Fortunately, alternative solutions to centralized exchanges are available and are called decentralized exchanges (DEXs). These platforms are structured in such a way that users retain ownership of their coins with their private keys. This is a much-needed solution because it prevents cryptocurrencies from being accumulated into one centralized point of attack.

The demand for DEXs are growing. For example, the Radar Relay exchange exceeded $1 mln in volume over a 24 hour period for the first time back in the beginning of January.

But even this type of exchange is not without its limitations – they are liquid and front-running.

Liquidity

The way decentralized exchanges work is that people individually set and take orders. However, these orders exist on separate order books that are hosted independently of each other. Therefore, the orders placed on one book won’t appear on another. This creates an issue as users suffer from a lack of liquidity and may have to look at several different books to place their orders.  

This can be fairly solved through a process called “Networked Liquidity.” The basic premise is that different order books utilize an API in order to share their orders with one another. In this way, orders flow between “relayers” and provide the needed liquidity in the network.  

Networked liquidity with trade execution

Front running

Front running is the concept that people can outbid an order placed on a DEX. Many decentralized exchanges running on Ethereum rely on smart contracts. But because the network is a public Blockchain, this creates a problem as anyone can check the memory pool to see who is intending to take an order.  

Once a bad actor identifies that an order has been placed on a DEX, they can simply jump in front of them by placing the same order except with more gas. Therefore the first order that was

placed is never realized as the order is now gone from the book.  

Front running

One solution that Ivan Bogatyy, a former Software Engineer at Google, suggested to the Bancor team in his blog is to implement a ‘minReturn’ on trades which effectively cancels the order once the user realizes someone is trying to cut in front of them. Another solution he suggested was to set a max gas price so that people can’t bid higher than the limit.

But these are short-term fixes. Adding a minReturn doesn’t prevent front-running – it just cuts a user’s losses. Further, adding a gas limit isn’t ideal during a congested network.

Another way to mitigate this issue is through a “Commit-Reveal Scheme,” a solution presented by Will Warren, co-founder of the 0x project, an open protocol for decentralized exchanges. This means that a trader secretly commits his funds with a transaction, but doesn’t reveal it. Once the transaction is mined, a second transaction is sent with all the details – therefore executing the order on the DEX.  

Unfortunately, this method isn’t perfect as it doesn’t prevent accidental collisions, for example when two of the same orders placed at the same time.

Off-Chain Atomic Swaps

Atomic swap

On March 15, 2018, Lightning Labs announced the first Lightning beta release for mainnet on both bitcoin and Litecoin. One of the most anticipated applications of the Lightning Network (LN) is Atomic Swaps.

Atomic Swaps describes the “all or nothing” exchange of one currency for another, for example, bitcoin for Litecoin. Even though the LN is not needed, it would make Atomic Swaps instantaneous, private, and fee-less in regards to mining.

Let’s take a look at how the LN stacks up against the problem of liquidity and front running that DEXs face.

Liquidity

There are two generally understood paths to perform Atomic Swaps on the LN, although alternative ways are being researched: directly from one LN node to another LN node and routing your swap through an intermediary.

In regards to liquidity, one issue the LN may face is fund and channel availability. The very nature of the network requires users to create payment channels through multisigs. This means you can only get on the LN channel if you have something to spend. Alternatively, intermediaries can only route payments if they have a sufficient amount of funds.  

This issue can be solved in a similar way to DEXs. Just like how DEXs order books can share their information with one another, so too can transactions be routed and shared between nodes that have the funds and the channels to perform the swap. All that would be required is to extend the number of “hops” your swap goes through. As of press time, this is a challenge as the LN is still in its early development stage with more and more channels and funds being added to it. But as the network grows and larger players come online, this will be less of an issue.

Front running

Atomic Swaps utilize a technique called Hash Time Locked Contracts (HTLC). By simultaneously submitting both currencies into these contracts, HTLCs ensure that the amount you are exchanging for is ensured and cannot be “outbid” as they can be on DEXs. Similarly, there is no danger of “accidental collision.”

Hashed timelock contract

For example, if I would like to exchange my Litecoin for bitcoin, I would need to find someone on the LN to exchange with. We then commit respective coins to the swap. These are then routed through other nodes if we need other connection points and don’t want to pay for fees to create two payment channels between us. In this way, the exchange is guaranteed.  

The LN does face a different problem: bad actors may try to cheat or steal another person’s funds. However, severe punishing contracts have been designed in such a way so as to disincentivize anyone from doing so.

Looking forward

Currently, many DEXs serve an important role in providing a way for the cryptocurrency ecosystem to trade without relying on centralized exchanges and removing the enormous financial incentives for sophisticated attackers. At the same time, they almost exclusively serve Ethereum based tokens.

Alternatively, Atomic Swaps have yet to be widely implemented as the LN is still growing. It will also be limited to the currencies which are LN compatible.  

Taking these facts into consideration, it may appear that the two forms of exchange will develop independently of one another as they serve different ecosystems. Still, this may not always be the case. It’s possible that these two ecosystems may eventually become compatible with one another. Alex Bosworth, a LN developer, recently shared in a podcast that one of his goals is to enable Atomic Swap compatibility between as many coins as possible. This would include the exchange of ERC20 tokens and LN compatible currencies.  

Perfect future?

Overall, the future of cryptocurrency exchanges seems to be bright as they are continually evolving. How we trade now may seem like a relic of the past in the next 5 to 10 years. The hope is that the developmental trend will continue down the path that is reflective of the principles of the coins they are hosting; by emphasizing censorship resistance and decentralization.

The article is written by ecurrencyhodler, an author of “Understanding Litecoin: The Digital Currency for Payments.”

Published at Fri, 20 Apr 2018 00:47:16 +0000

bitcoin

Previous Article

Dev Update #2: First Look at Morpheus.Network’s Supply Chain Platform In Action!

Next Article

Decentralized Exchanges, Off-Chain Atomic Swaps, And A Brief Look Into The Future

You might be interested in …

Can CREDO Take Its Place Alongside Visa and Mastercard?

Saint Petersburg, Russia-based CREDO have developed what is being dubbed a “next generation payment system” that makes everyday shopping easier for both buyer and seller alike.

[Note: This is a sponsored article.]


What is CREDO?

CREDO is a multi-functional payment system based on a financial algorithm that involves the participation of an independent agent in the transactions of purchase and sale of goods or services. Also called a derivative, the Electronic Certificate enables the parties (buyer and seller) to assume the right or obligation to perform certain actions with respect to the underlying asset.

Some of the features of CREDO include:

  • Innovative multi-brand loyalty program
  • Ultra-high discounts for all types of goods and services
  • Electronic certificates sold for crypto-currency
  • Electronic card linked to a personal bank card
  • Internal processing system independent of any banks
  • High-speed payment system using NFC technology
  • POS-terminals and EMV Java Cards
  • Created to work everywhere in the world just like VISA or MasterCard

CREDO internationality

CREDO’s primary competitive advantage is its internationality. Users of CREDO can buy and sell with any currency and from any country in the world. The payment model is extremely efficient and applicable not only to goods and services but intangible and tangible assets as well. It allows credit and payment operations not only through classic financial markets but through cryptocurrency as well.

Oksana Evseeva, an expert on international investments certified IFRS by the Institute of Financial Accountants in London, weighed in on the potential of CREDO in the global marketplace:

CREDO could be comparative and competitive as Visa and MasterCard using its model on B2B and C2C markets. […] It could work as on B2C as on B2B and C2C markets combining current financial and new crypto-currency markets.

B2C Payment Platform

CREDO’s B2C model works similar to a customer loyalty programs but gives more opportunities for market coverage. Customers can buy goods and/or services at a discount from any participating merchant around the world.

The basic mechanism of transactions in CREDO in B2C sector is as follows:

  1. The Retailer issues emission of Electronic certificates (Derivatives) for future sales of its goods/services
  2. The Operator works with the Retailer, providing payments for Derivatives, and also with Clients, providing sales of Derivatives, with a discount in case of rising clients’ base and loyalty
  3. Clients buy Certificates for goods and services.

The end result is a win-win for all participants. Retailers get more customers and increased working capital, Operators get an increased client base and profit margin, and customers end up paying less for the goods and services they purchase.

CREDO is Real World Tested

Unlike many ICO projects that seek to raise capital to fund the development of their service or platform, CREDO is already being used in real world scenarios, having undergone rigorous testing to ensure full compliance and adaptability for both domestic and international cross-border transactions.

Konstantin Galibus, CEO & Founder of CREDO

Konstantin Galibus, CEO & Founder of CREDO, describes some of their earlier tests:

We carried out a transaction in Europe through Deutsche Bank and VTB Bank in Russia executed a cross-border transfer for purchase liabilities of one of our Spanish counterparties. While Deutsche Bank, which acted as a correspondent bank, suspended the transfer of funds until the transaction structure was explained, when the processing model CREDO was presented to Deutsche Bank and the economic feasibility was proved, the funds were released and the transaction was concluded with success.

This example demonstrates not only the adaptability of our system to the strictest requirements of international banks but also our willingness to ensure cross-border transactions using an absolutely independent financial instrument.

Since then, CREDO has been used by over 1000 customers throughout China, UAE, Spain, and Russia. Over 9000 transactions have been completed totaling over 16,120,000 EURO. In a recent tweet, CREDO announced that additional pilot projects are in the works:

//platform.twitter.com/widgets.js

According to the project whitepaper:

CREDO has a patent for the designed system. The functional of the business model of CREDO has already been provided with all the necessary software and hardware and confirmed by positive test results in Europe. CREDO is a real financial project with its own technical processing, POS terminals, and EMV Smart Cards.

CREDO Pre-ICO in Progress

Launched on June 25, 2017, CREDO’s first round Pre-ICO is already under way. The ICO seeks to raise $5.5 million USD. Funds raised during the ICO will be used to:

  • Fund the cash turnover and create a new Operator in the system needed for the Cash-Forward payment model of CREDO’s B2C platform
  • Overall system improvements
  • Marketing

The Pre-ICO ends on July 10, 2017, after which it will transition into the main ICO. Investments in the ICO can be made with bitcoin, Litecoin, or Ethereum.

For more information about CREDO please visit their official website or download their whitepaper. CREDO’s ICO is being hosted at ICO Marketplace.

Does CREDO have the potential to take its place alongside Visa and Mastercard? How will it affect mainstream adoption of cryptocurrency? Let us know what you think in the comments below.


Images courtesy of CREDO, Shutterstock

The post Can CREDO Take Its Place Alongside Visa and Mastercard? appeared first on Bitcoinist.com.