Atomic swap of large amounts in cryptocurrency or centralized exchange on Cryptex
18.04.2022 | asorokin
Atomic Swaps or atomic exchange is a technology that allows you to exchange various cryptocurrencies that have their own distributed registries. That is, tokens based on Ethereum can be exchanged inside the network using a native coin for the operation, with an atomic swap, for example, bitcoin can be exchanged for ether without an intermediary, directly. This approach seems very attractive in many cases, however, there are also disadvantages. To begin with, let’s look at how the exchange is organized on the Cryptex exchange, and then compare it with an atomic swap, highlighting the pros and cons of each approach.
Cryptocurrency Exchange on Cryptex
You can consider in detail all the nuances of working on the anonymous crypto exchange Сryptex in the support section, but in general the exchange looks like this:
- an application is created,
- the manager contacts via a convenient channel to clarify details,
- the selected currency is sent to the specified address,
- the target coin comes to the user’s wallet.
At the same time, there is no need to disclose your identity, or in any other way declare yourself, which allows you to fully enjoy the benefits of cryptocurrencies in any transactions.
Cryptex also has its own exchange, where the exchange of cryptocurrencies for cash or digital currency is always available, and for registration it is enough to specify only an email address, which can also be set up on an anonymous service.
The very idea of cryptocurrencies implies working with coins in possession without the intervention of a third party. Although this statement is not completely true, the presence of miners cannot be excluded, but a high degree of decentralization allows in most cases not to take into account this factor. Against this background, there was a request to exchange cryptocurrencies among themselves also without the participation of a third party in the form of, for example, an anonymous exchange.
And to cover this request, Atomic Swaps was developed, where the exchange takes place until the end inextricably, or, in case of violation of any stage of the operation, it is not performed at all. Thus, it was possible to achieve a system in which each side does not need to trust each other.
Not all coins can become participants in an atomic exchange, for this, a certain algorithm must be embedded in their implementation, allowing for a decentralized operation. Most Bitcoin and Ethereum similar coins already have this function in their implementation. The main feature is the ability to create contracts with deferred transfer, as well as the use of the same hash function.
The principle of operation
Atomic Swap uses time-limited coin locks, that is, smart contracts, the support of which is already built into the distributed coin registry. In the simplest case, the terms of the contract imply a change in the owner of one coin, when the owner of another changes. At the same time, the time limit allows you to set a certain period at which, if one of the parties to the transaction has not fulfilled its obligations, the blocked coins will return to their original addresses again. Thus, the exchange will be performed either atomically, or it will not be performed at all.
Schematically , you can describe the exchange process as follows:
- both sides of the exchange create new addresses and exchange them via a pre-selected communication channel,
- the first participant creates a smart contract on which he blocks the agreed number of coins and transfers it to the second participant,
- the second party verifies the received contract and creates its own based on it, which also transmits via the selected channel to the first party,
- after verification, both contracts are verified in the target distributed registries and the hash values of operations are recorded.
It is the publication of transaction hashes that is considered the completion of the exchange. Access to the coins will be obtained only if both participants publish the received values. For atomic exchange, four transactions are usually used, two in each of the distributed registries. In addition, one or another trusted communication channel outside the blockchain must be selected so that it is possible to exchange addresses and smart contracts themselves.
The main problem of Atomic Swaps
The main problem with the idea of atomic exchange itself is the situation of panic sales. For example, with a sharp decline in the quotes of one of the cryptocurrencies, users of the decentralized exchange begin to create smart contracts en masse and register them on the network. At the same time, the queue of such applications is constantly increasing, which leads to an increase in the load on the network and, as a result, a significant increase in commissions and delays in recording transactions in the distributed registry. This, in turn, causes even greater panic in the market, which only increases the number of smart contracts in the queue.
The easiest way is to compare this situation with a real example of a nuclear reaction, when one released radical causes the fission of a neighboring nucleus, which releases even more radicals and so on down the chain to a nuclear explosion, which is still impossible to neutralize — there is simply no such technology. That’s just if they still learned to control the nuclear reaction, and a peaceful atom appeared, then it’s almost impossible to control the panic moods of the masses, like an explosion, even theoretically. Although the crowd can be controlled, but panic always leads to disastrous consequences.
Advantages and disadvantages of Atomic Swops in comparison with Cryptex
As already mentioned, both systems imply a certain degree of anonymity, but it is worth remembering that all atomic exchange transactions always remain in the distributed registers of target currencies. Cryptex does not store information about its users for more than three months, during which it is possible to obtain documentary evidence of operations.
Also, when using a decentralized solution, there is a risk of encountering an unscrupulous second party. There is always a risk of introducing unreliable data into a smart contract by one of the parties, for verification of which it is necessary to have some knowledge of the principles of writing smart translations or to resort to the help of a third party, which also cannot always act in good faith. Cryptex has an impeccable reputation, confirmed by a lot of reviews and a long service life.
Do not forget about large amounts of exchange, especially relatively rare cryptocurrencies, or coins with low trade turnover. Atomic Swaps implies a public transaction, where anyone can see the volume and direction of the exchange. This can lead to a sharp fluctuation of the exchange rate, and in the case of the exchange implementation of a smart contract, the application can no longer be changed. In such situations, Cryptex conducts OTC, in which the rate will always remain fixed, and the transaction itself will take place as soon as possible.
Also, atomic exchange, as it is clear from the article, implies the exchange of only cryptocurrencies for each other, while a number of previously announced conditions must be fulfilled. Direct anonymous exchange for fiat money in digital systems is always available on Cryptex, it is possible to receive funds by replenishing bank cards, and cash dollars are always available in many countries of the world.
Atomic exchange has a fairly high potential, perhaps this particular approach will become one of the stages of the implementation of WEB 3.0, however, centralized exchange will remain as popular as it is now. To exchange cryptocurrencies among themselves, of course, you can use Atomic Swops, but before that you should familiarize yourself with the implementation of the technology in a specific target blockchain, as well as familiarize yourself with the principles of building smart contracts and the rules for their audit. It is also worth choosing communication channels for the transfer of addresses and contracts, which will not be so easy to compromise.