crypto.bi – ELI5 Cryptography, cryptocurrency and programming

ELI5 : How crypto exchanges work

Exchanges are online markets where one can trade cryptos. It is where all the “pumping and dumping” you keep hearing about happens. (In contrast with real world stock exchanges, pumping and dumping is not illegal in cryptocurrencies, in fact it is a fairly common practice.)

Newcomers to cryptocurrencies often ask how these exchanges work, what risks are involved and other beginner questions. In this article we try to introduce you crypto exchanges and give a general view of how they work.

Virtual Wallet

Every account receives a wallet for each cryptocurrency that you wish to deposit and withdraw. The exchanges have massive databases of customer addresses linked to wallet addresses. That way when a deposit is made to a certain address, the exchange knows which customer’s account they must credit when a deposit event is detected on the network.

In essence, wallets consist of a private key (see this article for an introduction to public key cryptography). This private key is a big number that is usually stored in an encoded fashion. Here you can see an example private Bitcoin key:  E9873D79C6D87DC0FB6A5778633389F4453213303DA61F20BD67FC233AA33262

Exchanges manage millions of such keys in their massive customer account database. To be able to move the funds, this private key is used to sign the payment orders. Since the number of Bitcoin (and other cryptos) addresses is unlimited for all practical purposes, exchanges can afford to create as many addresses as they need, even providing new and different addresses for each customer during different deposits. This helps guarantee a certain level of privacy – but it also means the exchange has to manage immense amounts of data and potentially tens of millions of keys.

As you may guess, if these keys are somehow damaged or lost, all the corresponding funds are lost as well. The private key is the only piece of data capable of moving the coins designated to that particular address.

What newbies should know is that exchanges manage millions of virtual wallets where you can deposit to. This becomes the exchange’s funds. Some exchanges are audited and some are not, so there really is no regulation about how the exchanges are required to manage these internal wallets.

When a new coin is launched, the exchanges must install a system capable of receiving deposits and processing withdrawals in that particular cryptocurrency. Adding currencies to exchanges is an expensive procedure, since they must then manage wallets in a new currency, which requires all the security and proper backup and monitoring operations for each coin. Therefore adding virtual wallets for new coins to the big exchanges is a goal for most new cryptocurrencies. When new coins are added to big exchanges like Poloniex and Bittrex, they usually gain a lot of value. “Adding a new currency to an exchange” is simply the act of adding virtual wallets for that particular coin, for which the system will now understand deposits and withdrawal orders.

In summary: exchanges manage millions of virtual wallets in each cryptocurrency they support. You should NOT use this address as your own wallet, for several reasons, most important of which is security. See our tips below for recommended wallet management habits.

Deposits and Withdrawals

When you wish to deposit a certain cryptocurrency, the exchange will create a unique address for you using the virtual wallet that was created for you. This address will be tied to your trading account such that when you deposit coins into this address, your account balance will be automatically updated.

Withdrawals work a bit differently, though. The exchange need not use your particular wallet to send out funds. In fact, when you check your withdrawal transaction against a blockchain explorer like blockchain.info you will normally see the funds coming from a different address than the one you used for deposit. This makes it very hard to audit the flow of money into and out of exchanges.

Keeping a correct balance between deposits and withdrawals, when they don’t happen on the same wallets, is one of the key missions of a successful crypto exchange. When there is an error in this system the results can be catastrophic. Unfortunately, exchange insolvency due to errors or foul play on the deposit/withdrawal system has not been uncommon in the early years of cryptocurrencies. The Cryptsy and Mt Gox exchanges are a reminder of this.

Trading

Once you have deposited a certain amount of cryptos, you can then begin trading. As soon as the deposit is cleared, you may begin exchanging this balance for other cryptos. Each crypto trading pair is called “a market”. This may seem confusing to traditional stock market investors, but when you think about it it begins to make perfect sense. In traditional stock markets only “FIAT currency” can be traded for securities, therefore they are composed of “a single market”. But in cryptos, there are literally thousands of currencies which can be used.

So the first thing is to choose a proper market or crypto pair. Say you have deposited 1 Bitcoin and you wish to begin trading for Ethereum. You would then choose the ETH-BTC market. It takes a little getting used to, but when you practice trading it all begins to click and make sense.

Just like with traditional stock market brokerages, some crypto exchanges offer an extra credit for customers with a certain verification level. Remember, there is no regulation in the crypto markets, so exchanges must take extra measures to identify their customers and make sure a fair system is in place. Investing over your balance is called margin trading, just like in traditional stocks. NOTE: Margin trading is considered very high risk and should be avoided by both new and experienced traders. When a high margin trade goes well, it can reward the trader greatly. But when they go wrong, usually it’s the last you will see of this trader – end of career and perhaps a immense debt accumulated with the house.

