This page is dedicated to explain everything needed in order to trade successfully on the trade portal.
Two things or entities are attached to a trade. They are:
1) AT and 2) Tradebot
What is the AT?
The AT is medium with which the exchange or trade or swap takes place.
What is the Tradebot?
The Tradebot is what controls the flow of Trade and the AT. The Tradebot runs on your system and is ONLY LOCAL to you. Meaning no-one else can use your Tradebot.
Why do you need a Tradebot?
The Tradebot came as a solution to having a simple and successful trade. If you are to run the AT alone, you'll need to manually do everything needed to complete a trade. That is why the Tradebot is there to help you complete the trade. Once again, Tradebot runs ONLY ON YOUR SYSTEM.
TO HAVE A SUCCESSFUL TRADE:
1) You need to make sure your core is running and 2) You do NOT delete or mess with your db.
How can you trade?
To trade, two things are needed:
1) If you want to buy QORT, you need to fund your BTC wallet and 2) If you want to sell QORT, you must have QORT.
People involved in a Trade:
- Bob: Bob has QORT and wants to sell QORT to get BTC
- Alice: Alice has BTC and wants to buy QORT with BTC
Bob want to sell 30 QORT for a total of 0.02 BTC, he goes to the Trade Portal and places a sell order.
What happens when Bob places a sell order?
1) Immediately Bob places a sell order, an instance of a Tradebot will be created and he issues the DEPLOY_AT transaction. 2) When the Tradebot is created, Bob will see a PENDING order in “MY ORDERS”.
1) The Tradebot has been created and it is waiting for the DEPLOY_AT transaction. 2) The DEPLOY_AT transaction has not been included into the block. 3) The DEPLOY_AT transaction failed.
DEPLOY_AT transaction is a normal transaction which creates the AT and the tradeoffer. Just like a REWARD_SHARE transaction that must be included into the block for the Reward Share Key to work, the DEPLOY_AT must be included into the block inorder for the AT to be created. Once this happens, the status of the order in “MY ORDERS” will be LISTED.
This means if your order is showing PENDING, the AT was not created. At this point, your QORT is still in your wallet.
1) The order was successfully created and will be listed in “OPEN MARKET SELL ORDERS” and 2) The order is waiting for a buyer.
Right now, Bob has placed an order to sell 30 QORT for a total of 0.02 BTC
Alice comes online and sees Bob's order and she's interested. She clicks on the order to buy it.
What happens when Alice clicks on Buy?
As soon as Alice clicks on buy, a Tradebot will be created and the Tradebot funds P2SH-A with BTC:
Alice's Tradebot waits for that to appear in the Bitcoin blockchain, so until then her order is PENDING. Once the P2SH-A funding confirms, Alice's Tradebot can MESSAGE Bob's Tradebot with the details and so her order will be in TRADING
Bob's Tradebot recieves the MESSAGE and sends its own message to the AT and the Tradebot locks the AT to trading with Alice. At this point, Bob's order is in TRADING.
Once Alice's Tradebot notices that Bob's AT is locked to her, she goes ahead to fund P2SH-B and then waits until Bob REDEEM's P2SH-B. At this point, her order is still in TRADING.
1) Bob's Tradebot finds P2SH-B on the Bitcoin blockchain and can send secret-B to P2SH-B. Alice uses secret-B and secret-A to redeem the QORT from the AT, so until Alice does this, Bob's order is still in TRADING. 2) After Alice redeems QORT from AT, Bob can extract secret-A and capture the actual BTC funds from P2SH-A to his own Bitcoin account and hence his order will be completed and will be moved to “MY HISTORIC TRADES”.
Once all these steps are done, Alice should have her QORT and Bob should have his BTC
What if something goes wrong?
If something goes wrong then the Tradebot will process a REFUND:
1) Bob's Tradebot refunds Bob his QORT and 2) Alice's Tradebot refunds Alice her BTC.
Important Things to note:
1) The trade takes time and is dependent on the BTC network and 2) Your core MUST BE RUNNING for the trade to be successful.