Market-making Strategy In Low-Cap Crypto: A to Z

How I Traded $250k+ in Crypto From My Room and Failed

Sergey Zakrytnoy
10 min readJun 6, 2022

This is a story about one pandemic-born project that we did back in Summer 2020 together with a crypto startup team that I had freelanced for. It has to do with making profit from the immaturity of some crypto markets.

I will share how the project went from ideation to execution, and, most importantly, the things it taught me about the mechanism of financial markets. I would not be exaggerating if I say that since that point of time, I have never again been delusional about the opportunities that those markets may or may not hold for grasp.

This is a restoration of the research diary that I kept those days, so please excuse the inconsistent formatting in some of the attachments…

Two ways to make profit from trading

Let’s start with the basics. How does one make profit from trading? Fundamentally, it is only possible if one buys low and sells high. Technically, it means that one should either

  • guess if the price of an asset will go up or down (sometimes referred to as statistical arbitrage, time arbitrage, etc.) — I wrote another story on how I once was very successful in the guessing, and why I would never do it again; or
  • leverage the deficiencies of the market itself — think of a situation when for a certain period of time an asset can be bought on one exchange lower than it can be sold on another one, or if three assets are all traded against each other, and their exchange rates are such that it is possible to make a full circle of trades and exit the loop with more money than when you entered.

This story is about leveraging the mechanisms of the market.

Making the market and … taking the market

While this story is much more technical than others, I would like to make it accessible for readers with minimal interest or knowledge in how financial markets operate. Have you ever wondered what it means to execute a trade?

Imagine we are logging in to an exchange — be it foreign exchange (FOREX), stock market or crypto. Let’s stick to crypto, as this is what the story is about. We want to buy some Sandbox Coin (SAND). We can say that we want to buy 10 USDT worth of SAND at

  1. a price of exactly 1.2884 USDT per 1 SAND — Limit order;
  2. whatever price is asked for, in order to close this trade immediately — Market order.

Market orders would always be matched with the most favourable limit order first. You can see that placing a market order and having the trade executed instantly comes at a cost — the price would be 0.02% higher.

The ability to execute one’s trading wishes instantly (place market orders) comes from the fact that many people place their limit orders, both on the buying and selling side.

Placing limit orders is called making the market, providing liquidity to it. Placing market orders is called taking the market.

There are players in the market who make profit by constantly placing competitive buy- and sell- side limit orders and putting the tiny difference in price from each executed trade in their pocket. The strategy is called market making and is commonly executed by bots. So we decided to make one…

It is all about the spread

You may have noticed that there is a gap between best offers on the buy and sell sides. The gap is called spread, and it is there because otherwise market makers would be placing their limit orders at a loss.

Apart from being non-negative, spread tends to represent the distance between best buy and sell orders which is sufficient to cover for commission fees that market makers need to pay.

Commission fees? — you heard that right. For every executed trade, the platform (in our case — crypto exchange) would charge a commission fee, usually calculated as % of the trade amount. On Binance, the commission rate depends on the volume of trades over 30 days period and some other factors like participation in the referral programme.

Commission rates on Binance crypto exchange as of 3.6.2022

Together with my partners, we could secure a market-maker fee of 0.06% per trade, which means that for every buy+sell combination we would pay a total of 0.12% of the trade volume.

Practically, it meant that we had to secure two things

  • ability to squeeze in competitive limit orders that would be taken promptly;
  • markets with the spread consistently over 0.12% of the price.

Choosing the market: early validation

Before jumping into development process, we wanted to validate that such markets exist.

Choosing a pair for market making is like choosing a wave in surfing — extremely hard to get it right (especially if you are shortsighted and not wearing contacts), and even if you are lucky with the choice — you still need to deliver the rest.

We decided to explore the markets traded against stablecoins to mitigate the risk that both quoted and base assets would depreciate against fiat currencies over the course of time, eating up our humble profits. Out of those, we distinguished three types

Intuitively, medium market-cap coins could combine sufficiently wide spread with decent trading volumes. Why is volume important, you may ask? Because if there is a spread of 3% but not a single trade in the market for 24 hours, it is far less lucrative than cashing in on a few thousand trades with a spread of 0.5%.

I created a script that would listen to the market conditions and visualize three things

  1. Bid and ask prices (official terms for best buy and sell side orders);
  2. Spread (ask minus bid) against double commission rates;
  3. Market opportunity, defined as the amount of net profit to be made after commission.

The selected examples revealed that the theoretical maximal opportunity to be captured was ~5 USD over 8 mins 28 seconds of observation, totalling ~1k daily and 30k monthly. At 10% market capture rate (meaning that every tenth trade would be go through our limit orders), we were at 3k USD per market, per month. Not bad! We continued.

Choosing the market: more scientific

