Since launching lisk-dex, I’ve had some discussions with community members about how it could affect Lisk and the ecosystem and how it compares to other solutions. Below, I’ve summarized some of these questions and tried to provide detailed answers based on my own analysis.

If anyone can setup a DEX to trade between any two sidechain tokens, how does that help the Lisk mainchain? Won’t Lisk become redundant?

While it’s true that any group of people can setup a DEX between any two sidechain cryptocurrencies, this approach does not align with market incentives. For a market to work efficiently, there needs to be liquidity. Markets which have high liquidity are not only more profitable for DEX operators, but they also provide faster cross-chain conversion and more stable prices.

In a hypothetical ecosystem where every cryptocurrency is interlinked with every other cryptocurrency, the total number of possible markets is:

With just 100 interlinked cryptocurrencies, there would be 4950 different markets.

On the other hand, in an ecosystem where every cryptocurrency is linked with each other through a single common intermediate cryptocurrency, the number of markets would be:

With 100 cryptocurrencies indirectly linked via a single intermediate base cryptocurrency, there would be only 99 markets.

In the context of a single ecosystem, fewer markets means more participants per market which means better overall market liquidity for everyone. Even if the user has to perform 2 trades instead of 1 to switch from one sidechain token to another sidechain token, the increased liquidity provided by having a single base/intermediate cryptocurrency will allow users to perform this conversion faster and for a fairer price. The more cryptocurrencies there are in the ecosystem, the stronger the effect is; this can be attributed to the double coincidence of wants phenomenon.

Does Lisk DEX allow sidechains to have their own sidechains?

Yes, this is an intended feature of lisk-dex and may become useful once the ecosystem grows beyond a certain size.

With enough popular DEX markets, there will likely be a point where the Lisk mainchain is operating at maximum capacity and nothing more can be done to improve performance without compromising decentralization in some way; at this point, the Lisk mainchain transaction fees could become too high for small traders.

If mainchain blockchain fees become too high, small volume traders could switch to trading on second-level markets with lower blockchain fees. Some popular Lisk sidechains may themselves become basechains for other sidechains. This hypothetical ecosystem would form a tree/hierarchy of blockchains with the most valuable, most decentralized/replicated and most trusted blockchain being at the root of the tree and only used for large trades and transaction. With this hierarchical approach, the ecosystem should be able to continue scaling organically without limit.

The DEX market liquidity hypothesis discussed in the previous section should incentivize the Lisk ecosystem to develop into a hierarchy of cryptocurrencies (with maybe a few popular interconnected markets on lower layers) rather than a fully interconnected graph.

How decentralized is the DEX? Do users need to trust intermediaries?

A DEX market relies on a group of operators which control multisig wallets on two different blockchains to match orders across them. A DEX market can currently have up to 16 members/operators. Users do not need to trust any specific DEX member (or any specific subgroup) but they do need to trust the aggregate of those 16 members because it’s theoretically possible that a majority cartel could form internally within a DEX and circumvent the rules of a DEX.

That said, there are several factors which make this unlikely:

  • DEX members receive dividends from DEX exchange fees based on their compliance with the rules so each member has a strong incentive to follow the rules.
  • Members for any given DEX are visible on-chain by looking at the multisig wallet address of the DEX so there is a strong reputation incentive for individual members to follow the rules. Any user can see how long each member has been active within the community based on their transaction history.
  • All DEX orders and trades are publicly visible on-chain and can be verified in a deterministic way by anyone (it’s also possible to verify which DEX members signed which cross-chain transaction). If a DEX misbehaves, it would permanently harm that DEX’s reputation (and that of its members). The specific misbehaving members can be easily identified.
  • One of the benefits of lisk-dex being open source and having a publicly documented protocol is that any group of people can create a DEX market for any cryptocurrency pair to compete with other DEXs using the same compatible protocol. If a DEX misbehaves, it will open up opportunities for other DEXs (with different members) to replace it. Every DEX leaves a complete history on the blockchain which can be automatically verified. This federated, competitive and highly transparent environment gives a strong incentive for all DEX members to follow the rules.

How does the DEX federated 2-way peg approach compare with other approaches like those based on Atomic Swaps and SPV proofs?

Some obvious downsides of lisk-dex compared to atomic swap approaches include:

  • Users need to trust a federation of intermediaries with short term collective custody of the tokens that they’re selling (from the point that the order is placed until it is matched — Note, however, that individual DEX members never have control over any user funds).
  • Lisk DEX is currently limited to blockchains which support short block times, multisignature wallets and allow adding up to 64 bytes of custom transaction data to individual blockchain transactions (enough to hold DEX protocol messages).

When compared with lisk-dex, some common problems with other approaches based on atomic swaps include:

  • All parties involved in the trade have to be online to complete the trade. This makes it impractical to match orders on a one-to-many basis since each trade requires confirmations from potentially many parties, some of which may be offline. This leads to poor user experience with slow, unpredictable outcomes.
  • Atomic swaps do not completely remove the need for intermediaries since efficient markets require order matching functionality. Many atomic swap solutions rely on centralized order-matchers; this creates opportunities for bad actors to manipulate prices for profit.
  • Atomic swap approaches decouple order-matching from trade execution; this opens up the possibility for race conditions whereby multiple competing orders could be matched to the same counteroffer; this forces users to engage in a trial-and-error behavior which leads to poor usability and unreliable markets (for example, your order could be matched to a counteroffer but by the time you approve it, it has already been taken by someone else).
  • The order-matching history associated with atomic swaps is kept off-chain; this data may be lost and the fairness of past trades cannot be fully verified by users. This could facilitate front-running by order matchers.
  • Atomic Swap approaches including those which rely on SPV Proofs typically rely on some kind of smart contract functionality which adds a lot of complexity and performance overheads to the swap, especially if trying to perform swaps between two blockchains which do not support smart contracts natively; then a third blockchain needs to be involved. Increased complexity strongly correlates with vulnerabilities; in particular, having many moving parts with communication delays between them greatly increases the attack surface.

CTO at Leasehold, creator of SocketCluster, ex-LiskHQ developer.