Qortal Project

The future of blockchain platforms

User Tools

Site Tools


Sidebar

Qortal Project Wiki

Important Notices

Introduction

Project Model

Minting

Communications

Trade Portal

Qortal Hosting (QDN)

Voting System

AT System

Hardware

Frequently Asked Questions (FAQ)

How-To Guides

Node Setup Guides

Third-Party Services

trade_portal_overview

This is an old revision of the document!


Trade Portal Overview

Qortal’s Trade Portal aims to remove the need for centralized exchanges and ‘decentralized exchanges’ which riddle the blockchain space with all sorts of flaws. That is not to say that all exchanges which claim to be decentralized are flawed, but surely most are. The idea of the Trade Portal is to provide true peer-to-peer (p2p) transactions between buyers and sellers without the need of the middle man by utilizing cross-chain trades in the form of the ‘ACCT’ SmartContract (Atomic Cross Chain Trade). The only authority over a trade taking place is solely between the buyer and seller! The custom trade bot for the buyer and seller automates the multiple stages involved in a true cross-chain trade so that the Trade Portal is as simple to use as any centralized service but without any of the associated risks such as 1) historically these exchanges have been prone to hacks and failure, and 2) depositing assets into a wallet or temporarily releasing control of assets during a trade.

How can Qortal guarantee no theft can occur within the Trade Portal? Simple. The Trade Portal utilizes LOCAL wallets to make trades. At the time of this publication, BTC, LTC, DOGE, DGB, and RVN are natively supported. This implementation of cross-chain trades can be reused for any number of Litecoin forks that work on the same transaction sending and address generation schemes. The DevTeam has taken extensive time to ensure that only LOCAL wallets are made use of and the keys for those wallets are never exposed in an unencrypted fashion. Therefore, the Trade Portal is just as secure as sending from a local wallet to another, except they are one chain to another.

The Portal is a system that makes use of the ACCT system by the CIYAM developers (http://ciyam.org) with which to make completely cross-chain coin/token trades.

Initially, support for only BTC was implemented but found to be too expensive and slow to continue at this time. LTC was then implemented and has replaced BTC. In other words, BTC trade have been discontinued while the BTC wallet feature remains. There are currently LTC / DOGE / DGB / RVN / QORT markets. Native BTC and other coin support in Qortal allows users to store BTC and others in their Qortal UI wallet, just as they would in a BTC local wallet. Without the need for installation of a BTC or LTC wallet itself.

The system currently allows for completely cross-chain trades between LTC, DOGE, DGB, RVN and QORT! Users NEVER RELINQUISH CONTROL OF THEIR ASSETS and never have to 'deposit' assets in order to make trades. This allows for COMPLETE SECURITY. Never again, will there be worry about centralized exchanges failing, and taking with that failure, users' assets.

As time goes on, and development progresses, support for other coins/tokens will be implemented into the system. Votes in the system will be the primary factor as far as which new coins/tokens will be added, however, a vote is not a guarantee of listing, there will also be an independent verification done on the project pre-listing, to ensure only the most quality projects are listed in the Trade Portal. For now, we have two coins to provide a gateway to obtain QORT and the DevTeam can focus on other priorities.

Functionality

The Trade portal functions by making use of an automation system that creates and executes placement of ATs on behalf of the private key of a 'logged in' account.

The account's 'bot' (for lack of a better term) takes the trade data from the user, and issues a SmartContract (AT, ACCT AT to be exact) that then awaits input from another user, then picks up on behalf of both users, to execute a Cross-Chain trade.

All that is necessary for the user, is leaving their core running.

Important note: If you wipe your database then you will lose access to any funds tied up in trades (QORT, LTC, DOGE, DGB, or RVN). For pretty much the same reason as if you wiped your Litecoin wallet DB.

Additional Notes

The Trade Portal is peer to peer and quite a complex sequence of communications need to take place between the buyer and seller's node. There is no central server to ensure everything goes smoothly - it's down to both the parties following the "rules". When a trade is unsuccessful, it is likely that the TradeBot has stopped working on the buyer’s or seller's node. This is why the automatic refund feature exists - as a fallback for when one of the two nodes isn't correctly participating in the trade. This is something that we have to live with in a trust-less, decentralized environment. It will never be as "user friendly" as a centralized exchange but that's the price of not having some central entity dictating what you can and can't do. And we're lucky that with LTC the fees for a failed trade are almost zero.

That being said, it's likely that a lot of these issues could be detectable upfront - e.g. we may be able to better screen out offers where the buyer’s or seller's node isn't in the correct state. "PRESENCE" transactions were the solution to this as we now remove offline nodes from the list (some will remember that in the first version of the trade portal it was pot luck as to whether the buyer’s or seller's node would be even online when you traded). So this concept could probably be expanded upon, and we could also do something like dropping an order from the list if there have been multiple failures associated with it.

We will try and look into this particular sell offer as soon as we can to see if anything can be improved in the next version(s).

Currently, if the node that listed the sell offer is in a bad state, all attempts to buy it will be refunded (after 1 hour or more). The sell order disappears from the list as soon as the selling node acknowledges that there is a buyer - we refer to this as "locking the trade" to the buyer. In this case, the seller's node never responded so there was no acknowledgement. So your idea of hiding the order as soon as there has been a buy transaction is a good one and would have helped here. But we'll need to make sure that the buy offer is valid before hiding anything - i.e. they have paid enough LTC.

When we're dealing with cross-chain trades, there is no way to avoid the transaction fees on the chains involved. That’s just part of the deal when you're taking the middle man out of the scenario. Whether the trade fails to complete and is refunded, or completes, there will be a TX fee on the LTC chain. That will never change. The tx fee is very low and we can't be thinking of this like a centralized exchange, it isn't one. It is far superior in every way; exchanges are manipulated at best, and straight up scams at worst.

