Skip to content

Decentralized exchanges

2018-9-15
This article has been translated using machine translator. It may not perfectly capture the nuances of the original text. I appreciate your understanding in this matter.

Centralized exchange

Here's a definition of a decentralized exchange, a cryptocurrency exchange is a platform that provides trading services between cryptocurrencies or between cryptocurrencies and fiat currencies. Distinguish between centralized and decentralized exchanges based on whether users have absolute control over cryptocurrencies. In fact, most exchanges are now centralized exchanges, and most so-called decentralized exchanges are not completely decentralized. Different decentralization methods will have different degrees of decentralization.

Centralized exchanges are vulnerable to favor and attack by hackers. After each attack, the damage is more serious, for example, the total value of the funds stolen in 2017 reached about $500 million. If you add together all the hacks before 2017, the total value of cryptocurrencies lost may have exceeded $12.5 billion.

When the trading platform is centralized, it is usually through asset control to make the trading platform operate normally, which will be similar to a bank/such a trusted institution. When using a centralized trading platform, the trading platform actually owns your own funds until you want to withdraw it. In this process, the platform usually stores part of the customer's funds in hot wallets for backup, while other parts are stored in cold wallets.

Decentralized exchanges

Regarding decentralized exchanges, there is a saying on the Internet that the technology has developed for three generations, but I think it is mainly divided into two different types.

Proxy decentralized exchange

We now talk about the first one. This decentralized exchange first has a blockchain network with token functions, and then any individual or exchange can become an agent of this blockchain network, and the agent needs to be responsible for the access and withdrawal of all external assets, that is, the deposit and withdrawal of fiat currency or other token assets. Here, any asset that is not on this blockchain network can be defined as an external asset here.

The user first needs to top up the agent, that is, deposit these external assets in the place designated by the agent. The agent then issues a token that exists in this blockchain network to the user.

If only this step is concerned, it is actually the same as a centralized exchange. That is to say, if the agent disappears during the recharge step, the user's assets may also be stolen.

So in order to better ensure the safety of users' funds, usually these decentralized exchanges will make some restrictions. First of all, for this agent to become an official agent, it needs to provide tokens on this blockchain as a deposit.

Once the agent is unable to pay, the user who transfers the external assets to the agent can be compensated for the liquidation of the system. The source of compensation is the margin. This mechanism is completely decentralized. As a result, the need for trust in the agent has declined.

Fully decentralized exchange

Another decentralized exchange is completely decentralized, and it does not need to have any agents that need to be trusted. It uses smart contracts, and all code is public, viewable, and publicly audited.

We all know that the code doesn't lie, and the results of the operation are very certain. Therefore, no margin is required in this process to ensure the safety of assets. But it has a limitation, that is, it can only exchange between cryptocurrencies, tokens, tokens, etc.

Of course, there are two cases, one is the exchange of cryptocurrencies, tokens, and tokens on the same blockchain network. For example, the exchange of ether with tokens and tokens on Ethereum.

The other is the ability to achieve cross-chain cryptocurrency exchange. But because considering that each blockchain has its own characteristics, how to cross the chain and how to ensure the atomicity of the exchange after the cross-chain, that is/the exchange technology that the transaction can confirm the completion on both chains at the same time. It is also a popular research direction at present.

Trading mode

Decentralized exchange. Its trading model. In fact, it is nothing more than peer-to-peer matchmaking transactions. Or intermediary reserve transactions.

Peer-to-peer matching transactions are the simplest, relatively decentralized, and the most secure for users. It is that the user and another user who needs to trade directly exchange cryptocurrencies or tokens, tokens, etc.

Intermediary reserve transactions, on the other hand, are used by intermediaries as a trust center to temporarily store users' some cryptocurrencies. First, the intermediary may have a certain amount of reserve funds. When a user initiates a transaction, the reserve funds may be used temporarily, and then settled uniformly after a certain period of time. This approach would sacrifice a certain amount of decentralization, however, but for practical use cases where there is a need for small instant payments. There will be greater advantages and development potential.

Advantages

A better part of decentralized exchanges is that. In such a decentralized system, you always have your private key and don't need to reveal it to anyone, so your assets are always in your own hands. Don't worry about asset loss after hacking the centralized platform.

In terms of use, decentralized exchanges, the experience is not as good as centralized exchanges, but this allows users to fully control their account funds. This is consistent with the decentralized idea of blockchain. So I believe that it can develop together with blockchain technology.