High-Frequency Crypto Trading: An Essential Guideby@yellownetwork
1,951 reads
1,951 reads

High-Frequency Crypto Trading: An Essential Guide

by Yellow NetworkMay 24th, 2022
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Rep is the world's first AI-powered sales associate for e-commerce businesses. Co-founder and CEO of Rep is best friends and best friends. They want to power any consumer brand with its own branded AI sales associate and increase the brands' sales through a guided shopping experience on their website and on various other platforms. We have a 90% conversion rate from a demo to a trial and a 100% conversion to a paying customer. We will focus more on the mid-market sector as they are trying to grow and compete with enterprise brands, and this is where we can help the most.

People Mentioned

Mention Thumbnail
Mention Thumbnail

Companies Mentioned

Mention Thumbnail
Mention Thumbnail

Coins Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - High-Frequency Crypto Trading: An Essential Guide
Yellow Network HackerNoon profile picture

Due to its volatile nature, crypto could be even a better match for HFT than the traditional markets.

High-frequency trading in the crypto market has been on an upward trend for some time now. With prices being so volatile and inconsistent across various platforms, it’s no surprise that HFT traders see this as their opportunity to make big bucks.

However, the decentralized nature of the crypto industry requires HFTs to put some sweat into adapting to its specifics and play by different rules than those of traditional markets.

This article will cover how crypto HFT is different from the conventional one, its current best practices, and bottlenecks.

So let’s get started.

What is high-frequency trading?

In terms of the traditional market, high-frequency trading can be broadly defined as a type of trading utilizing specialized technology that allows the execution of a large number of trades within milliseconds. At the core of HFT are trading algorithms designed to execute lightning-speed trades when specific, pre-defined parameters are met by an asset’s price across different markets.

In its Concept Release on Equity Market Structure, the US Security Exchange Commission identifies five key characteristics of HFT:

  • Use of extraordinarily high speed and sophisticated programs for generating, routing, and executing orders.
  • Use of co-location services and individual data feeds offered by exchanges and others to minimize network and other latencies.
  • Utilization of concise time frames for opening and liquidating positions.
  • Submitting multiple orders that are canceled shortly after submission.
  • Ending the trading day in as close to a flat position as possible (that is, not carrying significant, unhedged positions overnight).

Basically, regular HFTs make money by taking advantage of the disparity between the bid and ask prices across different markets by using latency to buy and sell assets in microseconds.

Who does high-frequency trading?

Most high-frequency trading is carried out by hedge funds, investment banks, and broker-dealer companies, using clients’ money.

However, there are also proprietary trading firms (or “prop trades”) that engage in HFT, utilizing only their own resources to create profit. Many of these firms act as market makers.

How is high-frequency trading different in crypto?

Traditional HFT and crypto HFT are pretty different worlds.

While traditional HFT happens on conventional centralized exchanges and is mainly about the speed of the underlying trading algorithm, crypto HFT deals with decentralized trading environments and is defined by a completely different set of factors. Let’s look at them.

One of the most crucial is the block-time speed factor, which influences how fast transactions are processed by a network and, hence — executed. The miners producing the blocks and nestling them into the hash are responsible for the block time. It does not matter so much how fast a trader executes an order on their side since there will always be a delay, depending on the network. For example, the Ethereum network has a 15-second lag, while the Bitcoin network may take up as much as ten minutes.

Another factor that sets crypto HFT apart from the traditional one is the transparency of transactions. Everyone can see your orders, including pending ones in mempools and your slippage protection settings. While transparency is an outstanding benefit of blockchain technology, for HFTs, it could be a problem. The thing is that transparency makes HFTs exposed to front-running attacks and manipulations with transaction order. We will discuss them further in the chapter on crypto HFTs limitations.

Transaction cost factor. In traditional markets, HFTs can always calculate their transaction costs in advance and adapt their trading strategies accordingly. However, in decentralized finance, this cost is way less predictable. For example, on the Ethereum network, gas price varies depending on market conditions and network load. As such, traders always run the risk of their trades turning out unprofitable.

Strategies of High-Frequency Crypto Trading

In crypto, HFT mainly relies on the following strategies:

(i) Crypto Arbitrage

Crypto arbitrage is a trading strategy that makes a profit on slight price discrepancies of a digital asset across multiple exchanges. Oversimplified, crypto arbitrage trading is about buying a digital asset on one exchange and selling it simultaneously on another where the price is higher.

(ii) Crypto Market Making

A market maker simultaneously places limit orders on both buy and sell sides and earns while profiting from the difference in the bid-ask spread. Often, market makers are hired by crypto exchanges to provide liquidity on particular digital assets and maintain the market in a good state.

In other scenarios, market makers might have no collaborations with exchanges and trade in their own interests.

(iii) Smart order routing

Smart order routing (SOR) systems enable traders to access multiple liquidity pools simultaneously to identify the best order routing destination and optimize order execution. They scan pre-defined markets in real-time to determine the best bid and offer quotes for a specific order, thereby achieving the best price.

The smart order router selects the appropriate execution venue on a dynamic basis, i.e., real-time market data feeds. Such provisions support dynamically allocated orders to the execution venue, offering the best conditions at the time of order entry, including or excluding explicit transaction costs and/or other factors.

Limitations of high-frequency crypto trading

