Skip to content
All library documents

RSI Slowdown Signals at Overbought and Oversold Levels

PDF Hummingbot docs

Summary

The indicator is based on the idea that momentum may weaken before price and the indicator reverse. It searches for slowing RSI movement while a fast RSI is in an overbought or oversold region, marking candidate zones on a chart. Traders can choose arrows or lines to display signals, or disable slowdown detection and use the indicator only to show when configured RSI thresholds are crossed.

Settings include the RSI period, upper and lower signal levels, whether to search for deceleration, which bar to evaluate, the display style, and sound alerts. The document describes the indicator’s interface and underlying signal concept but gives no formula for measuring slowdown, examples, performance evidence, or rules for entering and exiting trades. The marked areas should therefore be treated as possible observations for further testing, not as validated reversal signals.

Key ideas

  • The indicator looks for slowing RSI movement within overbought or oversold regions.
  • Signals can be drawn as arrows or lines, and slowdown detection can be disabled.
  • Users can configure RSI levels, period, signal bar, display, and alerts.
  • The document provides no backtest results or complete trading rules.

Tags

Full text
# liquidity mining



Liquidity Mining
A marketplace-based approach
to market maker compensation
Michael Feng, Rajiv Bhat, and Carlo P. Las Marias
October 30, 2019
Abstract
In the highly fragmented crypto market, liquidity is a scarce resource for which many
exchanges and issuers are paying dedicated providers, otherwise known as market
makers. Against the historical backdrop of market maker compensation schemes, we
illustrate why the prevailing bilateral contract model is susceptible to adverse selection, monopolization risk, and verification difficulty. We introduce a new marketplacebased approach to market maker compensation, liquidity mining, that attempts to
address these issues by leveraging frequent order book snapshots to reward market
makers commensurate with the risk they bear. We present the results of a simulation
model that utilizes this new approach and analyze its impact on key liquidity metrics. Finally, we describe various manipulative trading practices available to market
makers and discuss how we detect and mitigate them in this new approach.
1


Contents
1 INTRODUCTION 4
2 BACKGROUND 6
2.1 What Market Makers Do . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2 History of Market Makers . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.3 Compensating Market Makers . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.3.1 Should Market Makers be Compensated? . . . . . . . . . . . . . . . 8
2.3.2 Methods of Compensation . . . . . . . . . . . . . . . . . . . . . . . 9
2.4 Problems with Status Quo . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.4.1 Adverse Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.4.2 Monopolization Risk . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.4.3 Verification Difficulty . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3 MARKETPLACE DESIGN 14
3.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.2 Market Participants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.3 Measuring Liquidity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.4 Liquidity Mining Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.4.1 Order Book Snapshots . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.4.2 Spread Density Function . . . . . . . . . . . . . . . . . . . . . . . . 18
3.4.3 Budget Allocation . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.5 Simulation-Based Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.5.1 Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2


3.5.2 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4 PREVENTING MANIPULATION 25
4.1 Manipulation in Crypto . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.2 Types of Manipulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.2.1 Wash Trading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
4.2.2 Spoofing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
4.2.3 Price Manipulation . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
4.3 Data Collection and Verification . . . . . . . . . . . . . . . . . . . . . . . . 28
4.4 Auditability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
5 SUMMARY 30
3


