An Introduction to Order Routing
TL;DR
Trading is complicated. With crypto prices fluctuating across numerous venues, one of the critical questions traders face is: ‘Where is the best place to trade right now?’ and answering this manually is nearly impossible. Enter the Smart Order Router (SOR) and the Smart Account Router (SAR) — tools designed to help reduce slippage and risk while keeping trading strategies compliant. In this series, we’ll explore these essential tools, starting with the SOR.
Wait — A Smart Account Router??
The Smart Account Router (SAR) is not just a catchy name (thanks to EK for coining that one!). In the fragmented world of crypto trading, keeping track of your assets and understanding what you’re allowed to do with them is a significant challenge, especially when you’re trading for other people. It’s also important to be as efficient as possible with your capital — spreading it thinly across multiple venues is costly, especially when using it as margin.
A Smart Account Router addresses this by providing real-time insights into asset locations and trade capabilities, ensuring compliance and operational efficiency. Before diving into what a Smart Account Router has to do, I wanted to use this first blog post to lay down a bit of a foundation and talk about order routing in general, why it’s important and why you might have your assets at a bunch of different venues in the first place.
An Intro to Smart Order Routing
Most people in trading are familiar with the idea of the Smart Order Router — a pricing engine that knows where the best prices are at any one time and can help add to the performance of your trading strategies. For those who aren’t — consider this exmple:
You’re keen to buy a Bitcoin with your hard-earned USDT. You hold accounts on two major exchanges — Binance and OKX. With both trading apps open on your (presumably large) monitor, you watch the prices fluctuate — sometimes cheaper on Binance, sometimes on OKX. Spotting what appears to be a better deal on Binance, you hit the buy button. Your Bitcoin balance goes up by one and your USDT balance drops by [some number between 1 and 1 million, depending on when you’re reading this…].
You log off, happy you’ve done a good job creating generational wealth for your future Grandchildren. Down the pub, a few thoughts hit you:
- Was that really the best price at the time you pressed the button?
- How would you know, even if it wasn’t?
- If it wasn’t, does it matter?
- I bet those High Frequency Trading guys just robbed me blind**
The good news is that the difference between the best offer on Binance and the best offer on OKX for BCT/USDT spot is often a bit of a coin flip. If you closed your eyes and chose a venue randomly, you might well have gotten the better price. If you got it wrong, you might be $20 worse off — not the end of the world. Here’s an extract of the best offer on both exchanges over a few minutes while I was writing this blog:
Things Get Complicated
So far, so good. Now consider performing that same trade a hundred times. Over-paying $20 on a single trade might seem negligible, but cumulatively, it becomes significant, especially if you’re trading for a fund measured against its peers, or on behalf of clients who have a choice of trading partners.
Let’s make the scenario more complex and introduce a few more exchanges. The difference between the best and worst is going to be far larger than a few basis points. It’s also extremely difficult to watch multiple venues at the same time using just your eyes. What if the best price is actually a combination of several of those venues? Try doing that manually…
Now add in fees. The slippage between two of the most popular and liquid venues might be small, but the fee differences across multiple venues can be huge (and quite hard to track). When trading, you need to make sure you’re considering the implicit costs (prices, spreads, etc) as well as the explicit ones (fees, rebates, etc). If you save yourself a basis point (1/100th of a percent) by getting a better price, but you did it by trading on an exchange that charges you 10bps more in fees, you’re actually worse off.
What about latency? This gets tricky, but let’s say you can see a price on your screen of $55,000. The exchange is in Tokyo and you’re in London, so that means you’re seeing data from a few hundred milliseconds ago, rather than live — lag that is bad enough when you’re playing Fortnite, but can lead to real problems with financial transactions. Even the time it takes for your computer to process the information and display it on the screen is enough time for a price to move. Your eyes are pretty slow and so is your brain. Your fingers are even worse, and the mouse click takes longer to process than some trading firms take to react. Once that signal is processed and sent all the way back to Tokyo to trade, that price you saw is likely long gone. Which direction did the market move? Who knows.
Technology to the Rescue
So, how can we manage these complexities and create tools to mitigate or exploit them? As with many things in crypto, the traditional finance (TradFi) industry has faced a similar challenge. In 2005, the introduction of RegNMS fragmented the US equities markets, introducing multiple venues where you could buy and sell the same thing**, similar to today’s crypto markets. The solution? The Smart Order Router, a tool that revolutionised real-time price discovery.
Get Ben Radclyffe’s stories in your inbox
Join Medium for free to get updates from this writer.
A Smart Order Router (an SOR) is a piece of kit that watches price feeds from all the venues it’s connected to and uses that information to constantly calculate where the best price for a particular asset is at any one time. The benefit of building a distinct module is that any systems making trading decisions upstream of the SOR can delegate the decision of where to trade and concentrate on the when, how much and why parts. Adding in new venues or rules is transparent to everything else in the system.
Sounds Simple!
Sure does! While the concepts are pretty simple, as with many things, it’s more complicated than that**. For example, one of the bigger technical challenges in crypto is the sheer number of tokens and venues you could decide to track. A quick Google search shows that there are about 8,000 US Equities and 13 exchanges**. There are at least 23,000 tradeable crypto tokens across a staggering 1,500 venues. Unlike our US Equities example where everything trades vs USD, each of our crypto tokens trades vs multiple other tokens (USD, USDT, USDC, BTC, etc) — that’s a whole lot of trading pairs to keep an eye on.
Even across the 70 or so venues we track at Virtex today, there’s over 20,000 trading pairs. You likely don’t want or need to connect to even a small percentage of those, but that’s a decision for another post.
Liquidity
We touched on it briefly above, but a lot of the time, the best available price at any one time is actually a combination of multiple venues. Imagine a scenario where 2 venues have the same price, but each of them only have 0.5 BTC available at that price. The way to achieve the ‘best’ price for our hypothetical “Buy 1 BTC” trade is actually to buy 0.5 from each venue at the same time and a sophisticated SOR should be able to do that for you**. I’ll do a future blog post on Market Makers and Fading Liquidity, but for now, it’s suffice to say that just because it looks like there’s 10 BTC available across 10 exchanges, it’s pretty hard to grab it all in one go…
Here’s a quick visualisation of the liquidity on the venue with the best current ask price vs what’s available across multiple venues within a few basis points.
Composable Instruments
One final cool feature of a really smart SOR is that you can chain trades together to get your desired result. Going back to our example of buying a Bitcoin by using USDT — suppose the best current BTC price is actually on a venue that doesn’t support USDT, but uses USDC instead. If we’re feeling adventurous, we could buy some USDC using USDT, then use that USDC to buy our BTC. As long as our SOR takes into account the different prices and all the fees, it can give us access to that better price and additional liquidity.
Post Trade Analysis
As with anything, it’s important to measure what matters. Did your SOR make the right decisions? If so, how much is it actually helping? Why did it choose the venues it chose? How can we use the data to show our clients and investors we’re doing a good job? How can we use the data to improve our future trading decisions? What information could we pass back on our fills to help others run their own analysis (spoiler alert — FIX tags help here). Post Trade analysis is an industry unto itself, but we’ll do a post covering the basics as part of this series.
Smart Account Router
By now, you should be an expert in what a Smart Order Router does in relation to pricing and why we might want to spread a trade across multiple venues in the first place. However, we’ve skipped over a fairly important detail. Because most of the crypto industry still operates on pre-trade funding, we need to keep a close track of which assets we have and where they are. If the best price for something is currently at a venue we’re not connected to, or where we have no available funds, we need to take that into account.
When trading for clients, we also need to know about their preferences (having a preferred exchange or blacklist for example) and we need to know whether we should be using client funds or our own.
When we start looking at derivatives rather than spot trades, we also need to take into account any margin we might need and how a specific exchange calculates various requirements and try to keep those as low as possible.
Choosing which account to trade in can get just as complicated as deciding how to get the right prices, so we’ve separated out that logic into a Smart Account Router, which we’ll go over in the next post.
Conclusion
As you navigate the complexities of crypto trading, remember that choosing the right trading venue is crucial. Leveraging tools like the Smart Order Router and Smart Account Router can significantly enhance your trading strategies.
Stay tuned for our next post, where we delve deeper into the Smart Account Router and explore its advanced features that complement the SOR, helping you achieve optimal trading efficiency.
As always — If you’re interested in getting involved — whether by simply giving feedback, helping design, build or test our SOR or integrating your own with the Virtex platform — please get in touch.
** It’s more complicated than that








