Quant-grade AI agents for on-chain yield optimization. Built for the adversarial DeFi environment.

Joined March 2025
Photos and videos
BotFed retweeted
When trying to fix negative markouts in your market making system, top of the list should be digging into fills that happened during inflight cancels. These are trades your system knew were going to be toxic, but you got filled anyway. This may happen because you're still too slow on the tails and quoting too tight for your latency, or it could be an inconsistency in your business logic. Tracking these events involves accepting a small amount of overhead in the hot path but is generally worth it, especially in the testing phase with smaller amounts of capital. When such events cross a certain threshold, I like to attach a cancel and fill context for detailed analysis of the system state before and after. This can include details about the BBO, alpha states, latency deltas, skew, etc. Then, once such events have been reduced to an acceptable level, compile them out to shave the extra nanos off the hot path.
8
5
89
9,086
BotFed retweeted
If you're a market maker or taker in crypto, venue selection is one of the most important decisions you'll make. You need a visceral understanding of why it matters, especially starting out, as I see too many people going straight to tier A. Venue selection can make or break your profitability as a boutique MM (and you are boutique unless you're doing a significant % of tier A volume). Here's the mental model I keep in mind. A group of people stand around a chute. Every so often a turkey drops out. Whoever catches it keeps it, so everyone muscles each other for position, hunger games style. Some turkeys have grenades strapped to them. And in the surrounding hills are snipers who are constantly picking MMs off. Some arenas have nice fat turkeys, few grenades, and unskilled snipers. Your fellow MMs are farmers with pitchforks. Other arenas, most turkeys have grenades, the snipers are Navy SEALs, and your fellow MMs are Delta Force operators, skilled at grabbing the good turkeys before you and letting you blow up on the grenades. Meanwhile, you can't remember the last time you did a pushup. So given this spread, which arena do you pick? Does it make sense to spend some time watching as a spectator before jumping in? I'll cover specific techniques for assessing venue quality and profitability in a follow-up post.
1
2
28
2,710
BotFed retweeted
If you do market making or cross-exchange arb in crypto, better vol estimates are one of the easiest ways to lower your adverse selection rate, as these feed directly into your quoting spread. (or at least they should feed into your quote spread, right Han?😅) Speaking of, there is a well documented Trump effect in vol seasonality. Trump's habit of tweeting major decisions on Sundays has created a measurable bump in background vol. The blue curve is Biden, the red curve is Trump. A solid vol estimate will take some form of seasonality into account (either directly, or indirectly via multiscale). More on models in a future post. Or you could just treat your mm operation like the Millennium Falcon (who am I to say).
3
5
74
7,220
BotFed retweeted
Quantum tunneling ✍️ It is a fascinating phenomenon. Subatomic particles, like electrons, behave more like waves than solid objects. This lets them pass through barriers that seem impossible to cross. In the classical world, if you throw a ball at a wall, it always bounces back. In the quantum world, however, a particle has a small chance of just appearing on the other side of an energy "wall." This occurs because a particle's position is described by a wave of probability. This wave doesn’t drop to zero the moment it hits an obstacle. Instead, it "leaks" through, allowing some of the particle to pass to the other side. While this may sound like science fiction, this "leaking" is what allows the Sun to shine, makes modern smartphone memory possible, and lets scientists map individual atoms. Video 📸 : umtiquinhodefisica
54
213
1,098
115,330
BotFed retweeted
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.
8
5
114
9,858