Anyone, please put some light on this:
I am trying to understand how the asset exchange works and how a decentralised exchange can be built on the current API, but I am not sure I am getting everything correct. Please, help me:
Issue assetCreates an asset on the exchange
Request
Code:
http://localhost:7874/nxt?
requestType=issueAsset&
secretPhrase=123&
name=turtleCoin&
description=This+is+Turtlecoin+issued+by+Tommy-Turtle&
quantity=500&
fee=1000&
referencedTransaction=65374835678
Q: Only the "seller" creates the asset and pays for it minimum of 1000 NXT. Correct?
Q: In this asset, the asset creator (seller) is selling 500 units of Turtlecoin.
Correct ?
Transfer assetUsed to transfer a quantity of asset from one account to another
Code:
http://localhost:7874/nxt?
requestType=transferAsset&
secretPhrase=SECRET&
recipient=ACCOUNT&
asset=ASSETID&
quantity=QTY&
fee=FEE&
deadline=DEADLINE&
referencedTransaction=REFTXID
Q: Transfering asset means to transfer some of the turtle coins (product) from the main asset with total quantity, which represents the market, to the account which has placed an acceptable bid price. Correct?
Q: Only the seller (asset creator) can do this only for his assets. Correct?
Q: When this transfer is performed, there is a difference from the initial quantities, the main market assets quantity decrease with the bought amount from the bidder, and the bought amount is transfered to buyer transfer account. But how is represented the added quantity of product to the buyer account and where can be checked this new balance of "item" ? As we know, account has only one property of balance, and these are NXT's.
Q: Using the "reference transaction", seller can make an insurance, that if the buyers payment for the item is still not confirmed to be sent to his account, the adjusting of the quantity item also will not be processed. So, if the buyer does not pay, he does not get the product. However, how can the buyer get protection? He can send money and then get nothing, because, for example, if the seller is selling BTC, BTC transactions are out of the NXT protocol and can not be tracked and confirmed within the exchange asset?
Q: As price is expressed only in NXT, does this mean, that on exchange asset you can do only one-way deals? For example, you can sell BTC for NXT, however, you can not sell NXT for BTC?