1 INTRODUCTION
Liquidity is an important metric for all financial assets and trading venues. However, many
market participants are unclear as to what drives liquidity and how to measure its effects.
This is because market making, the business of providing liquidity, has traditionally been
accessible to only a limited number of participants, such as quantitative hedge funds and
trading desks of large financial institutions.
In the original Hummingbot whitepaper[1], we described how direct market access, a unique
feature of the digital assets (crypto) market, enables anyone to be a market maker, as well
as the rationale for why individuals may be better positioned than professional firms to
provide liquidity for certain markets and assets. We also discussed how open source software
could provide both individuals and firms the tooling needed to run high-frequency market
making strategies.
However, while Hummingbot as a technical solution enables a wider set of market participants, it by itself does not solve the generalized problem of liquidity fragmentation in the
crypto market. Today, crypto exchanges and token issuers spend an estimated $1.2 billion
per year compensating market makers, typically quantitative hedge funds that specialize
in crypto assets, in the form of rebates, fees, and opportunity cost of lent inventory. In
addition, the long tail1 of exchanges and token issuers cannot afford to hire a hedge fund
and therefore cannot attain the requisite liquidity for their markets to function.
In contrast to the many technological and economic breakthroughs that the digital assets
industry has innovated, there has been comparatively little innovation in how market makers are compensated. As in fiat markets, crypto exchanges and token issuers enter into
bilateral contracts with market making firms that base compensation upon long-term commitments to provide predefined levels of liquidity, as measured by order uptime, spread,
and volume. Not only do these bilateral contracts inflate coordination costs that reduce
matching efficiency, they also introduce adverse selection and monopolization risks that
diminish the effectiveness of the compensation provided.
Instead, we believe that a marketplace-based approach, inspired by two-sided digital marketplaces in other industries like transportation and online advertising, can promote consistent liquidity provision, mitigate the risk of manipulative practices, and improve matching
efficiency in the market for liquidity.
In Section 2: Background, we discuss the role and history of market makers and explain
why and how they have been compensated in both traditional and digital markets. Then,
we outline why today’s prevailing market maker compensation schemes are sub-optimal.
1As of October 2019, there are 2,970 digital assets, 285 digital asset exchanges, and 20,867 unique
markets tracked by CoinMarketCap (https://coinmarketcap.com).
4


In Section 3: Marketplace Design, we introduce a new marketplace-based approach to
market maker compensation that leverages competitive dynamics to align rewards earned
by market makers with risks that they bear in different market regimes. In addition, we
introduce an open, pay-as-you-go marketplace structure that aims to reduce coordination
costs and improve matching efficiency between liquidity buyers and sellers.
In Section 4: Preventing Manipulation, we describe how the design of the Liquidity
Mining marketplace, along with surveillance and detection algorithms, disincentivize and
deter manipulative trading practices.
5


2 BACKGROUND
2.1 What Market Makers Do
In a seminal 1968 paper, Harold Demsetz identifies the lack of “predictable immediacy
of exchange in financial markets”[2] as a fundamental trading problem, which is similar
to what economists today term coincidence of wants. Because buyers and sellers are not
synchronized, a buyer arriving at a market may not find a seller who agrees to transact at
a suitable price and quantity, and vice versa. Demsetz writes that the regular presence of
market makers, who fill gaps from asynchronous order arrival, can mitigate this problem.
Market makers have been long recognized as an important component of financial markets.
“Were it not for this intermediary class. . . the public would experience great delay and
inconvenience in their sales or purchases of stock”[3] wrote Henry Keyser in 1850 about
market makers in the world’s first stock exchange, the Amsterdam market for Dutch East
India Company Shares.
The job of a market maker is to place and adjust limit orders on an exchange’s order book,
i.e. binding offers to buy and sell a specific quantity for a specific price. Effectively, market
makers provide free options to the market, where each option is the right to buy or sell
from them, and aim to profit from the differential between buy and sell prices.
Exchanges and market makers have a symbiotic relationship: an exchange provides the
venue where traders go to execute trades, while market makers provide the liquidity that
ensures traders can transact efficiently. “Electronic platforms are merely the oil that greases
the engine. They do not provide liquidity. For that, you still need market makers who can
make prices and take risk”[4].
Capital is a key constraint for market makers: the act of utilizing capital to place orders on
one market precludes a market maker from re-using that capital in another market. Since
most exchanges force market makers to deposit capital into their accounts before they can
place orders, the process of transferring capital from one exchange to another can also exact
high transaction costs and inefficiencies on market makers.
Since market makers have to commit capital to specific financial markets in order to provide
liquidity to them, financial markets essentially compete with one another on the basis
of liquidity. The joint SEC-CFTC task force investigating the May 2010 Flash Crash
wrote, ”Liquidity in a high-speed world is not a given: market design and market structure
must ensure that liquidity provision arises continuously in a highly fragmented, highly
interconnected trading environment”[5].
6


2.2 History of Market Makers
In the United States, market making for securities is a highly regulated activity. All firms
that make markets for securities must register with Financial Industry Regulatory Authority (FINRA). This circumstance arose because the original market makers in US equity
markets were exclusively broker-dealers, a dual role that combines fiduciary responsibilities
to trade on behalf of clients (in the broker capacity) and profit-seeking opportunities to
trade for one’s own account (in the dealer capacity).
While these broker-dealers played a vital role in providing the liquidity necessary for early
venues such as the New York Stock Exchange (NYSE) to function, their dual principal/agent role gave rise to potential conflicts of interest that concerned regulators. In
Harold Bloomenthal’s classic 1971 paper about market making, he wrote, “The close relationship that may develop between the company and dealer under these circumstances is
illustrated by the not atypical remark of one dealer that ‘virtually every aspect of the company’s operations were discussed with me.’ The situation seeps with potential for securities
violations.”).[6].
As a result, regulations that constrained what market makers could do and how they could
be compensated sprang as a direct byproduct of these risks, “not because all market-makers
are manipulators engaged in a shell game, but because there are sufficient numbers so
engaged to give rise to concern about the integrity of the markets in many securities.”[6].
Today, market making for securities remains a highly regulated industry in the United
States, and until recently, direct market maker compensation was disallowed.
Instead of direct monetary compensation, market makers were compensated indirectly. In
exchange for standing ready to provide liquidity, NYSE specialists received advantages
related to time, place, and information (see Methods of Compensation: Indirect Compensation below). In other venues, “the market maker is often the executor of the listed firm’s
investment banking ventures, which indirectly subsidizes the market making business”[7].
In recent years, fragmentation and electronification of financial markets have exacerbated
the importance of liquidity and the need for market makers. Whereas U.S. equities were
dominated by a few large exchanges, today there are 13 equities exchanges and 55 Alternative Trading Systems[8] registered with the SEC. In the digital assets markets, there are
2,980 individual cryptocurrencies that trade on hundreds of different exchanges, resulting
in 20,903 unique markets[9].
Unlike the NYSE which only gave seat-holders the right to trade shares on the exchange2,
these new venues sourced liquidity from the growing number of high-frequency trading
(HFT) firms that engage in market making as a pure principal business. “The traditional
approach to regulating the specialist system on securities exchanges was founded on the
2
In 2005, NYSE also relented and allowed non-seat holders to trade on the exchange.
7


dual role of these market participants as dealers and order-matching agents, and the recent
evolution of securities markets has led to the ‘de-agentization’ of market makers, thereby
dissolving the old paradigm”[10].
The 1990s rise of electronic trading and fragmentation of the exchange industry challenged
prior models which eschewed compensation in favor of regulations and access control. Newly
established venues introduced innovations such as the maker-taker pricing model and other
indirect compensation methods in order to attract liquidity.
The fragmentation of liquidity across the exchange landscape also caused significant problems for smaller-cap stocks: “The unintended consequences of that market fragmentation
have been a lack of liquidity and price discovery in listed securities outside of the top 100
traded names and a disturbing absence of market attention paid to small-growth companies by all market participants, including exchanges”[11]. These liquidity issues gave rise to
experiments with direct market maker compensation by European stock exchanges and by
Nasdaq with its Market Quality Program for ETF issuers (see Methods of Compensation:
Direct Compensation below).
Today, market making in modern financial markets is dominated by HFT firms like Two
Sigma, Jump Trading, and DRW Cumberland who take profitability, rebates, risk, and
other factors into account when deciding where to provide liquidity.
2.3 Compensating Market Makers
In both traditional and digital markets, direct and indirect market maker compensation
arrangements are commonplace. Indirect compensation generally takes the form of maker
rebates and anticipated investment banking business, while direct compensation schemes
are generally bilateral contracts with issuers and exchanges that pay market makers fixed
monthly fees in return for maintaining obligations with respect to uptime, volume, and
spread.
Whether market makers should be compensated at all and how they should be compensated
has long been the subject of much debate. Below, we summarize the current state of
academic research into this area and describe different compensation models in more detail.
2.3.1 Should Market Makers be Compensated?
Given that market makers are profit-seeking firms who compete with one another, it is fair
to question whether compensation is necessary at all.
A number of papers have analyzed the impact of market maker compensation in markets
8


