Last week ErisX attended Consensus 2019 where various experts discussed how the blockchain industry is developing state of the art technology and infrastructure as well as witnessing long term institutional capital enter the digital asset markets. While conference attendees and speakers were cautiously optimistic, the crowd also addressed recent headlines that included exchange hackings, fake volume and market manipulation such as front running.
Some of the questions we received last week stemmed from an article Bloomberg published titled, Flash Boys Trading Bots are Running Wild on Crypto Exchanges. The article refers to a report from Cornell Tech that points its finger at decentralized exchanges and the alleged manipulation taking place on their markets; including the practice of “front-running.” Ari Jules, a professor at Cornell Tech, takes it a step further and implicated centralized exchanges as well, saying that “we have no idea what the extent of the malfeasance is on centralized exchanges.”
Representing the position of a centralized exchange for digital currencies last week, we informally addressed claims made in this article to explain why the type of ‘front running’ described is not possible on a central limit order book (CLOB) and how our operational model seeks to avoid and actively combat the kinds of ‘malfeasance’ that has been reported to be rampant on other centralized exchanges. We thought a broader audience would benefit from a more formal response below.
What is Front Running?
At the risk of being pedantic, we want to acknowledge that “front running” has a very specific definition within SEC regulatory jurisdiction according to a number of FINRA rules.* As we understand the colloquial ‘front running’ problem described in the Bloomberg article, it relates to a set of types of arbitrage transactions. One type is within a single DEX when there is a crossed-book, others are across two or more DEXes, when their order books become dislocated. None of these are ‘front running’ even in the less pedantic sense. The first is the resolution of a crossed book, and the second can be argued as, in fact, a service the arbitrageurs are providing to the market as a whole — through their arbitraging they are keeping the inter-DEX prices in closer alignment. It is not crystal clear in our read of the research but we also understood that there may be a final example of ‘queue-jumping’ transactions taking place on public blockchains which come closer to the FINRA definition cited above, but lacking the involvement of a broker in a position of privileged customer information using it to the broker’s customers’ detriment. In the decentralized exchange example, the “privileged information” is available to everyone equally. Since all proposed transactions are broadcast to the blockchain, anyone operating a node may observe the pending proposed transactions. In this context, transactions are not ‘executed’ until they have been committed to the blockchain in a block, and the selection and ordering of transaction in a block is determined by miners. Miners are incentivized to include transactions in their blocks by, in the case of Ethereum, fees called gas that are paid by the proposers of transactions. The higher the fee, the more likely a transaction will be prioritized by miners. So, to ‘front-run’ a proposed transaction the malicious actor, if our reading is correct, can pay a higher gas fee to get their transaction executed ahead of the target transaction to be ‘front run’. (For the sake of clarity, paying a higher gas fee does not make an actor malicious in the blockchain or Ethereum context, rather when the action is tied to a deliberately stepping ahead of a pending transaction, or rewriting historical transactions, and possibly categorized as “front running” or “time bandit attacks” as in the paper, the actor could be a malicious actor.)
A stylized, simplified conceptual example sequence:
- Buyer A submits a DEX buy order for 1 ETH @ 238(gas 0)
- Seller B submits a DEX sell order for 1 ETH @ $237 (gas 0)
- ‘Front-Runner’ 1 observes Buyer A’s order and Seller B’s order
- ‘Front-Runner’ 1 submits DEX buy order for 1 ETH @ $237 (gas > 0) to trade with Seller B’s sell order
- ‘Front-Runner’ 1 submits a DEX sell order for 1 ETH @ $238 (gas > 0) to trade with Buyer A’s buy order
- Miner 1 prioritizes ‘Font-Runner’ 1’s buy and sell orders to earn the gas fee
- Seller B sells 1 ETH to ‘Front-Runner’ 1 @ $237
- ‘Front-Runner’ 1 now owns 1 ETH @ $237
- Buyer A buys 1 ETH from ‘Front-Runner’1 @ $238
- ‘Front-Runner’ 1 is now flat, i.e. no position
In the above example, by interpositioning (or ‘front running’) its orders between Buyer A and Seller B, ‘Front-Runner’ 1 is able to profit $1 ($238 — $237). So long as the gas fee is < $1, ‘Front-Runner’ 1 makes a profit. The research further notes that this trade can be executed, via a proxy smart contract, as an “all-or-nothing” transaction where the strategy cannot be “legged”, i.e. only one of the front-runner’s two orders trade. Because all observers have access to the information, multiple actors running the same strategy will be competing with each other, which then results in the auction to bid up the gas fees to be the winner of the front-running strategy whose transaction gets mined.
Centralized versus Decentralized Models
One benefit of a centralized limit order book model, like ErisX, is that it leverages a matching engine that employs a price/time matching algorithm. All orders submitted to the matching engine are sequenced and time-stamped, meaning that their insertion into the order book queue is deterministic. Once in the order book, orders are prioritized first by price (bids are ordered priced highest to lowest and offers are ordered priced lowest to highest), and then by time within each price band (at a given price level orders are prioritized per time of arrival from oldest to youngest). This is an explicit rule that the ErisX matching engine strictly follows, so there is no opportunity for malicious actors to “see the future” and interposition between matching orders already submitted to the matching engine. Fully executed transactions may later be recorded (settled) on the blockchain, but do not experience the risk of interpositioning, as in the example with a decentralized exchange where the trade execution is the settlement and contained in a single block confirmation.**
We also wanted to address the comments Ari Jules made in the article that “we have no idea what the extent of the malfeasance is on centralized exchanges.” BitWise published a comprehensive report comparing exchange volumes and, based upon the attributes of volume as observed in the quote and trade data, classified various exchanges by real versus fake volumes. Containing detailed analysis and highlighting suspicious trading activity, the report claims that 95% of the BTC trade volume is fictitious, so we would argue that at least on some exchanges we have a reasonable idea of the extent of the most blatant malfeasance. More sophisticated and subtle malfeasance (including unmanaged conflicts of interest) may be harder to track without a sufficiently robust and sophisticated surveillance program and market transparency. There is reason to believe the conditions exist for conflicts and manipulation based on the Virtual Markets Integrity Initiative Report by the Office of the New York State Attorney General, indicating the quantity and quality of actions taken by markets to develop their operational reliability, safety, and transparency varies.***
Decentralized exchanges, and some centralized exchanges, that are not subject to regulatory oversight and do not have surveillance programs in place can create an environment that is ripe for market malfeasance. By comparison, ErisX, has implemented a market surveillance program that aims to protect market users and the public from fraud, manipulation and abusive practices while also fostering open, competitive and financially sound markets.
The program’s primary mission is to identify and respond to situations that could pose a threat of manipulation. Each day, for all active spot and futures (pending regulatory approval) markets, experienced surveillance staff use sophisticated tools to monitor ErisX market activity including key price relationships and movements, and relevant economic and fundamental factors in a continuous review for potential market problems. When identified, our staff will take appropriate action up to and including barring malicious actors from participation and/or referral to the appropriate regulatory body depending on the nature of the malfeasance and where it is occuring. Our market surveillance initiatives are designed to provide secure, transparent and orderly markets for digital currencies. We will assist the various authorities including the Financial Crimes Enforcement Center (FinCEN), the Department of Justice (DoJ) and Federal Bureau of Investigation (FBI) and CFTC; among others.
The DEX problems described in the Bloomberg article do not apply in the context of a centralized exchange that is not dependent on blockchain confirmations for order matching. It is with this in mind that we believe our approach to trading and investing in digital currencies will create a market unfriendly to market manipulators. As a centralized exchange, ErisX leverages a matching engine that will prevent ‘front running’ (of the type described above) and operates a market surveillance program to thwart malfeasance. While market participants on decentralized exchanges may experience the type of market manipulation described in the Bloomberg article, they will not find it on ErisX.
** There is a running, heated debate in a number of cash equities markets, especially the U.S. and Canada, regarding the fairness of the cost and speed of access to market data. ErisX will offer one market data feed at no cost at launch. This approach acknowledges the inevitability that some market participants will always have the ability to be closer to the data source, and able to process and react to data more quickly than others, with making it widely available to all consumers on equal terms. The counter argument to the notion of “wasteful racing” is that fast market data processed by fast actors integrates new information into prices more quickly. Prices that more accurately reflect information are a benefit to the market.
***See Virtual Markets Integrity Initiative Report (Sept. 2018) www.ag.ny.gov/sites/default/files/vmii_report.pdf