Despite the tremendous potential upside of trading on the crypto market, HFTs face multiple risks and limitations. The main those are:

  • The inconvenience of the crypto market infrastructure. We have already discussed this topic in the previous articles. In a nutshell, this inconvenience comes from the crypto market and crypto liquidity fragmentation, and the lack of relevant user interface on trading platforms.

  • Dependence on block speed. As discussed above, an HFT trader’s room for maneuver is always limited by the block speed of a particular network. That means that an HFT can not leverage speed as a factor enhancing their trading strategies’ efficiency.

  • Risks of trading on DEXs. We covered them in-depth in the article “Major Weak Points Of Crypto Exchanges That Create Unprecedented Risks For Traders.” Briefly, these are the security risk, DEX’s poor liquidity and low-speed functionality, risk of self-custody, and no ability to recover the trading account once the private keys are lost.

  • The risk of unexpected slippage. Because DEXs’ liquidity is often thin, prices of tradable digital assets are vulnerable to any market fluctuations. In other words, large-scale transactions on DEXs can potentially increase assets prices volatility. As a result, an HFT’s order could execute at a price worse than what was intended.

  • Risk of “sandwich attack.” This is a type of front-running activity conducted by unfair traders on DEXs. Briefly, an attacker uses spy nodes to detect transactions of a victim before miners execute them. This is the situation when a victim’s transactions are already broadcasted to a public p2p network and placed in a mempool but haven’t been processed by a miner yet. In this case, an attacker would try to place their transaction before a victim’s and get its faster execution by paying a higher gas fee. At the same time, an attacker would issue another transaction (back-running one) with a different gas fee and asset price that is intended to be executed right after the victim’s one. The whole purpose of this sandwich strategy is to manipulate the transaction order so that it would cause a slippage for a victim. At the same time, an attacker would earn on arbitrage via the back-running transaction. If you want to see how it works on graphics, please check out this fantastic research: “High-Frequency Trading on Decentralized On-Chain Exchanges.”

    What will make high-frequency trading in crypto easier?

    First, let’s look at the existing best practices and solutions that help HFTs overcome the described above challenges.

    • Mempool monitors are special programs that keep tabs on the pool of transactions ready to be included in the network. These allow HFTs to detect opportunities in a set of DeFi protocols and adjust their trading strategies for better profitability.

    • Another measure is gas accumulation, which allows traders to have reserves of gas that can be used for accelerating transaction processing based on the value it carries.

    • Protection mechanisms against front-runners. These are present in the form of bots that can monitor background news and other factors, pointing to possible impending front-run action.

    • Slippage protection — is a mechanism that prevents traders from experiencing execution prices outside their expectations.

    • Private pool interactions — allow traders to form closed communities for proven trades and assets.

    Though seeming efficient, these measures are still not a holistic panacea for all the challenges HFTs are facing in crypto. Instead, those challenges must be addressed on an infrastructural level that would enable HFTs to access the liquidity aggregated from multiple DEXs and networks in one place and negate the inconvenience of dealing with Layer1 protocols (poor speed, lack of interoperability, limitations of cross-chain trading, high fees, etc.).

Yellow Network is one such player in the DeFi space, which is focused on creating a one-gate trading hub as an all-in-one interface and platform for high-speed multi-chain trading. Yellow Network aims to interconnect various blockchain networks and crypto exchanges in a single venue that could act as an automated, non-custodial trading hub. Notably, this will allow:

  • multi-chain execution of trades in HFT fashion high speed
  • to get rid of dealing with mempools and miners
  • reduced fee costs
  • deep aggregated liquidity, and
  • the best price feeds.

To achieve HFT-friendly transaction speed, Yellow’s infrastructure relies on Layer 2 scaling solutions called “state channels.”

State channels

A state channel comprises a set of open-source protocols, smart contracts, interfaces, and software that allow users to transact directly outside of the blockchain (i.e., off-chain) and minimize their on-chain operations only to the specific necessary sequences.

In particular, these on-chain activities are limited to opening up and closing a state channel between parties, and they validate only the final state between them after multiple transactions.

As state channels do not require node validation for every transaction, they can handle most user activities (trading, payments, etc.) with X-time more throughput and speed than Layer-1 protocols (blockchain layers). So cutting the number of necessary on-chain iterations with the use of state channels reduces the costs and increases the speed of interactions drastically.

How would an HFT trader benefit from Yellow Network?

The main advantage for HFT traders onboarding with Yellow Network is the comprehensive user journey implemented through the convenient and intuitive interface leading to a fully DeFi-oriented HFT terminal that operates cross-chain and involves no intermediaries.

Along with low per transaction cost and a virtually identical set of functions, tools, and features as those present on traditional stock markets, Yellow Network strives to provide a user with:

  • secure P2Pp cross-chain trading in the absence of the counterparty risk
  • deep assets liquidity, which means no risk of slippage and market manipulations
  • high-speed transactions, and
  • best assets prices.

Final Note

High-frequency trading is a high-risk but profitable activity. Due to its volatile nature, crypto could be even a better match for HFT than the traditional markets. However, the lack of relevant technological infrastructure is still a significant stop factor preventing HFTs from exploring lucrative crypto opportunities.

Yellow Network is the first infrastructural solution that would make it possible to perform best practices of the classic high-frequency trading in the crypto market.

Want to learn more about Yellow Network and cross-chain trading technology?

Check out OpenDAX v4 stack GitHub:

Read Yellow Network HackerNoon blog:

Stay tuned as Yellow Network unveils the developer tools behind Yellow Network, brokerage nodes stack, and community liquidity mining software!