Drawing conclusions from observation of three markets over few minutes of time could be too coincidental; so we observed all of them, over hours. I then plotted average spread against monthly volume — one multiplied by the other, less of the commission fees, would be a rough estimate of the total opportunity.

By looking at all markets instead of selected few, we found some that of those represented up to 80k theoretical max monthly opportunity. The total estimate was at 200k USD monthly.

Considering that some of those were lower-hanging fruit, we outlined some scenarios to how we should enter the game. By any means, we saw dozens of thousands dollars luring us into market-making on low-cap crypto. We were happy with the estimate and proceeded.

At that point, we were committed to developing the solution. Take a 2 min break here to recharge :)

Backtest before you put money on the table

Backtesting is a process of looking back at historical data and pretending that we would have been executing certain trading strategy. One should always backtest before trying things out in real world.

We rolled up our sleeves, loaded a month-worth of historical trades, and tested a few scenarios with different initial capital and single trade amount parameters.

Imagine our surprise when we saw that while our strategy would have executed from 2.4k to 20.1k trades (hundreds of thousands dollars in volume!), our positive outlook never realized in terms of return on investment (ROI).

Soon enough, we realized that once entered a trade (found a good moment in time to place a limit-buy order, which gets executed), we would have pursued the soonest closure possible, even if it would have led to a loss. In other words, we would have sold immediately, even if the price had taken a temporary dip — that price could easily be affected by the very same market-sell order that took our limit-buy.

The solution seemed obvious — instead of closing a trade right away, we would allow a certain time window for the price to recover. Do you see the catch? Neither did I… So we continued.

Scientifically deciding on the waiting time

For the selected markets, we observed historical data, but with a different purpose in mind — instead of simulating realized trades, for every potential entry (every opportunity with spread over double commission) we estimated time-to-profit, i.e. the number of seconds it would take us to wait to close the trade profitably.

Looking at the chart on the left, we see a spike in number of profitable trades with time-to-profit approaching zero — those were our “target” cases with wide spread and quick closure. Another spike of profitable closures was observed long time after the initial trade had been opened — which means that the market went down first, freezing our position, and recovered long (~22 hours) time after.

The cumulative frequency histogram on the right-hand side shows that ~66% of opened trades would have been closed profitably within 5 minutes of waiting time; another ~20% would have recovered long time after (and would not have been waited for), while the remaining ~14% of trades would have never turned profitable within the observed period of time. In this case, we would set the waiting time parameter to 5 minutes and make the market.

Backtest again

Remember the rule?

One should always backtest before trying things out in real world.

We loaded the data and ran another series of backtests on the most promising markets.

The test revealed a few important learnings

  • introducing “waiting time” parameter did the trick, and the backtests turned profitable;
  • in the low- and medium-cap markets, a small, more agile trade amount yielded more predictable outcome — it is more likely that we see demand (a market order) for a few dozens dollars than one worth hundreds.

Deployment, failure and conclusions

We were satisfied with the research findings, so what happened next is meticulous, painful development process, full of hope, promises, delays and frustration (just like any other software development — speaking from the seat of a Product Owner in a SaaS solution).

I ended up with my own version of the bot that I deployed on PaaS Heroku — it was capable of taking in the parameters such as waiting time and single trade amount, shortlist the markets based on current conditions and, well, make them. It was beating its competitors to place the most lucrative buy and sell side limit orders in low- and medium-cap crypto, just like intended.

So are we rich?

Well, not from market-making in crypto :D

I collected a lot of fun statistics. I tried making the market on dozens of crypto pairs, and one night executed more than 250k USD worth of trades capturing 25% of the market with <100 USD budget. At times, I was quite good at not losing money quickly. But it rarely, if ever, made any actual profit, despite the screaming-good backtests.

Why?

The trick is hidden in the “waiting time” parameter. As soon as we hit that road, I should have realized that we were no longer playing a game of pure market-making. To visualize what I mean by that, let’s take a look at the orderbook of a random low-cap crypto

The picture above illustrates a story that repeated itself over and over again. Unlike giants like Bitcoin and Ethereum, low-cap crypto is very sensitive to individual market orders that push the price by 1, 2, 3% up and down. The fact that we are able to squeeze competitive limit orders within 0.5% spread does not help, if the next minute the price goes down the hill and is picked up by other market-making bots.

Just like this, the strategy that meant to be purely mechanical, no guesswork involved on whether people would rather buy or sell in the minutes and hours to come, once again became a game of waiting until people placed enough demand for the asset to push the price up. Which, in the end, is no different from statistical arbitrage, or gambling.

Finalizing this story from Lisbon — featured image :)

--

--

Sergey Zakrytnoy

I live in Finland, travel, and write about Economics, Crypto and Adventures.