A Decentralized Cryptocurrency Exchange Via Ethereums Turing

0
91
Crypto Currency Decentralized

A high number of cryptocurrency exchanges have experienced cyberattacks that resulted in the loss countless US Dollars worth of bitcoins and altcoins, throughout the previous 4 years. Generally, most cryptocurrency exchanges use centralized servers, where trading occurs, to store and manage digital assets, which renders them highly valuable targets for hackers. Consequently, decentralized exchanges signify ideal choices to protect cryptocurrency exchanges against such cyberattacks.

Hallex is a just introduced trustless exchange platform for various digital assets including cryptocurrencies. Hallex is built at the top of Ethereum’s Turing-complete blockchain. Through combining digital signatures with smart contracts , Hallex applies asset trades’ rules at low latency. Although these rules leave the exchange rather centralized, they do not put trust in any intermediary third parties. This approach integrates the values of central exchanges, including speed and cost, in addition to the benefits of decentralized smart contracts, giving high degrees of security and settlement speed.

What is the thought behind Hallex?

The main idea will be to save the order book on the exchange’s centralized server, yet genuine trades will simply be executed via smart contracts which will demand specific security rules. Practically speaking, a user will just give the exchange permission to perform the minimum actions needed; to purchase/sell X amount of an asset Y at a cost Z within a certain timeframe of T blocks. At the next block, an individual can further revoke this authority whenever wanted. A digital signature is utilized to provide the authorization. This digital signature is validated via way of the smart contract in the following block.

The below figure illustrates the Hallex protocol. Traders A and B exchange 100 of Y shares. The order book is saved on the exchange’s central server which promotes low latency order fitting; nevertheless, the trade’s smart contract is saved about the blockchain which renders the commerce decentralized and trustless.

By using this strategy, the centralized exchange WOn’t have any access into a user’s assets, as smart contracts are used to shop and protect assets all the time. Hence, even whenever exchange becomes subjected to a cyberattack, the assets would stay safe.

Possible Assaults on Hallex and Mitigating Them:

As stated by the protocol illustrated in the above mentioned figure, a malicious exchange can do the following attacks:

a. Delay/garbage orders’ processing

b. Delay/garbage nullified orders

c. Reorder intra-block transactions: Because of the fact that an arrangement is only established when a brand-new block is mined, theoretically, the exchange can re order transactions before they may be stored on the blockchain.

Even though all present exchanges can experience these sorts of attacks, Hallex mitigates them economically; thanks to the transparency provided by the blockchain. To foster transparency, the exchanges must spread trades after two orders are fit. The protocol was made to incentivize exchanges to do so by offering them a reward for each pair of orders matched. The amount of the reward is computed using an exponentially decreasing fee function such as:

f = e-x 0.9 0.1

where x represents the time, in blocks, spent by the exchange to fit two orders and f is the fee collected from discovering a match. Every single order is assigned a starting block number, which determines when this particular order could be processed about the blockchain. If the exchange succeeds in matching the order in this block, it’ll be rewarded with all the most fee. On the other hand, if the order is matched at a certain point later on, according to the above mentioned equation, the fee is going to be exponentially lower depending how many blocks happen to be developed by time the order was matched. As a result, whenever an exchange deliberately delays processing of an order, it will be literally penalized when it comes to collecting lower transaction fees. As such, fair exchanges will soon be consistently maximally incentivized to support immediate processing of orders whenever feasible.