Decentralized vs. Centralized exchanges
What is Herdius and how is it different than compared to traditionally centralized exchanges?
In this piece, I want to explain and outline why DEXs (Decentralized Exchanges) are the future of cryptocurrency trading and what are the exact advantages Herdius’ future architecture offers in comparison to traditional centralized and decentralized exchanges. One can also see more and more blockchain startups moving into the direction of decentralization — Gnosis is starting to develop a DEX of their own.
Berlin is all about DEXs this week with the likes of OmiseGO, Kyber, Radar Relay, Gnosis, Melonport all participating in a meetup that I am personally moderating the Q&A for. We will share the recording and slides on our Twitter ASAP. So with this out the way let’s jump into what I like to call DEX 101…
Why decentralize an exchange? What does it mean anyway?
Blockchains and cryptocurrencies were envisioned as community-oriented open-source initiatives where the participants of a decentralized network have the power instead of a central authority. This has held true with the exception of dev teams that still have a significant say in the project. Often times blockchains have a leader that everyone believes in and follows, limiting the effects of decentralization, however, it is not that big of a deal.
Centralized exchanges are the exact opposite of what has been mentioned above — there is a direct conflict between what they represent and blockchain values. A centralized exchange (ex. Coinbase, Kraken, Binance, etc.) is run by a profit-oriented company that gets revenue from their platform’s fee structures. To put it simply: both the access and exit points into the current blockchain ecosystem require fees — all of which go to centralized exchanges. Not very fair or community oriented, is it? This is the main reason why decentralization is needed. In all honesty, it is worth mentioning that centralized exchanges can do fiat (USD, EUR, etc.) to cryptocurrency transactions while DEXs, on the other hand, are only crypto -> crypto (for now) — this is due to KYC and other regulations.
On the other hand, a truly decentralized exchange like Herdius works in a distributed way through a blockchain, with orders and information routed in a peer-to-peer protocol. This way, you are entrusting a system of hundreds of independent nodes instead of a single centralized entity, like an exchange.
The issue of trust
On January 10th 2018, Kraken a fairly big centralized exchange went down for what was promised to be a 2–3 hours of maintenance work. This turned out to be untrue and 40 hours of darkness followed. Maintenance work itself is not a problem, as it was actually needed to upgrade their trading system. However, the fact that everyone's funds are solely controlled by Kraken should be a troubling. The private key to access all your cryptocurrencies is not with you but with them, meaning that if exchange goes down or is breached, all your funds are gone. Since cryptocurrencies are highly volatile and listed on hundreds of secondary markets, a 40 hour downtime means major losses for the user in terms of opportunity costs.
Public-key cryptography is great — no doubt about it, but it also has one major weakness — once your private wallet key is compromised your funds are gone, forever. If a single exchange controls billions of dollars in funds and the keys to unlock them, it becomes a huge target for those wanting to abuse the system.
Traditional decentralized exchanges (not Herdius), meaning those that run on top of the Ethereum network (Airswap, Raiden, Etherdelta) use smart contracts or a combination of smart contracts and payment channels to facilitate the trade of cryptocurrencies. There is no middleman or single trusted entity involved and you trust the immutable and decentralized aspect of a smart contract. At Herdius we take a different approach and create our own blockchain that acts as a transaction layer on top of all chains. This not only means that we are blockchain agnostic and future-proof, but that we are also faster and easier to use.
Problem with current decentralized exchanges is that they provide for a horrible user experience and confusing steps / transactions. In a centralized exchange you press trade and things just happen in the background while in a traditional decentralized exchange there are multiple transactions involved to exchange one cryptocurrency to another. In my view there are three things a DEX has to do better than a current centralized exchange if it wants to become a viable alternative: 1) it has to be easier to use , 2) provide more trade options, 3) be more affordable.
Herdius solves all of the above:
- In the Herdius system you are meant to trade straight out of your wallet by pressing the trade button. The access to your tokens would appear straight away. It is not needed to move funds from your wallet to an exchange, then create a trade order after which you need to withdraw your tokens to your wallet again — in Herdius you enter your desired trade in your wallet and then get access to your newly acquired cryptocurrency straight away.
- Herdius is blockchain agnostic and solves everything on the private key level. Ethereum based decentralized exchanges run on top of smart contracts and for this reason you are only limited to trade ERC20 standard based tokens. As long as a blockchain has private keys involved, be it graph based or not, it will work with the Herdius network without any additional communication layer needed.
- Herdius is also cheaper to use, even cheaper than current decentralized exchanges where you only pay for the fees of the Ethereum network.
In the diagram above you can really see how complicated things get when dealing with a traditional decentralized exchange while in Herdius the goal is to do bi-directional exchange straight out of your wallet so that having deposited the funds into a Herdius wallet there is no need to move money again elsewhere and you are able to access your newly traded tokens straight away.
As mentioned above when we talked about trust, the security of your funds and private keys lies in the hands of centralized exchanges — which often times do not employ the highest security standards. In the case of Herdius, the wallet network that includes every user’s funds is of the same level of security as a desktop wallet.
In fact it would actually benefit centralized exchanges to implement the Herdius wallet network as back-end infrastructure themselves. Doing so allows them to access available liquidity inside the Herdius network and match trade orders from the Herdius chain to trade orders from their own platform. For them there would be no security downside when compared to the current infrastructure that is used.
Speed and cost
When it comes to speed current distributed networks can not compete with centralized ones so as far as speed is concerned, centralized exchanges have the upper hand. This is not the case, however, if you have to move the funds from your desktop wallet to your wallet on the centralized exchange.
Imagine you have Bitcoin / Ether in your desktop wallet and you need to buy a certain token to use a prediction market or any other dApp that requires you to have its token for you to be able to use it. The process looks like this:
- Send BTC / ETH from you wallet to the centralized exchange. You wait for the confirmation from the underlying blockchain as well as pay the fees.
- Once the transaction is confirmed you buy your token. You pay the centralized exchange’s fees which can be anything from 0,2%-0,8%.
- Withdraw your newly purchased tokens. Again you pay the fees of the chain and often times even an additional withdrawal fee.
- After finally getting your tokens you once again need to send them to the dApp’s wallet / smart contract for you to be able to use the service.
I have left out the time required at each step, but let’s account for a 1 minute transaction time at each step when going through the blockchain and pretend that Bitcoin is capable of that. Here is what the process looks like inside the Herdius network:
- Once you have Bitcoin / Ether or any other cryptocurrency in your wallet that is compatible with Herdius you create a trade order at market price
- If there is a match settlement happens in under 1 second with you being able to trade your tokens straight away inside Herdius
- If you want to move your tokens outside of the Herdius network, a transaction is initiated on the underlying blockchain and your funds are transferred
As far as costs go we initially wanted to set fees at 0,4% for a whole trade (maker + taker), but after a certain threshold this becomes even more expensive than other DEXs. The new fee structure would still employ the same fee scheme until a certain amount, after which the fee changes to a fixed fee of <$1.
One of the main problems of DEXs is the problem of liquidity. Current DEXs do not have enough liquidity to compete with centralized exchanges and there are not enough market makers that could pull in a significant amount of takers. This problem is what I previously described: current DEXs are not superior to CEXs and there is barely any upside for both market makers & takers to migrate.
The solution to this problem is open order books from all the DEXs and doing intra-DEX while also allowing a centralized exchange to use this open order books for their own matching. There are other potential solutions which are too artificial or start going into a gray area.
This was the first part of a planned series that outlines and better explains Herdius from the usability and upside perspective. Let us know what we missed and what you want to be included in the next version. Until then feel free to subscribe to our newsletter to get Herdius & industry wide news.