📜 ⬆️ ⬇️

Decentralized exchange - already half a year in service

Hello! Today I will tell you about the decentralized cryptocurrency exchange. That is, the technology with which you can trade directly with other users, without having to trust your funds to an intermediary exchange. Yes, it has already been implemented and has been working since April. Called Asset Exchange.



For me it was a surprise to know that even many cryptocurrency enthusiasts do not know about it, and that it was never mentioned on Habré. At the same time, it is both an interesting technology and a rapidly growing financial market.
')
Many have heard about NXT. In short: this is not a Bitcoin fork, but a separately written cryptocurrency, working on the principle of Proof-of-Stake. She has been around for about a year, and I already talked more about her almost a year ago. Many interesting pieces are already built on the NXT blockchain:


To trade on the Asset Exchange, you only need an NXT wallet. All actions are performed directly in the official client. The currency in which all trades are made is NXT. Assets that are traded on the stock exchange are called Assets. That is, we sell and buy certain assets for the NXT.

How it works?


Asset is the debt of the issuer that issued this asset. For example, I have a Sapp24 grocery store, and I intend to turn it into a chain of stores throughout the city. To do this, I decide to issue shares, and the depositors who bought the shares will pay dividends from income. So, I create an SAPP24 asset on the stock exchange and issue 10,000 units - this is like 10,000 shares of my store. I put them up for sale on the stock exchange at a price of 100 NXT for 1 SAPP24. Another user buys 50 SAPP24 from me for 5000 NXT - and I automatically get my NXT, and he gets his SAPP24 assets. Now they belong to him, it is recorded in the blockchain, and he can put them up for sale at a higher price or transfer to another user.

Trading takes place using the same algorithms as on the stock markets we are used to. There is a queue of applications for the purchase of an asset — at prices lower than the current one, and a queue of applications for sale — at prices higher than the current one. Everyone can buy or sell an asset at the best price from the existing applications or create their own application by setting the price they expect. When the next order "overlaps" at the price of counter orders, they are automatically executed.



Everything is stored in the blockchain: information about the created assets, transactions for the purchase / sale / transfer of assets, applications for the sale / purchase of assets. All transactions are carried out between users of the exchange directly. Thus, the exchange does not depend on the reliability of the central service, because it simply does not exist.

What is already possible to trade?


We go to nxtreporting.com - this is such a blockchain. Info for NXT, and look at the list of existing assets. By default, they are sorted by trading volume. For example, now in the top:

And many others. New assets appear regularly, new markets grow like mushrooms. Daily trading volume already exceeds 1.2 million NXT, or about $ 27,000 at current rates.



I want to try! What to do?


1. We get NXT-wallet

We need an NXT client. I use Wesley's client, which is available here: nxtra.org/nxt-wallet
We can choose any other option on the official website of the NXT community: www.nxtcommunity.org/nxt-cryptocurrency/get-started-nxt
NXT clients use Brainwallet technology. Your private key for access is completely represented by one long and reliable passphrase. To create a wallet, just create and enter a long passphrase that no one can guess or pick. For this passphrase, you will enter your account and confirm its operations to it. In this case, you do not need a wallet file, and the only way to lose your wallet is to forget the passphrase.

How to come up with a good passphrase?

Recommend doing so. We take a quotation known to us or another set of 5-10 or more words that is easy for us to remember forever. Then we change in this phrase some words, letters or symbols in an illogical way so that your password is not picked up by this most famous phrase. And we add to the resulting phrase another small password from random characters in order to finally level any probability that the password can be picked up.
My password is a quotation from a book consisting of 7 words, one of which is replaced by the unexpected, they are typed in Russian keys in the English layout without spaces, and at the end a 9-character password of random Latin letters and numbers is added. It is safe enough.



When the client starts, you will need to wait for the blockchain to load. Nothing new here: the same happens with the official Bitcoin client. When the client is launched, on the left-top we can see our NXT address.
Here, for example, mine: NXT-MCPE-JZ9C-7EDH-84Y9Q



This is the address to which you can transfer NXT from the exchange, and they will be in your account. For more information about your address, click the “More info” button under “Account Balance”:



2. We get money on the wallet

There are several options. You can buy NXT for bitcoins on exchanges:
bter.com/trade/nxt_btc
dgex.com/ex11/#/exchange/DGEX/BTC/NXT
www.cryptsy.com/markets/view/159
Also on bter and cryptsy you can buy NXT for USD and for CNY.

You can get BTC Assets (mgwBTC) immediately via Multigateway: multigateway.org



Detailed instructions on their website: multigateway.org/user-guide
You will need to install the extension for the official client. There is nothing wrong with that.

3. Let's go trade!

In the NXT-wallet, go to the Asset Exchange section in the left menu:



Click the Add Asset button on the right-top:



And enter the asset ID that we want to buy.
For example, if we looked at the information on the mgwBTC asset on the nxtreporting site and decided that we want to buy bitcoins through a decentralized exchange for the NXT, then here is our Asset ID: 4551058913252105307



Enter it:



We get to the page with information about the asset and we can already trade them.



The interface of the exchange is familiar - there is a “glass” of buy and sell orders, and I can place my order at the desired price.
For example, I want to buy some mgwBTC:



I confirm the application with my password:



Everything! The application went to the network, I soon receive my assets. And in the case of mgwBTC , for example, I can bring them to real bitcoins through automatic Multigateway.
The time for which the application goes to the network is usually about a minute. This is the time during which the nearest block in the blockchain is generated - our application falls into this block.

Assets that we have can be seen in the My Assets section:



In the same place, as you can see, there is a Transfer button that allows you to transfer assets to another user.

The Open Orders tab contains all my current applications for buying / selling assets:



How to create your asset?


To do this, we click the bottom button in the section Asset Exchange - Issue Asset.



Enter the name, fill out the description. Enter the number of assets that we issue. We indicate to what decimal point they can be divided. For example, I entered the value 1 in the Decimals field - one decimal place. That is, you can buy, for example, 0.3 SAPP24.
The minimum fee for creating an asset is 1000 NXT. Yes, it is a lot. In order not to litter the network with thousands of useless assets, such a filter was introduced. Having demonstrated the seriousness of our intentions, we pay this commission, and it is received by the one who generates the corresponding block in the blockchain.
Enter the password, click Issue Asset, - that's it.
Now we go to the forums and tell everyone about our beautiful idea, give our Asset ID, attract people to our IPO and wait for our asset to take off to the top in terms of trading volume.

I hope, I managed to introduce a little habratchitelI up to date. It has already turned out quite voluminous, although I touched on the topic only superficially. Ask questions, try to clarify what I can.

Source: https://habr.com/ru/post/239279/


All Articles