QORT will eventually go fee-less on QORT side for trades, but there's nothing we can do about the external chains involved. We have no control over their networks and can only play by their transaction rules. In our opinion, the tiny transaction fee is absolutely worth there being ZERO risk of loss in the trades. We can probably add additional checks before submitting the presence transactions. This is something to look at when the current features are out of the way.

It is normal for cryptocurrency transactions to take a while and not be immediate. They take a certain number of "confirmations" before they become spendable in the receiving wallet. For LTC that can be 10 mins or so, for BTC it can be up to an hour. So this is a limitation of the BTC/LTC/etc networks. Luckily QORT transactions are much faster. Also, if the other network has a lot of demand for transactions, it can take a while for it to even be processed and included in a block. Especially if the fee is low. So that can slow things down too.

Atomic Swaps in Trade Portal

With Qortal, we are swapping directly between blockchains with absolutely no central component between them (and no need to trust an entity to "wrap" a coin in a token or any other centralized techniques like this). True cross-chain swaps require multiple transactions to occur sequentially on each chain, and each of these transactions needs time to confirm before it moves on to the next.

If any other platform is swapping instantaneously or within seconds, then it isn't decentralized. The only way to swap that quickly is to have a centralized component handling the swaps, or by staying on a single chain (e.g. using a wrapped coin).

As of August 29th, 2022: Note that confirmations on the QORT side do currently take longer than they ought to, and this slows down the trade process. Longer term we should be able to solve this and this will speed up each trade by 5 mins or so.

How To Use The Trade Portal

Please note: there two ways to obtain QORT: 1) minting and 2) Trade Portal. To learn more about becoming a minter, please refer to the Minting Overview page.

To trade for QORT in the Trade Portal, you’ll first need to run your own node as everything within Qortal is truly decentralized. This means there is no centralized service or vault from which you can purchase QORT. You’ll need your own node, fully synced, to utilize the Trade Portal. You’ll need to purchase LTC or the other coins we support on a third party exchange, then send to your Qortal wallet. For example, you can purchase LTC on Coinbase, then send to your Qortal LTC wallet. From there, you can purchase orders in the Trade Portal between LTC & QORT.

Please note: you can use any third party exchange, and choose from any of the coins we have built support for. We are simply using Coinbase and LTC as examples. As of November 2022, we currently support wallets and trading for BTC, LTC, DOGE, DGB, RVN, and ARRR. More coins will be added over time when we can allocate more developer resources. The adding of new coins will done after community vote to choose which coins the devs should invest time building support for. You can learn more about that voting process on the Voting System Overview page.

Trading For QORT Walkthrough

This walkthrough will show the general process for sending coin to your Qortal wallet, to then be able to utilize the Trade Portal to obtain QORT. The example below is for using Coinbase to obtain LTC, then send to your Qortal wallet, then trade LTC for QORT using Qortal's Trade Portal.

Step 1: Buy Litecoin

1. First you need to make sure your Qortal core is installed correctly, and up and running, fully synced.

2. Next, you’ll need to go to a third-party exchange like Coinbase https://www.coinbase.com to buy some Litecoin (abbreviation LTC) with your ‘fiat’ currency such as USD.

3. On Coinbase, once you’ve purchased your Litecoin, go to SEND/RECEIVE and fill in the address of your Qortal Litecoin wallet. You’ll find this within the Qortal User Interface (Qortal UI).

Please note: your addresses for QORT, LTC, DOGE, BTC & other coins we will support are different addresses. The Litecoin address that Coinbase is asking for (long string of letters/numbers) will be found in the Qortal UI, by clicking on WALLET in the menu at left. Then click on LITECOIN. At the top of the page it says CURRENT WALLET, and the address is directly underneath. Copy the address, and go back to Coinbase, and fill in your Litecoin wallet address. Then send.

Step 2: Trade Litecoin or another supported coin for QORT

1. We will use LTC in this example, same process applies for all. Once your Litecoin shows up in your Qortal Litecoin wallet, you’re ready to trade it for some QORT. For a full explanation of what actually takes place during a trade, see Trade Portal Overview and How The Trade Portal Works

2. Click on TRADE PORTAL in the menu at left. At the top you’ll see a box marked SELECT YOUR COIN. Choose LTC.

3. Now look in the box of OPEN MARKET SELL ORDERS. Here you’ll see the current sell orders listed by other QORT holders. Please note: there are no sell walls; you can purchase any listing in any order. Pay attention to the cost per QORT as these listings are totally up to the seller to set, and for you as the buyer to select. The second column, which shows the price being asked by the seller, can be configured to show the offerings with their prices listed from low to high, or from high to low.

Take a look through the offerings and choose one that’s selling an amount of QORT that you want, for a price you want to pay. Click on that offering.

The field in the lower right hand BUY/SELL box will automatically populate with the price and quantity of the chosen offering. Click the BUY button.

4. Now you wait a bit, while the process completes. Meanwhile you’ll see your order listed in MY ORDERS (lower left), with the status of BUYING.

FYI: Pages don’t refresh automatically to show updated status. Click away then come back in a few minutes, and you should see your completed trade listed in MY TRADE HISTORY, with the status of BOUGHT. And that’s it! You now own some QORT! Otherwise, the order may be refunded due to someone else making the purchase before you did, or the seller’s node failed to stay online. Remember, this is blockchain technology and truly decentralized peer to peer, so these refunds can happen as it takes time for each block to process the transactions. This is the nature of the system, and will be further improved with time!

trade_portal_overview.1668597371.txt.gz · Last modified: 11/16/2022 06:16 by gfactor