Rethinking the Order Book: The March Towards Automated Markets

Ifhistory is any measure, the adoption of new network models often lags behind advancements in computer technology. In the 90s, as it became clear the Internet could change the communications landscape, information providers took what was at the time a logical next step: They transferred their repositories online. Yellow Pages became and Encyclopedia Britannica became Britannica Online. Few could predict that crowdsourcing would eventually deliver far superior services in the form of Yelp or Wikipedia.

A similar pattern has emerged in modern-day asset exchange. Even as the digitization of trading has evolved and blockchain changes the financial landscape, existing market models have been unimaginatively carried over to electronic asset exchanges and now crypto markets. As a result, technology gaps between traders remain economically significant while the current market design perpetuates (and in some cases exacerbates) problematic features of the former system.

Blockchain and smart contract technologies enable new models that demand a rethinking of existing market mechanics?-?specifically theorder book,which plays a key role in todays digital asset exchange infrastructure. Modern-day order books are based on order-matching (between buyers and sellers) andmutableoffers not visible to all traders. This paradigm makes order books dependent on for-profit matchmakers and susceptible to manipulation. The Bancor Protocol proposes automated order books, which allow underlying assets or tokens to be programmatically exchangeable without the need for both a buyer and seller, based on predetermined order-flows and transparentimmutableorders. Automated order books dramatically lower the cost of creating liquidity and level the playing field for market participants by reducing both the risk of manipulation and the profitability of market-making.

The Magically Disappearing OrderBook

The market for a single asset (digital or otherwise) is thought to be most efficient if all orders come through a single point, also known as the order book. An order book is an aggregation of buy and sell orders, showing the number of assets being sought or offered at each price level. It is intended to provide traders with better market information, but as well see,order books can actually distort market information.

Order books are often visualized as two-sided graphs featuring buy and sell curves sloping upwards at varying rates in opposing directions. The lower the price, the more buyers are available to buy. The higher the price, the more sellers are available to sell. In between each curve is the bid-ask spread. Typically the lower the trading volume of an asset, the wider the spread because there is greater risk of illiquidity assumed by a market maker.

An order book is an aggregation of buy and sell orders, providing signals about the price direction of an asset in the short term. The problem is these signalsare just clues which can change at anymoment.

Market orders are often filled by multiple buyers or sellers. Each unit purchased theoretically follows the points plotted along the buy or sell curve. Traders refer to the change in price during the execution of a trade as slippage. Some amount of slippage is expected in most trades, but slippage tends to be higher in markets for lightly-traded assets where the order book is said to be thin. Thin order books have fewer offers at various price levels. In order to fill a large trade on a thin order book, orders will move through the price curve at a more rapid rate (thus creating more slippage).

The order book provides clues about the price direction of an asset in the short term. A larger number of buy vs. sell orders may indicate a rising price due to buying pressure. Peaks on either side of the order book, also known as buy or sell walls, indicate there may be someone (or many people) willing to trade a large sum of an asset around a specific price level.

The problem is these signalsare justclueswhich can change at any moment. The offers on most order books may be modified or cancelled in the middle of a trades execution. For instance, an abusive trader can place large orders they have no intention of filling in an attempt to give the appearance of a desired market sentiment. An uninformed trader may believe there are many buy orders at a certain price level on the order book, only to see those orders evaporate mid-execution as theyre cancelled by the abusive trader, creating unexpectedly high slippage for the uninformed trader.

In crypto markets, order books are particularly susceptible to a variety of abuses likepump and dumps,spoofingandwash trading. These abuses create unstable market conditions andfake or inflated volumesacross exchanges?-?further exacerbating fears of instability andbad actors. Moreover, exchanges have weak incentives to crack down on such abuses as policing could potentially diminish theirtrading volumes(and perceived levels of liquidity)?-?hurting profits.

Last year, an anonymous researcher uncovered the actions of Spoofy, an unknown entity that had allegedly placed tens of millions in cancelled orders to manipulate the price of Bitcoin. Spoofy would send a series of orders and then cancel them once prices moved in a desired direction (also known as spoofing).