where such practices are allowed, such as the Paris Bourse and the Oslo Stock Exchange.
Firms that hire a market maker experienced a statistically significant abnormal return of
4.9% in their stock price[7]. In addition, the presence of a designated market maker improved price stability: “Following market maker introduction, the book imbalance declines
significantly, suggesting that the market maker resolves temporal asynchronies in order flow
by selectively providing liquidity where the public supply is insufficient. In addition, the
market maker significantly increases the likelihood that auctions clear, thereby reducing the
price risk that equilibrium values may shift between order submission and execution”[7].
Other studies highlight the fact that firms that hire market makers experience positive
externalities that boost firm value. “Firms that hire a DMM [designated market maker]
experience a drop in liquidity risk to a level that is comparable to that of the largest and
most liquid stocks on the exchange” and thus experience a lower cost of equity capital[12].
In these arrangements, market makers may need compensation beyond trading profits for
contractually committing to maintain a market presence. “[A]ffirmative obligations require
him to provide liquidity in circumstances when other public traders would not as liquidity
provision is not profitable in those instances”[7].
Generally, the consensus in the literature analyzing market maker compensation is that
providing liquidity represents a positive externality for which trading profits may not adequately compensate. “While the usual solution to this inefficiency is a Pigovian subsidy,
the form that this payment should take is less clear”[7].
Yet it is clear that some markets attain natural organic liquidity and do not need to pay
market makers. “The proliferation of electronic limit order books that operate without
designated dealers suggests that liquidity provision can be entirely endogenous”[7].
A consensus finding in the literature is that the value of dedicated market making is inversely correlated with liquidity: “Empirically, we expect that the benefits from market
maker participation will exceed costs for firms with a small number of active market participants or with high volatility of equilibrium prices”[7]. Skjeltorp’s study on the Oslo Stock
Exchange reached a similar conclusion “that DMM contracts improve liquidity, that this
improvement is particularly large for small illiquid stocks, that liquidity risk is reduced,
and that companies engaging in a DMM contract experience a significant positive abnormal
return around the event of the DMM hiring”[12].
2.3.2 Methods of Compensation
Indirect Compensation
Rather than direct monetary compensation, the traditional approach to incentivizing mar9


ket makers has been to provide them with indirect incentives such as additional investment
banking business or other advantages related to time, place, and information.
For instance, in return for committing to provide liquidity for a stock, NYSE specialists
gained advantages related to time (co-locating servers in close proximity to the exchange),
place (exclusive privileges to make and execute orders), and information (“the opportunity
to condition his price schedule on the arriving order flow”[7]).
These advantages are not without controversy. “In the NYSE model, the specialist is largely
subsidized by trading profits earned from uninformed traders”[7]. In addition, restrictions
against direct market maker compensation have been unsuccessful in preventing market
manipulation. In the 2005 Specialist Scandal, fifteen NYSE specialists were indicted for
thousands of illegal trades that front-ran clients. Post-mortem critiques pointed to “the
human element (that) slows the process (and) creates conflicts of interest - all the traders
buy and sell for their company’s account as well as for customer accounts”[13], leading to
an overhaul of the NYSE specialist (now Designated Market Maker) system.
Maker Rebates
The maker-taker pricing model, which originated with the rise of electronic trading in
the 1990s, is another form of compensation for market makers that is common today in
both traditional and digital asset exchanges. This structure “rewards any participant that
provides liquidity and charges those who consume liquidity”[14].
Exchanges that utilize this model charge different fees to makers (traders who add liquidity
to the market by placing and maintaining limit orders on the order book) and takers
(traders who subtract liquidity from the market by placing a market order or taking the
other side of an existing limit order).
Effectively, the maker receives a maker rebate on their trades, while takers do not. Maker
rebates typically lower or eliminate trading fees for market makers, but they may also
exceed trading fees, turning into a form of direct compensation.
Direct Compensation
Given that compensation for market making is more valuable for illiquid markets, direct compensation may be a more effective lever. “Direct subsidies to market makers
compare favorably to indirect subsidies, such as time, place, and information advantages,
given that the latter type tends to be less valuable in illiquid markets and generally less
transparent”[15].
In direct compensation arrangements, the market maker must comply with certain “affirmative obligations (that) require him to provide liquidity in circumstances when other public
traders would not as liquidity provision is not profitable in those instances”[7]. Generally,
10


market makers must comply with obligations related to uptime, spread, and volume.
While direct compensation of market makers is common outside the US, it was prohibited
by regulation until recently. Spurred by the increasing inability for small-cap issuers to attract market makers without compensation, in 2013 Nasdaq introduced the Market Quality
Program (MQP), which compensated market makers for providing liquidity to ETF issuers.
Participating market makers received an annual fee of $35,000 to $70,000 for posting orders
with at least 2,500 shares on each side of the order book, provided that the orders were
within 2% of the National Bid and Best Offer (NBBO) for at least 90% uptime[16]. Yet in
2018 Nasdaq announced the elimination of MQP due to lack of interest, despite “efforts by
Nasdaq to make the MQP more enticing to market makers”[17].
In the digital assets industry, market maker contracts carry a similar structure: market
makers receive a periodic fee in exchange for compliance with obligations related to uptime,
spread, and volume during that period.
Examples include centralized exchanges such as HitBTC, which maintains a public program
that incentivizes market makers[18]. Similarly, 0x, a decentralized exchange protocol, pays
market makers to provide liquidity to relayers (exchanges) that utilize the 0x protocol. 0x
market makers receive a monthly fee for maintaining a certain volume of orders on both
sides of the order book, given that uptime exceeds 90% of the month. The monthly fee
earned by market makers is determined by a function that scales with the level of slippage
reduction achieved.
2.4 Problems with Status Quo
Viewed in a historical context, market maker regulation and compensation models can
be seen as attempts to reward positive behavior such as maintaining open orders that
reduce slippage for other traders, while simultaneously deterring negative behavior such as
front-running and price manipulation.
Yet the bilateral contract model, the most common form of direct market maker compensation, has three significant problems that diminish its effectiveness in incentivizing positive
behaviors while deterring negative ones: (1) adverse selection, (2) monopolization risk, and
(3) verification difficulty.
2.4.1 Adverse Selection
Adverse selection arises when certain market participants utilize asymmetric information
to selectively transact in a market to benefit at the expense of other participants.
11


