We have an amazing tool at our fingertips. Right now you can generate a random number, apply a few cryptographic operations, and have a computed value with which you can confidently receive money from anyone in the world. You don’t need permission or cooperation from anyone. You are in control. You have the power. Cryptocurrencies make this possible and there are hundreds of them.
Similar to the number of cryptocurrencies, there are hundreds of cryptocurrency exchanges. In this reality, with hundreds of exchanges to choose from, we’re developing a new exchange: Nitrade. Why you might ask? Because all the current exchanges are doing it wrong and we have a solution.
Our solution is a hybrid decentralized exchange with a new open protocol that we’ve named the Decentralized Clearing Network, or DCN for short. When it comes down to it, the DCN is just an Ethereum Smart Contract that manages the on-chain interactions between users and exchanges.
At a high level, the DCN holds user deposits and securely settles trades while the exchange accepts and matches orders. What does this look like? All trading is done through the centralized service, Nitrade. Trading can either be done through our web interface or one of our API trading gateways. Nitrade provides the low latency and high performance expected of a centralized exchange. Behind the scenes, Nitrade packages trade information in optimized batches and submits it to the DCN in regular intervals. These aggregated trades are then verified and applied to the users’ DCN balances.
You may be asking, how is this secure? If the exchange calculates trades, couldn’t the exchange just create a trade that sells all of my tokens for next to nothing? This is the problem that the DCN solves. Before we dive into this and how the DCN works, let’s quickly look at how other decentralized exchanges solve this problem.
The majority of decentralized exchanges, such as IDEX and those based on 0x, solve this problem by avoiding it. They either pass the task of calculating matches off to the user or to their Smart Contract. The idea in both cases is to have the user sign a message defining their intent. These signed messages take the form of: “I want to buy 12 units of order 0x13ab…” or “I want to market buy 32 units on contract 0x583…”. Signed messages eventually make their way to a Smart Contract where the intent is applied. This provides high security because the Smart Contract can only execute the user intent or nothing at all. However, this comes at a cost: each and every trade is burdened with a relatively expensive and slow ethereum transaction.
How does the DCN do it? Instead of the user signing a very granular intent, the user signs a trading limit. For example, “spend up to 1.3 ETH with an average buy price order of under 0.123 ETH/Token”. This limit allows for any number of trades as long as the net result is under the limit.
When a user starts trading their limit on the DCN is completely locked down, which prevents all buys and sells. Before the exchange allows the user to trade, it must receive a signed trading limit from the user. The exchange holds onto this signed trading limit and will use it if needed to apply trades on the DCN. If the exchange accepts an order that does not have a signed trading limit than the limit on the DCN cannot be updated and the trade will not be applied.
The DCN is the gatekeeper that ensures trades are valid and allows trades to be submitted in an aggregated batch format. We’ll dive deeper into the DCN in another blog post.
Nitrade is live and current in Beta testing on a development network. Our systems are not stable and will have periodic resets. If you’re interested in having a look at the future, jump right in, but note there’s a reason we’re on a development network with imaginary assets.
What’s next? In the short term, we hope to roll out a stable beta running on a public Test Network. Later down the line, we will opensource the DCN and begin security audits on our system. Once we’re ready we’ll open on the Main Network with invite only access, with a full open release to follow.