Some cryptocurrency exchanges have openly acknowledged the problems and vowed to deactivateflagrant accounts. On electronic stock exchanges, U.S. securities laws prohibitwash trading,spoofingand other market abuses. Yet in both crypto and traditional markets, these problems persist. Generally, when laws are enacted or penalties are levied to fight abuse, it is an indication of a market design failure?-?one that requires innovation, rather than regulation, to fix.

Automated Liquidity to theRescue

Liquidity is said to reduce bothspreadsandslippage. The higher the number of buyers and sellers in a market, the more competition exists between profit-seeking middlemen (reducing spreads), and the less impact a trade will have on an assets price (reducing slippage).

But as weve shown, liquidity today is both game-able and a for-profit enterprise. While market makers serve a crucial function?-?by standing ready at all times to buy or sell an asset?-?their job is inherently a risky one as it involves making costly predictions about supply and demand. They take on this risk in exchange for the profit on bid-ask spreads and other fees charged for creating liquidity.

While risk is understandably rewarded with profit, what if we could lower risk in the process of creating liquidity by making it a low-cost and automated activity? Anyone would be able to cheaply create a liquid market to facilitate efficient trading of an asset without a large number of interested and active traders as a prerequisite.

Bancor proposes a new kind of liquidity not reliant on trade volume (or order book depth), one that is fullyautomated,non-profitanddecentralized. At the core of this system is a new kind of market maker called aRelay Token. A Relay Token is a type ofSmart Tokenbased on theBancor Protocol. Similar to standard market makers, Relay Tokens stand ready at all times to buy or sell an asset from market participants. But Relay Tokens differ from standard market makers in two crucial ways.

First, they need not be profit-seeking. Instead, Relay Tokens buy and sell assets according to prices calculated by a predefined formula programmed into a smart contract, using staked and adjustable inventories of assets stored in that contract. Second, Relay Tokens do not depend on order-matching or trade volume for liquidity. Rather, liquidity is determined by the quantity of assets stored in the Relays smart contract.

Relay Tokens give traders a simple way to accurately measure and fully automate the liquidity of a digital asset. Globally, market-making generates billions in revenue per year?-?all profits which can now be automated away to reduce costs for market participants and drive new value creation.

How Relay Tokens Clarify Liquidity

Lets quickly break down a standard implementation of a Relay Token, so you can see how its automated pricing only responds to real buys and sells, creating smooth, continuous and fixed order-flow.

Bancors predetermined order flow overlaid on a traditional order book. The dotted line shows the price of a Relay Token rising in response to a purchase, while demand and supply schedules remain fixed due to automated pricing.

A Relay Token is a smart contract that holds two token balances in its contract as reserves. The Relay allows traders to convert between the two tokens according to a price which is calculated by the contract in real-time. This happens by transferring one token into its respective reserve (increasing its balance) and receiving in return the corresponding amount of the other token from the other reserve (decreasing its balance). The price formula assumes the total value of each reserve balance is always equal. Prices are continuously adjusted based on the changing balance of tokens in each reserve.

Purchasesof a particular token cause those tokens to be withdrawn from the Relays contract, shrinking their reserve supply and thus increasing their price.Salesof a token cause that tokens reserve supply in the Relay to increase and its value to decrease.

For example, lets say:

  • One Token A equals $1 and one Token B equals $1.
  • In our basic Relay Token, we place 100 Token As in one reserve, and 100 Token Bs in the other reserve.
  • Someone converts one Token A into one Token B.
  • To process the trade, one Token A is added to the smart contract (leaving 101 Token As in reserve), and one Token B is withdrawn from the smart contract (leaving 99 Token Bs in the other reserve).
  • The price of one Token A is now99/101 ($0.98), and the price of one Token B is now101/99 ($1.02).
  • Within the smart contract, the purchased token (B) has increased in price due to increased demand and decreased supply, and the sold token (A) has decreased in price due to decreased demand and increased supply.

If the price of a token in a Relay differs from prices on external exchanges, an arbitrage opportunity emerges. Traders are incentivized to quickly act as liquidity movers between the Relay Token and other exchanges, buying from the cheaper source, selling to the more expensive one, and bringing the price of the token back into balance across exchanges.