The actual trading works just like traditional stock markets. There is a stack of bids, with the highest bid first. And there is a stack of sell orders (asks) with the cheapest offer first.

When you bid an amount equal to or higher than the lowest offer, your order gets executed. If your order is big enough and your bid is high enough to cut through the first sell order, you will execute against successively higher asks until your order is fully executed. The best exchanges offer a real time view of order execution, with alert messages notifying of each executed batch.

Orders can be limited to a certain period, such as “valid for a day” or unlimited, such as “valid until fully executed”.

When a buy order does not reach the lowest offer, it will remain in the buy stack until an offer can fill it. Conversely, when a sell order does not match the highest bid, it will remain in the offers window while it is valid or executed.

Some exchanges are notably buggy and do not match the buy orders against the lowest prices. Therefore if someone says “buy Bitcoin at u$ 60000” by accident (one extra zero accidentally added), a buggy exchange might execute the order at that price. This is an extreme example, but the reader should know that some exchanges do not offer protection in this case. Better exchanges will only match against the lowest offers (which is the correct behavior), so even if you add an absurd buy price, it will execute against the lowest available price. This is also how real world stock trading works in Nasdaq, NYSE and others.

Tips for a fun and secure trading experience

Exchanges manage millions of wallets. As you can imagine, this is a high responsibility task. And as with all information technology, things can go awry very fast. Disk crashes, hacker attacks and other incidents may compromise the exchange wallets and all the funds are gone forever. It is impossible to be 100% safe on any exchange, but here are some tips to minimize risk.

Most Popular Exchanges

Coinbase: Probably the largest Bitcoin broker available. US and European customers can link bank accounts and trade like a real world stock exchange, using real currency. Coinbase also offers payment solutions for online merchants. Excellent quality, but be prepared to undergo a stressful verification procedure. The verification has its benefits, though, Coinbase is very well regulated and one of the more trustworthy exchanges.

Poloniex : One of the bigger exchanges, works very well for Bitcoin against other cryptos. Withdrawing in some cryptos, notably NEM, can take a very long time. Customer support is basically inexistent, there are reports of support tickets remaining open for months. User verification is very slow, so your account will likely remain limited to a couple Bitcoin withdrawals / day limit for a very long time. Rumours come and go about the state of Poloniex’s solvency, but at the time of this writeup so far the exchange continues to function well. Bitcoin withdrawals and deposits are usually very quick.

Bittrex: A big contender for Poloniex, Bittrex has a bare bones feel to it where form follows function. It is design to work fast, without too many user interface bells and whistles. Orders are executed extremely fast as well. As with other exchanges, Bittrex support is overloaded with requests and tickets can take weeks to months to be resolved. Withdrawal limit for basic accounts is higher than the other exchanges. Currently this limit is 3 BTC per day, which is approximately U$ 18,000 at the current BTC/USD rate – a rather nice limit for beginners.

Bitfinex: This exchange quickly became a crowd favorite, right up until it got hacked and tens of millions of U$ were lost. Still very popular and used by thousands of traders.

HitBTC: HitBTC quickly gained popularity due to its early adoption of Ethereum ERC20 compatible tokens. Therefore most ICOs end up getting traded on HitBTC very early on. User interface is well implemented and it is very simple to use.

EtherDelta: ED is also one of the more popular Ethereum-based token trading platforms. ICO tokens end up getting listed on EtherDelta very early on, so it has become a crowd favorite. Trading experience is not very good on ED, their buy and sell orders windows get outdated quickly and during high demand sessions it’s very clumsy to trade quickly. Once orders go stale or are executed by other users, your window will not get updated quickly enough and you end up with the dreaded “this offer is no longer available” message. With some evolution ED can well become one of the big guys in Ethereum token trading.

Here we covered just a few popular exchanges. There are literally dozens of other exchanges. We recommend that you perform due diligence and research each exchange, look for signs of insolvency and read chat rooms and social media looking for signs that something may be wrong. If you do not find too many complaints, then the exchange may be worth a try.

Conclusion

We hope this quick tour through exchanges helps you on your quest to become a master crypto trader! The basics of crypto trading are the same as real world stock, commodity or derivative trading. Margin trading is too risky and should be avoided at all costs.

Remember : crypto currencies are still on the wild west era with little regulation, so the main rule with cryptos is “you are your own bank”. When funds are lost, there is no one to complain to. Lawsuits are basically impossible and cases like Mt Gox are still ongoing, so there is little legal precedent for new cases. The Cryptsy and Mt Gox scandals hit the crypto trading community hard and should serve as a reminder that traders must be always vigilant. With cryptos, you are on your own.

Maintaining vigilance and following simple security habits, like withdrawing often and not leaving funds on the exchanges when not trading, can go a long way in making your life as a trader fun and profitable.

Good luck!

Exit mobile version