Hare: Hopping Over Front-Running On Crypto Exchanges

Today, cryptocurrency exchanges are full of penny-jumper bots. These agents are programmed to hop in front of you, at every turn, and chip away at your profits.

Let’s say you go to an exchange while the price of BTC is in an upward swing and you want to buy 10 bitcoin. The current bid (what someone willing to buy for) price is $9,235, and the current ask (what someone willing to sell for) is $9,240. You place a limit order to buy 10 BTC at $9,236 and you wait on the Bid side.

Instantaneously, a bot places a 0.01 BTC order in front of yours — at a price of $9,236.01 — and starts taking your fills. You cancel your order and place a new one at $9236.02, but before you can get there, the bot has placed a new order at $9236.03. As the bots front run you, you get frustrated. You may never actually be able to fill your order. Even if it does fill, you’ll have paid far more than you were expecting to pay.

Every time the order book refreshes, new orders hop in front of a single 85.89 BTC order, preventing it from getting fills.


You now have two options. You can try to get on top of the order book by upping your price and hope you get a fill there (fingers crossed — we will pray for you).

The other option is to take an order from the Ask side and pay extra. In our example, you would be lucky if you could fill at $9240 (the highest on the Ask side). You may well have to go deeper on the order book and pay as much as $9245. That’s not even counting the extra fees you pay as a taker on an exchange.

The example above illustrates the challenge bots present in executing well-priced BTC trades quickly. The bots are specifically programmed to watch for large limit orders and determine, via algorithm, whether they can get an advantageous position from placing a limit order one tick above them. They get their orders filled instantly, since their smaller orders at higher prices are much easier for the market to fulfill. When they do, it costs you money in two ways: either by competing for fills with automated trading bots, or by paying extra in fees and higher prices going deeper and deeper into the order book.

This conundrum is why we developed our Hare algorithm.

The Penny Jumper Problem

Let us fill you in on a secret. The market makers who write trading bots have many different strategies to make money. One such strategy is called the “Penny Jumper.”

The strategy behind Penny Jumping isn’t necessarily going to result in profit on every trade, but in the long-run, it will almost certainly win against any manual human trader.

Here’s how it typically works: the Penny Jumper bot spots a big limit buy order, and immediately places a very small limit order just above it in the order book. If the big limit order is at $9240.00, the bot’s order might go in at $9240.01. These small orders fill quickly. The moment that fill comes, one of two things will happen: the price of bitcoin will go up, or the price of bitcoin will go down.

The secret to the Penny Jumper bot’s success is that it is covered whether the price goes up or down.

  • If the price of bitcoin goes down after the bot gets its fill, it can immediately sell that bitcoin back to you and your big buy order. By placing that order, you’ve essentially given every bot out there a free option for unloading their BTC (that they jumped in front of you to get.) They’ll be selling at a loss, but only a very small one — their losses are capped at about $0.01 or $0.02 per BTC, the exact figure being dependent on the interval they’re jumping you by. NOTE: This example ignores fees.
  • If the price of bitcoin goes up after the bot gets its fill, on the other hand, its upside can be far higher — and the price can rise quickly when there are no big limit orders in the way to soak up all the fills. The bot can wait on the top of the Ask side while you get more and more frustrated by the price rising. As soon as you give up and switch to a taker order, it can sell the BTC it jumped you to get for a tidy profit. Adding insult to injury, that purchase will drive the price up, allowing the bot to play the same game again at a higher price.

This tactic is designed to work in a perfectly random market, where the price under consideration goes $0.01 down half the time (losing the bot’s $0.01) and up the other half of the time (netting it at least $0.01).

It works especially well in bull markets like Bitcoin’s and in situations where a significant buy order can create an upwards reaction in the price from the market — the bots effectively get to ride in that big limit order’s slipstream.

If the price of bitcoin goes up to $10,060 in the order book represented above, more than 100 BTC will need to be purchased to bring the price up any higher. That can take a while — in the meantime, bots can front-run and bet on the price going back down.


Trying to battle bots as a human trader is an uphill battle. You’re trying to get the better of something that can execute trades instantly, that’s grinding profit out of the nickels and dimes it takes off the top from traders like you. It is almost impossible to win against it on your own — you’re not even playing the same game.

