While market making you may periodically get "quotes from the future" from any one of your N geo-distributed exchange feeds, meaning the exchange's self reported timestamp exceeds your own. This can lead to noise in your fair price estimates.
What do you do in this case, and what is the likely cause?
Well, if you are consistently getting quotes from the future then the first place to look is at your own system time service.
As a first step you'd want to have something like chrony setup, and if your trading engine is in Tokyo, for example, you want it setup with a config optimized for Tokyo (ie: you'd want your NTP service pointed at Japan based sources and not random US based ones).
Say you've done that, and the quotes from the future seem to go away.
Great, but there is still some doubt that there may be some time offset between the different self reported timestamps from each exchange, relative to your own time, and if some of the feeds you are listening to are geographically far away this offset could still be large.
For example, if you are located in Tokyo but that Coinbase quote comes in with a timestamp 10ms ago, either the speed of light has been violated by about 60ms or there is still some relative drift in the clocks.
How do you detect this?
A simple approach is to setup a minimum latency floor for each exchange. You can compute this floor by running a ping process to each exchange and tracking the fastest round trip. Half of that is your latency floor, and any quote that claims to have arrived faster than that has effectively come from the future telling your system it needs to adjust the relative clock.
(See the ping example below from a Tokyo AWS box.)
This approach is superior to a theoretical speed of light calculation approach because it takes into account real world realities of fiber optics layouts, etc.
Detailed clock drift correction isn't the first optimization to do beyond just setting up something like chrony. But it is something that can give you an edge (or save you from losing) especially during market calamity when misordered quotes are most costly.
More on this in a follow-up post.