Concerns about rebate arbitrage, the practice of maximizing profits from market maker rebates while minimizing the risk incurred by maintaining fillable orders on the order book,
are often cited in regulatory discussions about whether to allow market maker compensation. One trader describes rebate arbitrage as “using the new complexity to game the
seizing of whatever kickbacks the exchange offered without actually providing the liquidity
the kickbacks was presumably meant to entice”[19].
This risk arises from the fact that bilateral contracts reward market makers for maintaining
a predefined uptime percentage over a given month, but market makers can place, adjust,
and cancel orders in real-time throughout the month. Financial markets exhibit normal
periods characterized by low price volatility and higher liquidity, interspersed with abnormal periods with high price volatility and lower liquidity. Therefore, market makers can
selectively game bilateral contracts by placing orders during normal periods and not placing
orders during the n most abnormal periods, where n equals 1 minus their percent uptime
obligation. This is an undesirable outcome since buyers of liquidity value consistency,
especially in times of market stress.
2.4.2 Monopolization Risk
As early as 1971, Bloomenthal recognized the dangers of reliance upon a single source for
liquidity provision: “One of the evils of a market with a sole and dominant market maker,
as observed by the Special Study, is the fact that investors may not realize that the very
marketability of his security depends upon a single broker-dealer’s willingness (and ability)
to continue to make a market in the security”[6].
Given the high coordination costs of negotiating and maintaining bilateral contracts, most
exchanges and issuers only engage with a few market makers, which increases dependence
on them for liquidity.
2.4.3 Verification Difficulty
For non-exchange market participants such as issuers who compensate market makers,
verifying adherence with obligations stipulated in bilateral contracts and compliance with
non-manipulative trading practices is highly challenging.
To perform verification, non-exchange participants need access to high-resolution historical
order book and trade data in each venue where their market makers operate. Afterwards,
they have to process and analyze the historical data. Since market makers may place and
cancel orders multiple times per second, ascertaining aggregate uptime, volume, and spread
over an entire month requires specialized expertise in data engineering.
12


In practice, the majority of issuers in both traditional and digital markets have neither easy
access to the data required nor the data engineering bandwidth to perform verification for
all trading venues. Instead, issuers who directly compensate market makers may be forced
to rely upon data and metrics provided by the market makers themselves.
13


3 MARKETPLACE DESIGN
3.1 Overview
Digital marketplaces in markets such as online advertising (Google) and logistics (Uber)
have significantly improved matching efficiency between buyers and sellers. This is possible
because “a computer in the middle of a transaction can observe and verify many aspects
of a transaction. The record produced by the computer can allow the contracting parties
to condition the contract on terms that were previously unobservable, thereby allowing for
more efficient transactions”[20].
Similarly, a digital marketplace like Hummingbot’s forthcoming Liquidity Mining Platform
can improve matching efficiency and align incentives between buyers (exchanges and issuers)
and sellers (individual and professional market makers) of liquidity.
Figure 1: Liquidity Mining Platform Marketplace
3.2 Market Participants
Sellers
Sellers include both individuals who run the Hummingbot open source market making
software, as well as hedge funds who use either Hummingbot or their own proprietary
software.
14
![figure](figures/p14_1.png)