You place your limit order, notice yourself getting front-run, cancel your limit order, and reset it just a penny higher than the bot that front-ran you. Before you know it, however, the bot has jumped you again. It gets more of your fills. It continues to scrape for every fill it can. No matter what happens, it is covered, while you lose:

  • You can cancel your limit (buy) order and set it a few pennies higher to try and avoid the bots, but you’re limited by your reaction speed and the speed of the exchange’s web interface. The bots can trade far faster than you can, and they do it via API. You can get partial fills, but if the price goes up, you’re going to be getting them at progressively higher prices the more you have to move your limit price up to beat the bots.
  • You can cancel your limit (buy) order and set it lower, but you could be waiting quite a long time at the lower price.
  • You can stay where you are and wait. You can always just wait and hope the prices move in your favor. If the price keeps increasing, however, you will always wonder what it would have been like had that order executed.
  • You can use taker orders. Your trade will execute immediately, and you won’t have to worry about dealing with bots, but with a $10,000+ order you can easily wind up paying 1–3% more due to how deep you’re going in the order book and your exchange’s taker fees. That’s a cost of between $100-$300 on each order.

Getting a decent price and having your order executed quickly when you’re trading a significant amount of bitcoin is hard. You’re either competing with machines with perfect reaction time or you’re paying extra. While dealing with bots isn’t ideal, the costs you are likely to incur on the taker side of the orders can be even worse.

We built Hare because we believe in building an open platform where all users can have the kind of power that only bots have today.

How Hare Helps You Get Fills At The Best Possible Prices

Our Hare algorithm was specifically designed to help our customers get better prices and better execution speeds on their trades.

To use Hare from your SFOX dashboard, you enter the quantity of bitcoin you want to buy (or sell), enter your limit price, choose Hare from the “Algorithm” dropdown menu, and confirm the total cost.

When you hit “Buy BTC,” Hare activates and starts to look for the best price possible without compromising on execution speed.

First, Hare places your trade. Like all of our algorithms, Hare will help us look across every exchange to determine where we have the best chance of executing at the best possible price.

Various exchanges will have various prices at any given time of the day — the moment-to-moment price is dependent on a whole host of variables. The smart routing that’s built into Hare works by analyzing the depth of different exchanges’ order books, their volume (both of which help determine how likely a trade is to execute), as well as historical data that we’ve collected on how likely trades are to execute on various exchanges.

Next, Hare figures out the right price to place the order at. By default, it won’t simply place the order — it will analyze the order book and our historical data to try to get you a better price than your limit price.

Say the bid is $9,900 and the ask is $9,950 (we know, we know…this wide of a spread hardly happens, but humor us, please). If you set a buy order for $9,925 Hare may try and set the price to $9,901 or even $9,900 if it thinks it might be able to execute at that price.

Hare will always respect your limit price. If you set a buy order for $9,925, Hare will try to go lower, but it won’t go higher than that.

As Hare sets your price and starts to get fills, Hare will continue to monitor the order book.

If a bot tries to jump in front of your limit order, Hare will “hop,” bringing your order up in the orderbook. Let’s take an example where you place a limit buy order with us at $9,010 and Hare is trying to buy at $9000. If a bot comes in and places a small order at $9,000.01, the order will move up by $0.01 to meet it (take that, you Penny Jumping bot).

Left unchecked, this would produce a bidding war that would drive the spread to zero. That’s why Hare doesn’t start front-running of its own accord — it merely hops up to match what it sees the bots are doing.

When Hare and a bot are both sitting at the same price — say $9,000.00 — Hare will simply monitor the bot to see whether it is getting a fill. If it cancels without getting its order filled, Hare knows that it’s about to front-run, and Hare will jump to $9,000.01 before it can get there.

Predicting the bot’s movement lets Hare beat it to the new price, without actually instigating front-running on its own.

Hopping forward constantly can, over time, force you to pay a higher price for your trade than you could get on another exchange.

Say you place a limit buy order with us at $9,005. Hare determines that it could get an order filled for $9,000 on Gemini or $9,005 on Bitfinex, and so Hare places the order on Gemini at $9,000.

The order ends up hopping up alongside a bot on Gemini. This brings the price to $9,001, and then $9,002, and so on. With each hop, Hare is assessing whether Gemini is still the best venue for this trade. Once Hare sees that “hopping” to a different exchange will ultimately result in a better price than continuing to hop on Gemini, it will cancel the order, hop to the other exchange, and place a new limit order there.

