Decred, an open source cryptocurrency project that launched in 2016, released the first specification of its decentralized exchange (DEX) on July 31st through GitHub.
Inspired by Bitcoin, Decred (DCR) uses a hybrid Proof of Work/Proof of Stake consensus mechanism and is one of the most popular altcoins. Decred have been working on a DEX since June 2018 and will feature on-chain atomic swaps, a technology the decentralized project has improved upon in recent times.
What are the Issues with Centralized Crypto Exchanges?
The demand and interest for decentralized exchanges has been rising for several years now and is a consequence of negative experiences and occurrences with respect to centralized crypto exchanges such as high-profile hacks as well as exit scams.
Lack of Privacy
Anyone who has used a cryptocurrency exchange is familiar with the long process of submitting identity documents to activate your account or raise your trading limits, as well as submitting support tickets when something on the exchange goes wrong.
As a result of AML/KYC policies, you have to submit very sensitive information to exchanges to trade on these platforms such as social security numbers, addresses, photos of your passport or driving license and a photo of your face holding your documents.
If the exchange does not secure your personal data effectively, then it could end up being hacked and perhaps even sold on the DarkNet; a risk that some people would rather not take.
Centralized Exchanges are Custodial
Secondly, as the user you are not in control of the funds on the centralized exchange and have no access to the private keys. Therefore, if the exchange gets hacked or exit scams, you have no recourse and must trust the exchange to repay you.
The custodial nature of crypto exchanges also makes them valuable targets for hackers. As this infographic shows, more than $1 billion worth of bitcoin (and other cryptocurrency) have been stolen from centralized cryptocurrency exchanges by hackers.
Of course, there are some exchanges which have a clean track record and have never been hacked. But the facts are that any centralized exchange could potentially be hacked at some point.
The exchange is entirely in control of the transactions on the platform and in the worst case scenario, your funds could be embezzled if the operator of the exchange is untrustworthy – as the case of QuadrigaCX shows.
High Frequency Trading and Flash Crashes
Another problem is the issue of high frequency trading where traditional financial firms can use HFT algorithms to have an effect on cryptocurrency markets.
The whole aim of cryptocurrency was to build a new financial system that was fairer and more efficient, however, legacy financial institutions are able to use HFTs to distort the price discovery process somewhat.
These algorithms provide liquidity, but it is footloose meaning that liquidity can disappear in a matter of seconds. As a result, we observe so-called “flash crashes” – where the price of a cryptocurrency can fall dramatically in a matter of seconds, causing liquidations and hence losses for traders on that platform.
Listing Fees and Trading Fees
For the developers and contributors to cryptocurrency projects, it is disheartening when a lot of good work has been done advancing a particular coin but then an exchange asks for a ridiculous sum for it to be listed. Herein lies another problem with centralized crypto exchanges; extortion of cryptocurrency projects through high listing fees.
It is thought that listing fees can go into the millions for top-tier exchanges. One of the only exchanges to display its listing fee publicly is Cryptopia, with fees lower around $20,000 or so. But projects can expect to pay at least 1 BTC for smaller exchanges, rising as the popularity of the exchange rises.
High listing fees prevent fairly launched coins from reaching more traders and investors. While well-funded coins can afford these listings, many smaller projects that are doing innovative things are left to fend for themselves.
Similarly, for users, trading fees can eventually add up and cost traders and investors a lot of money. There is usually a fee to deposit and withdraw cryptocurrencies, as well as trading fees to open or close a trade.
Sometimes, the fees to deposit and withdraw can be excessive and not in line with a blockchain network’s recommended fees. While such fees generate additional revenue for the exchange, they introduce more friction for crypto traders and hamper the user experience.
Take, for instance, HitBTC which has charged very high fees just to deposit and withdraw certain coins on its platform. Because users do not have control over what the exchange operators do, they either have to face the high fees or choose another platform.
How are Decentralized Exchanges Addressing These Issues?
Decentralized exchanges (DEXs) in general are an attempt to address the issues outlined above in one way or another. Mainly they take aim at the custodial nature of centralized exchanges and try to put the user in full control of their funds while they are trading.
Since decentralized exchanges are not run or operated by a single entity, they get around AML/KYC as there is no company that will submit regulatory authorities or address they can send a correspondence to and there is no central point of attack for hackers. With no KYC, users can set up an account easily with an email address and password. This is a positive aspect of the trading experience as it is convenient and preserves your privacy.
Also, it is easier for coins to get listed on certain DEXs, with Bisq and CryptoBridge serving as good examples. Both DEXs have added many coins, a lot of them fairly launched, that have not managed to get on enough centralized exchanges. With Bisq, it is as easy as forking the software to make it compatible with the coin’s code and it can be added to the DEX once it is merged into the master branch of the DEX’s code.
Instead of being centrally managed and controlled, DEXs are run by a network of nodes distributed around the world, similar to Bitcoin, where trades are done in a peer-to-peer fashion, allowing someone in one country to swap bitcoin for ether with another person in another country. The trades are done directly from each participant’s wallets – instead of from a centralized hot wallet owned by the exchange – and this can be done with atomic swaps or another variant of smart contracts technology.
Atomic swaps allow you to trade a coin from one blockchain with another coin on a different blockchain without relying on a trusted third party and they can either be done on-chain, so coins are directly transferred from their main chains, or off-chain, using payment channels similar to the Lightning Network.
The only way to barge into on-chain atomic swaps is to hack the blockchain itself, which is a costly and difficult exercise. A technical overview of on-chain atomic swaps in the Decred DEX can be found here. Since the exchange takes place on-chain, clients are expected to pay transaction fees and will require a good knowledge of the particular crypto-asset you are trading, such as using command line wallets and running full node and so on.
The downside to current DEXs is the often poor liquidity compared to centralized alternatives. There is not enough usage to make DEXs appealing to the majority of investors and traders. But as smart contract and privacy technologies evolve and improve, so will decentralized exchanges and the volume will follow naturally.
There are many flavours of DEXs with some more centralized than others, and Decred have already argued that we haven’t seen a pure decentralized exchange yet. When announcing their intention to build a DEX back in June 2018, Jake Yocom-Piatt mentioned that existing DEXs have replaced frictions from centralized exchanges such as a trusted third party but then re-introduced their own friction in the form of a token or blockchain.
Also, in an article from Forbes in February 2019, Yocom-Piatt stated that while centralized exchanges have adopted a profit-driven model, so too have some DEXs, “Centralized exchanges make huge profits on listing fees and trading fees. Some of the big ones request ridiculous 6-, 7-, or even 8-figure listing fees. Most DEXs are also based on a profit-seeking model that doesn’t always equal fair play for retail traders.”
An Overview of Decred’s Decentralized Exchange
Decred isn’t aiming to build a blockchain and use a native token for its DEX. Instead, a client-server model will be used to match orders so that no token or special blockchain is required to make trades.
As there will be no native coin, there will be a level playing field for trade and commerce for both traders and crypto projects who want to get listed. The DEX is merely a match maker and communication relay and users are in control of their funds throught the entire trading process.
Yocom-Piatt has explained previously that the client-server model for order matching is one of the fairest ways to match orders, “By doing pseudorandom order matching in epochs — say every 10-60 seconds — it puts everyone on a much more level playing field with respect to latency.”
As a result, there is no advantage to anyone due to their internet connectivity and there is no possibility for front running (an unethical trading practice in which a broker with advance knowledge of a specific market order for a client earns a profit by placing an order for their own account in advance of the client’s larger order).
Secondly, there will be no trading fees on the Decred DEX allow for a smooth experience when trading digital assets. However, there will be a one-time fee for registration to prevent spam attacks and cover DEX operating expenses, configurable by DEX operators. Also, for cryptocurrency projects there are no listing fees and it will be easy getting a coin trading live on the DEX.
Thirdly, with identities based on Public Key Infrastructure (PKI) key pairs, traders would be able to use the Decred DEX and then timestamp exchange data onto Politeia to build their reputation as a reliable seller/buyer. Politeia is Decred’s censorship resistant, blockchain-anchored public proposal system. As a voting system geared towards decentralized decision making, Politeia will be used to vote in a transparent and democratic way on the DEX before it becomes a reality.
With PKI key pairs, you have a public key and private key. The public key identifies and authenticates servers and clients, while the corresponding private key is used to sign and authorize orders and other messages. The client’s public and private keys also removes the need for usernames and passwords.
With on-chain atomic swaps and “pseudo-random epoch-based” order matching, trades are secure, trustless and participants are in control of the assets the entire time. However, to discourage disruptive behaviour, registered clients are bound by the rules of community conduct and you could end up getting banned if there is a serious violation. The one-time registration fee can be used as collateral and be used to discourage violations of the rules.
Nevertheless, Decred’s exciting project is definitely one to keep an eye and has the potential to the best DEX yet. The DEX will initially feature Bitcoin (BTC) and Decred (DCR) in the early stages and the GitHub spec mentions, “it is expected that development communities will release their own appropriately vetted plugins.”
The next step is for the proposal for the actual development of the DEX, which was published on August 7th, to be accepted on Politeia by the community. Developers will use the Go programming language to build the parts needed to make the DEX server and DEX client a reality. Work will be coordinated through a public GitHub repository lead by Decred contributors but also open to anyone else following the open source Decred contractor system.