For both individual and professional market makers, their goal is to earn payouts for market
making while minimizing the risk they bear. Mathematically, their objective is to maximize
the rate of return on capital deployed while maximizing spread of orders placed.
Since sellers have to commit dedicated capital in order to place orders, they need to factor
in a risk-reward tradeoff when deciding whether to provide liquidity for a given market
vis-`a-vis other ways to deploy capital, which may include uncompensated market making,
other algorithmic trading strategies, lending, or staking.
Buyers
Liquidity buyers want to increase liquidity and its consistency while incurring as little
cost as possible. Mathematically, their objective is to minimize the mean and variance of
slippage while minimizing the cost per unit of slippage reduced.
Since exchanges and exchange protocols compete with one another for traders on the basis
of liquidity, they are motivated to reduce slippage for their order books in order to attract
traders, boost trading volume, and earn more fees.
For issuers of utility tokens, their primary goal is to increase the liquidity and availability
of their token across every market where their token may potentially trade. Currently,
since most market makers specialize in providing liquidity for a few exchanges, issuers may
need to enter into bilateral contracts with multiple market makers, which incurs significant
costs in terms of money and time.
3.3 Measuring Liquidity
Since liquidity can be an overloaded term, it is useful to first define what liquidity is and
how to measure it. Liquidity measures cost of execution, the difference between the realized
price when one buys or sells an asset versus the expected mid-market price of the asset
beforehand. Note that liquidity does not measure demand for an asset, with which it is
often conflated; information about demand for an asset is reflected in its market price.
A common measure of liquidity is the bid-ask spread: the spread between the highest bid
(order to buy) price and the lowest ask (order to sell) price in a market: “An investor willing
to transact faces a tradeoff: he may either wait to transact at a favorable price or insist on
immediate execution at the current bid or ask price. The quoted ask (offer) price includes
a premium for immediate buying, and the bid price similarly reflects a concession required
for immediate sale. Thus, a natural measure of illiquidity is the spread between the bid
and ask prices, which is the sum of the buying premium and the selling concession”[21].
While bid-ask spread is the most commonly used metric of liquidity, it does not take into
15


account the quantity transacted, an important determinant of liquidity. In this paper, we
use slippage as the key metric to optimize, where slippage is defined as the difference
between the mid-market price and the actual execution price for a market order for a given
quantity of the asset.
3
Calculating Slippage
The slippage associated with any order book instance is characterized as the percentage
change in effective price of execution as an order of a predefined standard size is filled.
Let an order book be defined by a set of limit orders aggregated by order price, where the
total volume of orders at each price level aiis represented by vi. Let the midpoint of the
order book be defined by a0.
When a market order for a quantity vm arrives, limit orders are generally executed according
to price-time priority to fill the entire vm of the market order. Note that the last limit order
may be partially executed. The market order’s slippage S equals the volume-weighted
average of the spreads of the executed limit order(s):
S =
1
vm
X
i
|ai − a0|vi such that X
i
vi = vm (1)
3.4 Liquidity Mining Model
We introduce a model called Liquidity Mining that aims to balance the objectives of liquidity buyers and sellers, allowing them to transact given their disparate objectives.
For liquidity buyers, the model establishes a market price for a unit of slippage reduction
and utilizes market-based incentives to optimize for consistency of liquidity over a given
time period.
For liquidity sellers, the model effectively produces a risk-reward tradeoff curve, in which
the rate of return from liquidity mining payouts is positively correlated with risk borne, as
represented by order spread.
The model has 3 main components:
1. Order book snapshots as the standard measurement period
3For more information on how we calculate slippage, see our Crypto Liquidity Report, a monthly report
that ranks digital assets based on slippage and explore correlations with market capitalization, price action,
and price stability https://hummingbot.io/crypto-liquidity-report-2019-8.pdf
16


2. Spread density function used to weight market maker orders based on spread
3. Budget allocation that allocates the per-snapshot budget to participating market
makers
3.4.1 Order Book Snapshots
Let an order book at a point in time t be defined by a set of eligible orders {ω0...ωN }
present in the order book at t, in which each order ω has price αω and quantity vω. Let
the market mid price, the average between the price of the highest bid order and that of
the lowest ask order, be denoted by α0.
Let sω represent the spread of an order ω, in which spread is defined as the percentage
difference between the order price and the market mid price:
sω =
αω − α0
α0
(2)
We can aggregate the order book by spread s, such that the total volume of orders
{ωi,0...ωi,N } at each siis represented by νi.
Recall that bilateral contracts typically use one month as the standard measurement period,
and that adverse selection arises from the ability for market makers to selectively decide
when to participate over the monthly period.
Leveraging the fact that computers can utilize exchange APIs to observe order book state by
frequently polling for intermittent snapshots, we replace the monthly period with frequent,
high-resolution order book snapshots.
The per-month fee that bilateral contracts pay market makers for adhering to liquidity
obligations can be divided into fixed amounts allocated to each order book snapshot. If
snapshot frequency is sufficiently high, the result is an ergodic dynamical system that has
the same behavior averaged over time as averaged over the space of all the system’s states.
If the total monthly budget allocated to compensating market makers for a given market
is B, and the system takes snapshots of the market’s order book every T seconds, then the
fixed payout b for each snapshot is given by:
b =
B × T × 12
365.25 × 24 × 3600
(3)
The payout b is a fixed amount allocated to participating market makers present in the
order book at the snapshot timestamp, which is taken, on average every T seconds. The
17


proportion of b earned by each market maker is a function of the order volume νi and
spread sifor each order ω in the snapshot.
Below, we formally formulate these incentives in terms of a mechanism for the distribution
of rewards amongst market makers for each snapshot.
3.4.2 Spread Density Function
Digital marketplaces generally have a mechanism that prices the commodity used to transact in the respective market. Examples of this mechanism include the cost-per-click (CPC)
model in online advertising networks like Google Ads and surge pricing in transportation
marketplaces like Uber.
In liquidity mining, we introduce a mechanism called the Spread Density Function (SDF)
that prices spread, the primary commodity in the market for liquidity. From a liquidity
buyer’s perspective, spread is a proxy for slippage reduction, since the spread of an order
equals the marginal slippage reduction for a quantity equal to the order amount. From
the perspective of the liquidity seller (market maker), spread is a proxy for risk, because
placing orders with lower spreads raises the probability of a fill event that carries exposure
to inventory and information risk, in addition to lowering the expected profit per fill.
Let smax define the maximum spread at which a liquidity buyer will compensate a market
maker. For spreads beyond the compensation range, s > smax, market makers are not
compensated for orders at these spreads.
Let ρ(s) denote a Spread Density Function with the following properties:
1. ρ(s) = 0, for s > smax
2. ρ(s + δ) < ρ(s) i.e. ρ(s) is a monotonically decreasing function
For the purposes of this discussion, we choose an exponential decay function that satisfies
the properties above.
ρ(s) = e
−2s/smax , for s ≤ smax
= 0 , for s > smax
(4)
18


Figure 2: Spread Density Function (see Equation 4)
Note that the constant (currently 2) in the exponential decay function determines the
steepness of the payout curve.
This function ρ(s) can be applied to each spread level siin the spread-aggregated order
book. Thus, the sum of weighted orders for any order book snapshot is:
W =
X
|s|≤smax
νsρ(s) (5)
3.4.3 Budget Allocation
By applying ρ(s) to the budget b for each order book snapshot taken every T seconds, the
model can then allocate payouts to participating market makers who have open orders.
19
![figure](figures/p19_2.png)


For any particular spread level s, the total payout across market makers is:
Rs = b
νsρ(s)
W
(6)
A market maker m with order volumes at a particular spread of νs,m receives a prorata
share of the payout:
Rs,m = b
νs,m
νs
νsρ(s)
W
= b
νs,mρ(s)
W
(7)
The total payout per snapshot earned by a market maker m with a set of orders {νs,m} is,
bm =
X
|s|≤smax
Rs,m
= b
X
|s|≤smax
νs,mρ(s)
W
= b
P
|s|≤smax
νs,mρ(s)
P
|s|≤smax
νsρ(s)
= b
P
|s|≤smax
νs,me
−2s/smax
P
|s|≤smax
νse
−2s/smax
(8)
3.5 Simulation-Based Analysis
To illustrate how this model balances the disparate objectives of both liquidity buyers
and sellers, we utilize a simulation-based approach. Below, we describe the assumptions
underlying the simulation and discuss the results.
3.5.1 Assumptions
Let the order book be defined by N market makers {m0, ..., mN } who each place symmetrical $2000 bid and ask orders. Each market maker places orders at a fixed spread
{s0, ..., sN }, drawn from a normal distribution with mean 0.5% and standard deviation
0.25%, subject to a minimum spread of 0.1%. At every time step t, each market maker has
an 80% probability of participating in the order book by placing orders.
Let market order arrivals be defined as a process in which market orders arrive randomly
and are filled by orders present in the order book. The order arrival rate is drawn from
20


a normal distribution with mean 5t and standard deviation 5t. The size of each order is
also normally distributed with mean $1000 and standard deviation $10,000, subject to a
minimum of $100. Each order has an equal probability of being either a buy or a sell order.
If there exists sufficient order volume in the order book, the market order is filled. After
removal of the filled orders, the simulation re-calculates the market mid price a0 and recenters the spread sω of each order ω in the order book around a0 (see Equation 2).
Let compensation payouts be defined by a process in which a fixed amount b of $0.10 is
allocated to participating market makers present in the order book at each time step t. If
t represents one minute, the equivalent monthly budget B equals $4,383 (see Equation 3).
At each time t, after the order book is populated with market maker orders and before
market order arrivals, each order is weighted using the Spread Density Function ρ(s) (see
Equation 4). Then, b is allocated to each market maker m according to Equation 8.
Assuming three different liquidity regimes that differ by number of market makers, we
run this simulation for 525,600 time steps (one year if t equals one minute) for each liquidity
regime:
1. Low liquidity: N = 40
2. Normal liquidity: N = 60
3. High liquidity: N = 80
For simplicity, we assume that the market markers’ annual rate of return is based solely on
their compensation payouts versus the amount of capital they commit to market making
($4000 for each market maker, given symmetrical $2000 bid and ask orders). Any profits
or losses from filling market orders are not taken into account.
3.5.2 Results
Below, we exhibit charts that illustrate the simulation results and discuss their implications.
21


Figure 3: Annual Rate of Return vs Spread
For each liquidity regime, we plot each market maker’s rate of return versus spread. The
distribution of market maker earnings is based on ρ(s) defined in Equation 3. In addition,
note that in lower liquidity regimes, market maker earn higher rates of return, which
compensate them for the higher risks borne.
22
![figure](figures/p22_3.png)


Figure 4: Annual Rate of Return vs Traded Volume
Although the liquidity mining model does not explicitly reward market makers based on
traded volume, we show that the rate of return earned by market makers is positively
correlated to the total volume of orders they fill. This is especially true in a low liquidity
regime, in which most market makers contribute to total trading volume filled.
23
![figure](figures/p23_4.png)


Figure 5: Trade Size vs Slippage
In order to assess the impact of the liquidity mining model on realized slippage, we plot
the slippage incurred (calculated using Equation 1) of each filled market order against its
order size. In the high liquidity regime with 80 market makers, most orders are filled by
the market makers with the lowest spreads and thus incur low slippage. In contrast, the
low liquidity regime exhibits a wider slippage distribution, especially for larger trade sizes.
Despite the simplicity of the simulation, the results illustrate that liquidity mining has the
potential to significantly reduce costs for liquidity buyers, while still achieving an attractive
rate of return for liquidity sellers. For exchange and token issuers who enter into longer-term
bilateral contracts with market makers that may exceed hundreds of thousands of dollars
per month, liquidity mining may significantly reduce the cost of liquidity, in addition to
mitigating adverse selection risk. For both individual and professional market makers who
participate, liquidity mining offers the potential to make more productive use of their
existing inventory of assets and earn a higher rate of return than other means.
24
![figure](figures/p24_5.png)


4 PREVENTING MANIPULATION
4.1 Manipulation in Crypto
As with the advent of other breakthrough technologies in history, the emergence of cryptocurrencies has experienced negative publicity and association with criminal and fraudulent activities from early users and adopters. In this section, we describe fraudulent
practices available to market makers, market manipulation, and how the liquidity mining
model mitigates those risks.
Unbounded risk of market manipulation arising from lack of surveillance on the largest
global Bitcoin markets is the main reason why the SEC has rejected all proposed Bitcoin
ETFs to date[22]. Market manipulation is also one of the reasons why large institutional
investors have yet to enter the market, slowing the adoption of cryptocurrencies by large
sectors of the financial community.
In the case of digital asset exchanges, the potential for outsized rewards[23] coupled with the
relatively low barrier to entry for creating a new exchange has resulted in fierce competition
to acquire users and the trading fees that come with them.
One main metric that is regarded as a measure of an exchange’s adoption and prominence
is trading volume, the primary metric used to rank cryptocurrency exchanges on CoinMarketCap, the most widely used cryptocurrency data and pricing platform[24]. Incentivized
to compete on the basis of volume, many digital exchanges began to inflate volume via
manipulative trading practices. A May 2019 report from Bitwise Asset Management[25]
claims that 95% of reported Bitcoin volume was fake volume, consisting of fraudulent prints
or wash trading.
Similarly, token issuers are also motivated to boost their tokens’ trading volume, which can
also be regarded as a measure of their capture of market attention and prominence.
4.2 Types of Manipulation
We define the three primary types of manipulative trading practices and how the liquidity
mining model does not reward participants for engaging in them. We also describe how
Hummingbot collects and verifies the order book data used to allocate payouts.
25


4.2.1 Wash Trading
Wash trading occurs when a trader (or a group of traders acting in concert) trades with
itself (or amongst themselves). The goal of a trader engaged in wash trading is to inflate
the volume of the traded asset. An example of a wash trade is when a trader places a limit
bid (or ask) order from one account, followed by a market ask (or bid) order from another
account, where both accounts are owned and/or controlled by that trader. Such a trade
has no economic rationale since the trader would incur a cost due to trading fees.
Detection
Hummingbot uses machine learning to isolate unusual patterns in data produced by participants in our Liquidity Mining Platform. One method that we utilize to attempt to
detect wash trading is to measure the probability that a trader’s limit order is filled within
a certain interval of time immediately after placement:
P(order filled within T seconds | order placed)
Subsequently, we compare this metric with that collected from a broader sample of traders
in the market. If a trader’s placed limit orders are filled at an abnormally faster rate than
those of other traders in the market, it may indicate that the trader may be engaged in
wash trading.
Mitigation
Any trader detected of engaging in wash trading would be disqualified from receiving
liquidity mining rewards.
In addition, determination of rewards can be formulated on metrics other than volume,
either on their own or in conjunction with filled order volume. Rather than compensating
market makers solely on the basis of trading volume, we propose an alternative scheme
that is based on a combination of open order volume, order duration, and spread.
By rewarding open order volume weighted by the duration orders are outstanding, we
promote the consistent placement of limit orders and the provisioning of order book depth.
By incorporating spread into the reward calculation metric, this aligns the rewards with
the goal of minimizing slippage.
4.2.2 Spoofing
Spoofing occurs when a trader creates orders without the true intention of such orders
being filled. For example, a trader may create orders that are cancelled immediately so as
26


to prevent other market participants having sufficient time to fill such orders, or creating
orders at wide spreads that result in uneconomical prices.
The motivation for spoofing is generally to create the appearance of increased order book
depth and signal market interest in an asset. In the context of market making, spoofing may
also be used in rebate arbitrage, in which a market maker captures rebates for providing
order book depth, while not actually providing reasonably fillable orders.
Detection
As with wash trading, one method we utilize to attempt to detect spoofing is to measure
the probability that a placed order is cancelled within an interval of time immediately after
placement:
P(order cancelled within T seconds | order placed)
This can be compared against the average times in which limit orders are filled as a measure
of the market’s response time and ability to fill outstanding orders. Also, this duration
can be compared with the cancel order times for a broader sample of traders. Naturally,
traders may re-adjust and cancel orders in response to market price movements. Therefore,
comparing a trader’s cancel order times versus the broader market creates the possibility
for anomalies and unusual market behavior.
Other metrics that we analyze include: (1) the spread at which orders are placed, which
can be compared to the average spread levels at which other placed orders are filled and
(2) the average duration of a trader’s orders which go unfilled. Unusually larger spreads
and longer unfilled order durations could signal that such orders were deliberately created
without the intention of being filled.
Mitigation
Liquidity mining incentives can be formulated, amongst other factors, based on order size,
price, and timing. With these three metrics, we can devise incentive mechanisms designed
to minimize spoofing.
Since the expected value of rewards earned is linear to the amount of time that the orders
are left outstanding, market makers do not derive any advantage from canceling orders
frequently.
To mitigate gamification by market makers who try to maintain orders only when snapshots
are taken, we frequently sample order books with stochastic intervals.
Also, since we capture both price levels and order sizes, orders placed at tighter spreads
27


can earn higher rewards. Orders placed at wide spreads can be filtered out from eligibility
for earning rewards.
4.2.3 Price Manipulation
Price manipulation is the attempt to artificially push prices in one direction or prevent
prices from moving in one direction.
In the crypto market, a common form of price manipulation is termed a “pump and dump”
scheme, in which a group of traders buys an asset and inflates its price with the objective
of enticing other market participants to join in in buying the asset to prolong the price
appreciation, then subsequently immediately selling the asset to capture profits from the
artificially elevated price.
Another form of price manipulation that may be performed by market makers is to place
a much larger volume of orders on one side of the order book than another, termed a “buy
wall” or “sell wall.”
Detection
Price manipulation can be detected by analyzing the sizes and spreads of orders in one side
of the order book (bid or ask), duration of persistent imbalances (e.g. buy sizes greater
than ask sizes, bid spreads tighter than ask spreads), and identifying patterns of swings in
the imbalance. Note that there may be legitimate reasons why traders do this, so the risk
of false positives is high.
Mitigation
In the liquidity mining model, we can mandate that payouts must be evenly distributed
between the buy and sell sides of the order book as a means of disincentivizing market
makers from favoring one side of the book versus the other.
4.3 Data Collection and Verification
We use multiple data sources to triangulate the authenticity of data and perform verification.
1. Users: read-only API key to exchanges
In order to participate in liquidity mining, all liquidity sellers must provide read-only API
keys to each exchange for which they earn payouts, so that we can verify their order data.
28


This mitigates the risk of fraudulent or manipulated data being reported by market makers
to Hummingbot to be utilized in determining payouts.
2. Exchanges: aggregate exchange data feed
Separate from the Hummingbot client, the Hummingbot team has developed and operates
a data collection and analysis infrastructure. One of the modules of this infrastructure is
a series of data collectors that collect and store full-resolution order book and trade data.
3. Client: orders and trades sent from Hummingbot client
In order to participate in liquidity mining, users of the open source Hummingbot software
client are required to consent to sharing their trading data with us. This data, which
includes a user’s orders and trades, are automatically reported by the Hummingbot client
directly to Hummingbot’s data collection system.
These three overlapping data sources allow Hummingbot to verify order and trade data
without sole reliance on either the user or the exchange. In addition, it also increases the
probability that Hummingbot can detect anomalies in the data and prevent manipulative
trading practices.
4.4 Auditability
Since the liquidity mining model relies upon order book data to calculate the slippage
reduction effect for liquidity buyers as well as payouts for liquidity sellers, the accuracy,
completeness, and availability of this data is critically important.
As the marketplace operator responsible for both collecting and verifying order book data
and processing payouts to participating market makers, Hummingbot plays an important
role in maintaining trust in the system.
In order to mitigate risks of market operator manipulation, we plan to publish real-time
liquidity data on the markets involved in liquidity mining. This public data serves two
purposes: (1) it helps profit-seeking market makers evaluate in which markets to best
deploy capital, and (2) it provides an audit trail that enables external market observers to
verify the accuracy and completeness of the data used to drive liquidity mining payouts.
29


5 SUMMARY
The evolution of financial markets exhibits a clear trend toward openness and fragmentation. In the US equity markets, the exclusive club of NYSE seat-holders has been replaced
by 13 equities exchanges and 55 Alternative Trading Systems that source liquidity from a
wide variety of firms today. Blockchain technology, by enabling programmatic asset creation and global, permissionless trading, has further catalyzed this trend, resulting in a
Cambrian explosion of digital assets and venues to trade them.
As financial markets fragment and compete for liquidity, the market for liquidity itself
grows in importance. Without an efficient, transparent market for liquidity, fragmented
financial markets are prone to matching inefficiency, exemplified by the small-cap liquidity
crisis in the US equities market, as well as market manipulation, such as the fake volume
problem in the crypto market.
By creating the first digital marketplace for liquidity and utilizing market-based incentives
to align the preferences of liquidity buyers and sellers, we aim to improve the efficiency,
transparency, and fairness of the digital assets industry.
In the future, we hope to extend the concept of liquidity mining to other financial markets
where fragmentation of liquidity is a problem, such as small-cap equities or high-yield
credit.
30


References
[1] CoinAlpha, Inc. Hummingbot: Decentralized Market Making. December 2018.
[2] Harold Demsetz. The Cost of Transacting. Quarterly Journal of Economics, 82-1:33–
53, 1968.
[3] Henry Keyser. The Law Relating to Transaction on the Stock Exchange. Henry Butterworth, London, 1850.
[4] Andy Hill. The Current State and Future Evolution of the European Investment
Grade Corporate Bond Secondary Market. International Capital Market Association
(ICMA), 2014.
[5] Joint CFTC-SEC Advisory Committee on Emerging Regulatory Issues. Recommendation Regarding Regulatory Responses to the Market Events of May 6, 2010. 2011.
[6] Harold S. Bloomenthall. Market-Makers, Manipulations and Shell Games. St. John’s
Law Review, pages 598–606, 1971.
[7] Kumar Venkataraman & Andrew C. Waisburd. The Value of the Designated Market
Maker. Journal of Financial and Quantitative Analysis, 42.3:735–758, 2007.
[8] Securities and Exchange Commission. Alternative Trading Systems with Form ATS
on File with the SEC as of September 30, 2019. https://www.sec.gov/foia/docs/
atslist.htm, 2019. [Online; accessed 15-October-2019].
[9] All Cryptocurrencies. https://coinmarketcap.com/all/views/all/, 2019. [Online;
accessed 15-October-2019].
[10] Stanislav Dolgopolov. Regulating Merchants of Liquidity: Market Making from
Crowded Floors to High-Frequency Trading. University of Pennsylvania Journal of
Business Law, 18:3:661, 2016.
[11] Committee on Oversight and Government Reform. How Roadblocks in Public Markets
Prevent Job Creation on Main Street. House of Representatives, November 2011.
[12] Johannes A Skjeltorp & Bernt Arne Ødegaard. Why do listed firms pay for market
making in their own stock? March 2013.
[13] Jenny Anderson. 15 Specialists From Big Board Are Indicted. New York Times, April
2015.
[14] Anthony Saliba. Ephemeral Liquidity in a Purely Order-Driven Market. Tabb Forum,
May 2010.
31


[15] Stanislav Dolgopolov. Linking the Securities Market Structure and Capital Formation:
Incentives for Market Makers? University of Pennsylvania Journal of Business Law,
16:1:740, 2013.
[16] Nasdaq. Frequently Asked Questions: Nasdaq Market Quality Program. https:
//www.nasdaqtrader.com/content/etfs/mktqualityprogram.pdf.
[17] Maria Nikolova. Nasdaq plans to eliminate Market Quality Program. FinanceFeeds,
Sept 2018.
[18] HitBTC. Conditions for Market Makers. https://hitbtc.com/mm.
[19] Tony Tan. HFT Strategies: Why the Sudden Fuss over Speed Advantages? CFA
Institute, June 2014.
[20] Hal R. Varian. Computer mediated transactions. American Economic Review, 100.2:1–
10, (2010).
[21] Yakov Amihud & Haim Mendelson. Asset Pricing and the Bid-Ask Spread. Journal
of Financial Economics, 17:223, 1986.
[22] Securities and Exchange Commission. Self-Regulatory Organizations; NYSE Arca,
Inc.; Order Disapproving a Proposed Rule Change, as Modified by Amendment No. 1,
Relating to the Listing and Trading of Shares of the Bitwise Bitcoin ETF Trust Under NYSE Arca Rule 8.201-E. https://www.sec.gov/rules/sro/nysearca/2019/
34-87267.pdf, (2019). (Release No. 34-87267; File No. SR-NYSEArca-2019-01).
[23] C. Russo. Crypto Exchanges Are Raking in Billions of Dollars. https://www.bloomberg.com/news/articles/2018-03-05/
crypto-exchanges-raking-in-billions-emerge-as-kings-of-coins, (2018).
[24] https://coinmarketcap.com.
[25] Matthew Hougan, Hong Kim, & Micah Lerner. Economic and Non-Economic
Trading In Bitcoin: Exploring the Real Spot Market For The World’s First
Digital Commodity. https://www.sec.gov/comments/sr-nysearca-2019-01/
srnysearca201901-5574233-185408.pdf.
32

Shown in full with attribution under the source's licence. Licence: Apache-2.0

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.