Since prices automatically climb as reserve balances are decreased, reserves can never be drained as it becomes infinitely expensive to purchase a token when its reserve is running low. In this way, Relay Tokens are always available to buy or sell tokens at some price, enabling continuous liquidity for the tokens they hold.


Bancor gives traders an easy, tamper-proof mechanism to calculate slippage using a simple value calledliquidity depth. Liquidity depth is defined as the value of tokens deposited in each of a Relay Tokens reserves. Liquidity depth allows the effective price slippage for a given transaction to be approximately calculated by dividing the size of the order by the liquidity depth. For example, say token XYZ has a liquidity depth of $100,000 and a user wishes to buy $5,000 worth of XYZ. The price slippage would be approximately 5%. In other words, if XYZ tokens price before this transaction is $1, the effective price for this purchase will be $1.05.

The idea isnt necessarily that Relay Tokens offermoreliquidity. It is that they give traders a transparent view into liquidity that cannot be gamed or discontinued. In this respect, Bancordisconnects liquidity from trade volumeand makes liquidity, simply, a function of how much the Relay Tokens creator (or other participants) deposits in its reserves.

Additionally, anyone can buy a Relay Token itself (as opposed to one of the tokens in its reserves) and become apassive market maker. By buying units of the Relay Token, the size of its liquidity depth increases. One can envision a Relay Token that represents the local currency of a community, and supporters buying the Relay Token so that transactions are processed with higher liquidity depth and thus lower slippage. In fact, Bancor empowersreal-world communities in Africato develop community currencies which utilize the Bancor Protocol to achieve automated liquidity to other lightly traded community currencies?-?without traditional rents paid to market makers.

This is the next phase of decentralization in financial markets. The advent of digitized broker services moved markets to a system where anyone can provide liquidity by submitting a buy or sell order. The advent of smart contracts now allows any trader to buy into a shared market maker by staking funds in a smart contract to facilitate automated and efficient trading of any digital asset.

Toward Fully Automated Markets

If todays market makers are like taxi cab drivers, and market takers (traders or users) are their passengers, you can think of a Relay Token like a self-driving car. This new model could change the way financial markets have worked for centuries by eliminating the need for buyer/seller matching entirely and dramatically increasing efficiency and inclusion in the financial system. For these reasons, we believe this model is imperative to explore.

As long as crypto exchange owners and insiders have better and faster access to information than other traders, problematic power imbalances will proliferate.Storing full order books and complete trade data on the blockchain is one way to ensure that everybody plays by the same rules.

To be sure, complete transparency isnt free. After all, executing every order on-chain?-?from submission to settlement?-?and publishing all trading data on-chain can expose traders to abuses and costs such as front-running and gas fees charged by miners for expensive smart contract calculations. We believe solutions to these challenges are also forthcoming and that the benefits of fair, stable and affordable liquidity far outweigh the costs.

A liquidity networkis a collection of Relay Tokens that hold a common Network Token?-?such as BNT?-?as one of the tokens in their reserves. Bancor has implemented various updates to its protocol that have stamped out trader front-running on Bancors liquidity network, while other updates have dramatically reduced gas fees by optimizing smart contract math.

Significant challenges remain, but at this very early stage, there are already clear benefits of trading transparency and automation?-?indicated by over $1.5 billion in cumulative trade volume on the Bancor Network in just over a year since launch. We expect these benefits to only grow as Ethereum, EOS and smart contract innovations improve scaling and reduce blockchain service fees for the ecosystem at large.

As technology progresses and invites regulators, entrepreneurs and users to adapt, we stand at a crossroads: Do we want a system where prices are determined by the chaotic matching of people with various agendas, risk profiles and access to information and capital? Where insiders and intermediaries have the greatest power to manipulate the system and extract profit at others expense? Or do we want a system that utilizes technologys ability to enhance human collaboration by leveling the playing field, so that we can all get better at the game itself, rather than gaming it.

Eyal Hertzogis Product Architect at Bancor