# How can a top-of-the book market maker protect itself from exploiting?

Let's consider there is an instrument N traded on a single venue (centralized anonymous limit orderbook). Let's say that most taker orders are tiny, therefore the one who stays at the best bid/offer gets most turnover. A market maker, who knows this, pursues the following strategy:

if inventory < X, place a buy order at the best bid + one tick
if inventory > X, place a sell order at the best ask - one tick

In such case, a manipulator might appear who can exploit the maker the following way. Let's denote:

a - best ask quote by anyone apart from the maker and the manipulator
b - best bid quote by anyone apart from the maker and the manipulator
t - price tick

Then, within a short period t, while a and b remain constant, the following can happen:

1. The manipulator places a buy order at a-2t
2. The maker places a buy order at a-t
3. The manipulator sells to the maker at a-t
4. When the maker's inventory is full, the manipulator removes its buy order and places a sell order at b+2t
5. The maker places a sell order at b+t
6. The manipulator closes its position at b+t with profit
7. 1-6 repeated in a loop until the maker is run out of money

Is there a way a maker can protect itself from such manipulation? To be more percise, is there a strategy for a maker which wouldn't sacrafice much turnover for which there does not exist a strategy for a manipulator which allows to make risk-free profit by placing spoofing orders?

• first you have your own recipe to compute the adjusted mid-price $$p^*$$; an basic example is to use the imbalance;
• second you use your estimate of a fair bid-ask $$\psi^*$$, a simple version would be to use a moving average of the bid-ask spread, but what is better is to condition it by information (News for instance, or the intraday volatility) that you have.
Then you replace "best bid" by $$p^*-\psi^*/2$$ and "best ask" by $$p^*+\psi^*/2$$. Of course this is not totally immune to manipulation, but it requires to accept more risk to manipulate these indicators.