Hare keeps hopping until, ideally, it’s gotten you a better price than you would have got with a normal Smart Routing order alone.

Does This Even Work? Who Saves The Most Using Hare

We have been working on the Hare algorithm for the past two years, constantly using the data from millions of trades to upgrade its capabilities.

In 2017, based on data from $4 million worth of trades, use of the Hare algorithm resulted in users saving an average of 2.03% over conventional limit orders and over taker orders.

The distribution of savings among SFOX trades is heavily positively-skewed, however. Most trades actually saved far more than 1.78%, especially when looking at larger-sized orders.

When we started looking closer into how larger orders performed with Hare, we actually found that performance was high even for orders of 10 BTC or more. Here’s Hare’s savings performance across different size trades:

Our data shows that traders trading higher volumes of BTC saw significantly higher average savings:

  • With 3 BTC, 2% savings, or $560.
  • With 10 BTC, 4% savings, or $3728.
  • With 19 BTC, 3.5% savings, or $6199.

Overall, the data shows that traders who utilize Hare come out ahead on average. Average is the key word — it does not mean that every trade will get better return. To receive the best returns from Hare you need to understand when — and when not — to use it.

When You Shouldn’t Use Hare

To benefit from these savings, Hare needs to be deployed under the right circumstances. While Hare is an excellent safeguard against front-running, there are a couple situations where traders would be better served by a different algorithm.

  • Speed is of the essence. Hare hops from exchange to exchange seeking to get you the best price, which means that you may miss out on certain opportunities during the move. While our Hare algorithm is faster than Tortoise (pun intended), it is not as fast as our Smart Routing or Polar Bear algorithms.
  • The market is volatile. Hare searches for liquidity across exchanges and thus may not place your order on an exchange with low liquidity which may lead to an order remaining unfilled. If the market’s moving rapidly, we recommend using Hare with smaller orders (<5 BTC) to ensure fulfillment.
  • The order is large. The Hare algorithm can’t hide your order or split it across multiple exchanges. If you’re trying to place a large order (>20 BTC) we do not recommend Hare as you may show your hand to the market and cause it to move. Try one of our stealth algorithms instead, like Polar Bear, Sniper, or TWAP (Time Weighted Average Price).
  • You’re new to SFOX. If you’re new to the platform, we recommend trying one of our other algorithms such as Smart Routing first to get a sense for how they work.

Hare is best suited for situations where one wants to trade a significant but relatively small amount of bitcoin and the markets are at medium levels of volume.

Hop Your Way to Success

Limit orders are tempting because you can just set them and forget them. If you’re selling bitcoin and the price is going up, then odds are that your order will fill. But happens when it doesn’t?

What happens when you’re trying to get rid of 100 BTC and bots keep jumping in front of you to sell their coins, and the price keeps flirting with your limit order but just doesn’t quite get there?

Yeah, we know what you’re thinking — you can just place the limit order at a lower price. However, that means giving up on the gains you could have had if you had set a higher price.

The bottom line is that if you’re not using the tools available to you to beat the market, the market’s going to beat you. That’s especially true when you’re dealing with bots, which thrive off stealing your fills and grinding out tiny profits.

Hare is an algorithm designed to help you fight back against bots and get more out of your limit orders in two ways:

  • Hopping orders from price to price, and
  • Hopping orders from exchange to exchange

These are the features that distinguish Hare from Tortoise — our advanced limit order algorithm without hopping features.

In an upcoming post, we’ll discuss an algorithm for larger volume trades that lets us slice up an order and distribute it across multiple exchanges.

The above references an opinion and is for informational purposes only. It is not intended as and does not constitute investment advice, and is not an offer to buy or sell or a solicitation of an offer to buy or sell any cryptocurrency, security, product, service or investment. Seek a duly licensed professional for investment advice. The information provided here or in any communication containing a link to this site is not intended for distribution to, or use by, any person or entity in any jurisdiction or country where such distribution or use would be contrary to law or regulation or which would subject SFOX, Inc. or its affiliates to any registration requirement within such jurisdiction or country. Neither the information, nor any opinion contained in this site constitutes a solicitation or offer by SFOX, Inc. or its affiliates to buy or sell any cryptocurrencies, securities, futures, options or other financial instruments or provide any investment advice or service.