The State Of Decentralized Exchanges DEX
By Vince Tabora on ALTCOIN MAGAZINE
Digital exchanges have been facilitating cryptocurrency trading for both retail and institutional investors. Examples like Binance, OKEx, Coinbase, and Bittrex provide a service for buying, selling and exchanging cryptocurrency. For those new to the ecosystem and are not familiar with cryptocurrency, these exchanges provide them entry by allowing purchase with fiat currency. This allows them to buy and sell with a transaction fee charged by the exchange for their service.
For the most part, however, these exchanges are contradictory to the philosophy of cryptocurrency because they are centralized. Users do not have a choice but to follow the rules of the digital exchange they are using. Most exchanges now have stricter rules due to requirements (KYC, AML, ATF) for SEC compliance (US) and likewise the equivalent regulatory agency in other jurisdictions. This makes Decentralized Exchanges or DEX viable alternative.
DIFFERENCES BETWEEN CENTRALIZED vs. DECENTRALIZED
The concept of decentralized exchanges introduces a platform that uses an independent system that runs on a distributed public ledger. It is also a trustless and permissionless system that puts the control of money in the hands of the users without needing a third party. Trustless means there is no required third party to hold assets to trade, instead, it can be done directly with another party whom you don’t really know. It is also permissionless since you don’t need to ask the bank or investment firm for any money. All trading on this platform is direct peer-to-peer transfer of value. It does not store any of the user’s funds, but only keeps track of their transactions. They match and route buyers with sellers and allow the transaction to be recorded on the public ledger.
Examples of current decentralized exchanges are EtherDelta, Bisq, and Bitshares just to name a few. Others are projects that are based on what is called the 0x protocol that supports decentralized exchange platforms. DEX doesn’t even require users to sign up with the usual requirements and they can trade directly. Any fees incurred are either from the network processing the transaction or is redistributed back into the system to maintain service. On centralized exchanges, the fees like any business are needed for revenues. Therefore it is not only to maintain their system, but there is also a profit motive.
Let’s look at how a transaction is performed on a centralized exchange like Coinbase. We need to use their service in order to exchange fiat currency for cryptocurrencies like Bitcoin and Ethereum. There is no direct way of purchasing with fiat unless you have an account and a digital wallet. A user can keep their funds stored on the exchange which holds it under a custodial wallet.
The exchange will require a valid e-mail for sign up, and others will also require a valid government-issued photo id for verification of identity and KYC rules. Once you have signed up, the next step for purchasing cryptocurrency is to have a payment method to make a transaction. Some banks have banned the use of credit cards they issued for cryptocurrency, but have tolerated linking customer checking accounts and debit cards for buying cryptocurrency.
The user can now purchase their cryptocurrency with the linked payment method. During the transaction, the exchange will charge a fee, on top of the fee incurred on the network. In order to purchase Bitcoin, for example, a transaction fee is paid for validating your transaction on the blockchain. These fees do add up if a user day trades or often uses the exchange to transfer value. Users can then try other exchanges once they have the cryptocurrency for trading, but they will still have to pay them fees.
On a DEX, the payment can be settled directly between a buyer and seller using a smart contract. The buyer and seller do not need a broker and they don’t need to know each other’s e-mail address. What the buyer needs to know is the seller’s public address to send the funds, otherwise, the app can match them if the buyer has no particular seller to buy from. The logic is coded in the smart contract which then executes the transaction on the blockchain. The DEX functions merely as a place to conduct the transaction which is then recorded on a public ledger. In no way are funds from the buyer or seller entrusted to another party during the transaction. For the buyer to purchase cryptocurrency, no funds are held by the DEX. The seller instantly receives the payment and there is no need for a settlement network like what credit companies have to do with banks and merchants.
There is no book service to handle the transaction, it will be done using the platform’s own app that executes from the DEX blockchain. An order that matches will be confirmed by the network once it has been accepted and the transfer of value completes with the coin changing ownership (in the case of cryptocurrency). No intermediary is involved at any point so this requires very strong security using encryption techniques to ensure trust in a permissionless and trustless system. The good thing is that the cryptocurrency has protocols that perform checks against double-spending and transaction malleability attacks.
THE PROS & CONS
Centralized exchanges do offer convenience for users and investors since they are a sort of broker to the cryptocurrency ecosystem. You have technical support and representatives you can reach out to regarding issues or problems. This is very much like how the current financial system works, with banks and investment firms that hold investor’s money for the purpose of trust and security. This is what gives traditional investors guidance on how to invest their money and also allows these brokers to manage it for them. This is the opposite of the cryptocurrency ideals of decentralization and the blockchain. What you have is a trusted entity that handles your transactions. The problem is that there is a single point of failure.
Those who keep their coins on exchanges will risk losing them from hacking attacks which have already happened before e.g. Mt. Gox, Bitfinex, Coincheck, Bitgrail. Another problem with centralized exchanges is that users will be affected by delays when there are many transactions occurring. This has happened to popular exchanges like Coinbase when a sudden surge of users began trading on their platform. Scalability is a problem when you have a sudden surge in user growth and activity. These exchanges can also issue limits on withdrawals on your funds from a trade on their platform. This also incurs fees to the exchange for processing the withdrawal. Systems like these can also be vulnerable to attacks from bad actors e.g. DDoS, data breaches. That means when the system goes down, if there is no backup system available, you won’t have access to trading or your funds stored on the exchange.
In cases like Mt. Gox, mismanagement and internal problems can affect users. During its collapse into bankruptcy in 2014, $473M disappeared, apparently stolen by hackers. Another $27M was missing from their bank account. People who have funds stored on exchanges that experience problems like these have little chance of recovering their digital assets.
DEX doesn’t require your personal information. Users also keep their own private keys and transact directly with each other. They also provide transparency and immutability of any transaction conducted on their platform. Coins purchased are never sent to a third party for holding. Most coins will also be traded with other assets, no restriction on pairs. There is no authority that controls the exchange to collect profits. No limits on withdrawals for anyone. The DEX allows more independence for its users since there is no company dictating its rules. Even if there are small fees charged for the transaction, it is not to profit a single entity. The fees go back to maintain the DEX, as an incentive to the nodes that are part of its network. Perhaps the strongest consideration for DEX is its indifference to any form of regulation. This makes it harder for any government to impose any regulations that can affect trading. For anyone who conducts a transaction on the DEX, they will still be responsible for paying their own taxes in accordance to the law.
Since it is distributed and decentralized, there is no single point of failure. The system can still operate even if one node on the network goes down. Since there is no control or support available though, users on a DEX are very much on their own. Once you conduct and approve an order, whether to buy or sell, it is not retroactive once the transaction is written to the public ledger. If fraud were detected, it can be tracked since the public ledger provides transparency. The problem is that it will be hard to identify who committed the crime and enforce laws, especially across borders. It is still possible to orchestrate hacks to fool users trying to use a DEX, as what happened with EtherDelta and Bancor. This is why users should always be careful about which website they are going to.
The possibility of cross-blockchain token trading using atomic swaps is another feature that DEX can provide. Atomic swaps utilize a technique called Hashed Time Locked Contracts (HTLC). This implements a conditional payment protocol in Bitcoin and other altcoin ecosystems. This allows the seller to generate a cryptographic proof of payment before the deadline of the swaps, and sending a secret number to the buyer to unlock coins. On September 20, 2017, the first atomic swaps were executed between Decred (DCR) and Litecoin (LTC). This makes atomic swaps a big component in implementing a DEX.
DEX DEVELOPMENTS
Without any restriction to trading, more enhanced security and freedom to trade with anyone, decentralized exchanges truly offer more services while circumventing regulations. Decentralization means no one can take funds during an exit scam since the DEX doesn’t hold any funds. The decentralized nature of the DEX makes it truly borderless so it recognizes no national authority allowing anyone from anywhere to trade. Perhaps a lack of direct government regulation is one of the bigger issues DEX faces. If the DEX is not owned by anyone, there is really no way to enforce the law to make it compliant. It would also be hard to shut down because it is not based in one geographical location. This leaves regulatory risk when operating a DEX. Anyone who engages in money-transmission activities are required to follow all federal and state laws and regulations in the US or risk facing severe civil and criminal penalties.
The issue here is if a government agency wants to investigate a user of the DEX, they will not have any assets to seize or registered personal information. That’s what is frustrating during any investigation. This makes DEX more complicated to impose any regulations on unless there is an outright ban. That would be hard to do since DEX operators are located in many countries, so that would mean finding each node in order to shut them down. That would be draconian for any government to carry out so there will have to be a middle ground that should permit DEX to operate. At the moment it is regulated exchanges that are allowed to trade fiat currency for cryptos, otherwise, DEX will have to trade in crypto-to-crypto pairings only. There are, however, platforms like Bisq which allows you to buy and sell Bitcoin in exchange for national currencies.
In March 2013, FinCEN The Financial Crimes Enforcement Network bureau of the US Department of the Treasury ( which enforces compliance with the BSA or Bank Secrecy Act) issued a guidance to clarify how the BSA applied to persons creating, obtaining, distributing, exchanging, accepting, or transmitting virtual currencies. Such persons were classified into “users,” “administrators,” or “exchangers”. According to this guidance, an asset traded on a DEX can be classified as CVC OR “Convertible Virtual Currency”. That would require the operator of the DEX who can be classified as an administrator or exchanger of the digital assets to register with the SEC. A DEX is not exactly a company though, it is a type of Decentralized Autonomous Organization DAO which is more like a crowdfunded project (Not exactly The DAO).
Operating a DEX can lead to legal consequences from government regulators. In November 2018 the founder of EtherDelta had to settle with the U.S. Securities and Exchange Commission due to operating an unregistered securities exchange. This shows that when a DEX still has centralized components, like a business entity, regulators can still come after them.
FINAL THOUGHTS
Mainstream digital exchanges like Binance have announced their plans to operate as a decentralized exchange. The reason they did this was to come up with an alternative marketplace for digital assets. It is also questionable to some that Binance would even call their service as decentralized. This is because using their DEX still requires going through the basic KYC process. That right there does not align with the main features of a true DEX.
At the moment these operations have just started, so how they evolve will be something to keep an eye on. There are also platforms that provide this service, but have not (as of this posting) seen a massive influx in adoption. They are not that easy to use and it does require some knowledge to understand. In a decentralized system, it is free and open to all, but there is also a risk involved to it. An important thing users need to know about a DEX is that you cannot revert transactions and recover losses from hacked passwords or private keys.
There is more to counsel with regards to the law beyond the scope of this article, so it seems that a DEX cannot be above the law. If they are deemed illegal, then there are consequences to users who trade on these platforms. If the DEX proves to be truly just a platform for trading without an operator profiting or controlling the exchange of assets, that would be the most indisputable reason to allow them to operate.
Further Reading:
The Law and Decentralized Exchanges
https://decentralizedlegal.com/dex/
EtherDelta, the hack against a DEX is possible
https://news.bitcoin.com/one-week-etherdelta-hack-funds-still-stolen/
Cryptocurrency trading regulations and DEX
https://cryptoinsider.21mil.com/decentralized-exchanges-a-major-development-future-crypto-trading/
Mt. Gox Downfall
https://www.wired.com/2014/03/bitcoin-exchange/