Go back

Jeff Yan - High Frequency Crypto Market Making & the Hyperliquid Exchange (S6E2)

72m 48s

Jeff Yan - High Frequency Crypto Market Making & the Hyperliquid Exchange (S6E2)

In the podcast episode of "Flirting with Models," Corey Hofstein interviews Jeff Yan, the founder of Chameleon Trading, discussing topics like high-frequency market-making, decentralized exchanges, and the challenges faced in the trading industry. Jeff Yan shares his journey from traditional trading to the crypto world, highlighting the importance of infrastructure and data analysis in high-frequency trading. He stresses the significance of understanding APIs, measuring latencies, and ensuring data accuracy for successful trading strategies. The conversation delves into the concept of determining fair prices for trading, the differences between making and taking strategies, and the complexities of crypto exchanges. Jeff Yan's experience provides valuable insights into the world of high-frequency trading and the evolving landscape of decentralized finance.

Transcription

13498 Words, 76201 Characters

Hey everyone, Corey here. Thanks for tuning into another episode of Flirting with Models. If you're enjoying the show, I'd greatly appreciate it if you'd take a moment to rate, review, and most importantly, share with a friend. A word of mouth is how this podcast grows. And if you'd like to learn more about Newfound's platform of return-stacked mutual funds, ETFs, and model portfolios, head over to returnstacks.com. Now on with the show. Alright, three, two, one, let's jam. Hello and welcome everyone. I'm Corey Hofstein and this is Flirting with Models, the podcast that pulls back the curtain to discover the human factor behind the quantitative strategy. Corey Hofstein is the co-founder and chief investment officer of Newfound Research. Due to industry regulations, he will not discuss any of Newfound Research's funds on this podcast. All opinions expressed by podcast participants are solely their own opinion and do not reflect the opinion of Newfound Research. This podcast is for informational purposes only and should not be relied upon as a basis for investment decisions. Clients of Newfound Research may maintain positions and securities discussed in this podcast. For more information, visit thinknewfound.com. My guest this episode is Jeff Yan, founder of Chameleon Trading. Jeff began his career in high-frequency trading at Hudson River, but soon moved over to the world of crypto where he built one of the largest market-making firms in the space. After Jeff gets me up to speed with the basics of high-frequency market-making, we dive into some of the more esoteric components, particularly with respect to centralized crypto exchanges. These include infrastructure quarks, adversarial algorithms, and why HFT P&L might actually be predictive of medium-term price movements. In the back half of the conversation, Jeff explains the problems he sees with current decentralized exchanges and introduces Hyperliquid, a new decentralized trading platform built on its own blockchain to provide performant order book execution for perpetual futures. Please enjoy my conversation with Jeff Yan. Jeff, welcome to the show. Hitting it off early in the season with some crypto here. We're going to see how the audience responds, but I think this is going to be a fun one because we're talking high-frequency trading. Maybe even digging a little into the secrets of high-frequency trading, and then in the back half of the conversation, going to be talking about protocol design, which is a whole different new area of quant thinking. Really excited to have you on. Thank you for joining me. Great to be on, Corey. Thanks for having me. Let's start with the typical stuff for guests who maybe don't know who you are or haven't caught on to your quickly growing Twitter stream. Let's get into your background a bit. My story probably sounds pretty similar for a lot of HFT folks out there. I graduated from Harvard in computer science and math. Went straight to Hudson River Trading, which is one of the bigger market makers in TradFi. I worked on US equities. We had a great time there. It was the perfect environment. When I joined, it was about 150 people. I know now it's a lot bigger. Can't say enough positive things. Learned so much. Got to work on the most interesting problems. Perfect mix of engineering and math. This is like paradise for a quant, but 2018 came along and with it, the crypto mania of building smart contracts on Ethereum. I read the yellow paper and it just clicked. I knew that this was going to be the future. I left to build an L2 exchange protocol. It was in the format of a prediction market because back then, Auger had found a good market fit, but we were interested in the exchange technology. Raised money, moved out to San Francisco to build this thing. Built a team, but kind of shut it down after a few months because we realized it was not the right time. A lot of regulatory uncertainty and really couldn't find users who barely knew how smart contracts worked. Really were interested in speculating on tokens and not really DeFi at the time. Shut that down. Did a little soul searching, traveled, and ultimately decided I want to go back into trading because the day-to-day was a lot more interesting than struggling to find product market fit. Contemplating going back into the industry, joining some company, but thought maybe I would, since I knew all this about crypto from building, I would try to trade crypto first. Started as a bit of a side project, but quickly saw the opportunity there and scaled it up really way faster than I thought was possible. I was surprised by how inefficient the markets were. Been heads down building that for maybe at this point, almost three years. Really seriously started early 2020, which was great timing. Kind of got to grow with the market. As the market index even like 100x in volume, we kind of grew with it. Ultimately, our market share ended up being one of the biggest centralized exchange market makers. About a year ago, we started looking at DeFi trading and really reminiscent of when we started centralized exchange trading and that there were a ton of inefficiencies. But in this case, the protocols themselves were quite poorly designed. We also saw this demand for a truly decentralized product after the whole FTX thing. People were finally catching on to the not your keys, not your coins, counterparty risk, that kind of stuff. Basically, it clicked for us that this was now the right time to build the decentralized exchange. So we've been at that for maybe a quarter, a little more than that now. The HFT stuff is still running in the back autopilot maintenance mode, but we're really focused and excited about building the stacks at this point. A lot to unpack there and stuff. We'll get into the conversation. I'm excited to talk about learnings you had in the high-frequency space and how that ultimately has influenced your design of this DEX. But I want to start with the basics of high-frequency. When I talk to people who are in high-frequency trading, it seems like one of the biggest decisions you have to make is this concept of making versus taking. It seems to be a very clear line in the sand of very differentiated strategies and what it takes to succeed with each of those types of strategies. I was hoping maybe you could explain the differences and how those differences have implications on the choice of strategy design, infrastructure and need, and even the research process. I think this is the first big decision that you need to make when you're starting HFT. And I think high-level, I will say there are more similarities than there are differences. At the end of the day, you are doing this very infrastructure-intensive, latency-sensitive trading. But in many regards, they are opposites as well. So the first big difference is that I would say making is more infrastructure heavy and taking is more stats, math, model heavy. I think the best way to decide between the two is just what sort of work, what sort of research are you inclined towards. Maybe as a concrete example, when you're market-making, you're kind of at the whim of people coming in and picking you off. You can't really afford to slip up. You often have large implicit exposure by being levered up and having open orders over many instruments, many price levels. And if you screw up really, that heavy tail is really going to be painful. Whereas you can have a strategy that takes once a day, and it can be a really good strategy, and it can be high-frequency. It could be news-based, it could be some sort of niche signal, but you have the luxury. And because of that, you have the luxury to be much smarter. If your thing is slow most of the time, doesn't trigger most of the time, that's okay. As long as when you do trade, it's good. But with making, if you're doing well 99% of the time, 1% of the time, you're a little slow and can't keep up with the data, or you're going to lose enough money during that 1% of the time to negate your P&L from the other 99%. That's the fundamental infrastructure versus model difference between the two. Is it too simplistic to say, with taking, you expect the market to move in the direction in which you're trading, because you're willing to cross the bid-ask spread, and so you expect the market to keep moving versus making, you're hoping the market doesn't move, someone's crossing the spread to meet you, and then you're hoping the market doesn't move so that you can then sell across the spread again? Is that a fair difference? Like one is hoping the market almost stays flat in the time frame of the trade, and one is hoping there's a directional move? Yes, exactly. So with HFT, we like to mark out to pretty short time horizons, but this is kind of true in general, no matter what frequency you're trading at. The instant you take, you're actually suffering a loss. So you're marking to mid, you're instantly suffering a loss, and you're only going to be profitable on average if, like you said, over whatever her predictive horizon you have, the price on average compensates for that immediate loss, plus fees. What's making the initial P&L is the highest it will ever be. You just made the spread, but you're banking on that not being on average average selection, and so necessarily when you make, if you sort of average out markouts of your trades, that P&L will decay over time, but your hope is that it doesn't decay past zero. In our pre-call, you mentioned that one of the most difficult aspects of scaling up your business was actually not on the research side, but on the infrastructure side. I saw on Twitter, you said something to the effect of knowing how to normalize data isn't going to print you money, but without it, you definitely won't. So hoping you could talk about maybe some of the biggest lessons you learned in the infrastructure side of the equation and why you think it's so important. Your question sort of has two parts, and they're pretty tied. There's the trading infrastructure, and then there's the research infrastructure, and so data cleaning is also in the research. It's more like statistical practices, whereas trading infrastructure is pretty unique to high-frequency trading, and so both are super important. That stuff is, I guess, more well-known, but probably worth emphasizing that it's the regime of noise sort of signal to noise in high-frequency trading is orders of magnitude higher than most things people study in academia. And so filtering outliers is exponentially more important. If you don't think about this stuff correctly, if you really just ignore all the outliers, then your model is going to be screwed over when the sort of black swan tail events do happen. But if you don't filter them and normalize them correctly, then the outliers are going to basically determine your entire model. Concretely, I think, depending on what you're doing, using things like percentiles can be a lot more robust than using the actual values. If you are using actual values, then are you throwing out the outliers? Are you clipping the outliers? These kinds of things have very big effects. On the infrastructure side, I think the biggest lesson we learned sounds kind of silly, but you really need to learn this firsthand. You need to look at the data. You might think you're super smart. You have this great pipeline that will clean the data and give you the inputs you want to your models. But I'd say it's impossible to spend too much time looking at data. You're always going to learn something new. And so when starting out, it's just like write down all the raw stuff you're getting from the exchanges and just comb through it, look for outliers, sanity check things. I think a pretty crazy example of this is at some point, some exchange had some bug on their feed machines and flipped the price and size fields on, I forget if it was the bookstream or the trade stream. But regardless, it completely messed up our internal counting code. Imagine like Bitcoin's price and size being flipped. So 20K, 0.1 being recorded as 0.1, 20K. And I threw a mention to everything. And I think a lot of firms probably shut down immediately or quickly recover and like stretch an alternative data source. But things like that, you really want to be close to the raw data because no matter what logic you write, it's not going to be perfectly robust. I guess another tip is really focus on timestamps. So exchanges will often give you a bunch of timestamps with their data. And it's kind of up to you to figure out exactly what they mean with each timestamp. And this is important in terms of understanding the black box in terms of your latency, like what are you measuring exactly? And seeing if you're keeping up, for example, or if they're sending you garbage, timestamps are a great way to distinguish between these different cases. One of the things that I see discussed a lot among high-frequency traders is this concept of fair. I know it's something you've written about a few times talking about making sure someone's trading around fair. What is fair? How do you measure it? Why is it an important concept? I think fair means something slightly different for every trading firm. It kind of speaks to the style of trading they're doing. But at a high level, what's in common is that fair sort of incorporates your modeling into a predicted price. It's a really useful abstraction because it splits this problem of writing a profitable strategy into two, I would say comparably difficult pieces, depending on your strategy. And that is the predicting the price piece and the executing your orders piece. I guess this kind of goes back to the making versus taking question you asked earlier. But making is heavier on the execution side, whereas taking is heavier on the modeling side. And so, basically, taking or spending almost all your time thinking about this fair price. And I think what goes into it is really up to you as a trader. What kinds of data do you think you have an edge processing over the market? Where are the markets inefficient? I guess another thing is, this doesn't have to be one fair price. You might have multiple fairs as inputs to this more machine learning style of trading. You might have a one second prediction and one day prediction. And your execution strategy may use these in different ways. The optimization problem can be different in P&L space. But I think when it's starting out, you can get very far by just doing a clean cut and saying, all right, I'm going to put my work into first just coming up with a number, which is what I think I will trade around. I'll quote around this. I'll use this number to cross the spread. This will just be my oracle. And then working around, okay, I have this oracle price. It's a given to me. What's the best way I can execute around it? And so, could that be something as simple as looking at one exchange? And you might say, just throwing this example out there, almost all the liquidities at Binance, I'm just going to assume the price at Binance is fair. And then if other exchanges are lagging that by milliseconds or seconds, you might be using Binance as fair. And okay, I can cross the spread at OKX or something like that, because you're expecting this catch up across a different exchange. And then there's other maybe statistical ways of estimating fair where you're not taking truth from one exchange, but you're trying to use other market book related signals to come up with a fair. Is that a fair explanation or idea? Yeah, that's the right idea. So I think using the most liquid venue as the fair is a really good first approximation. And I think before I started crypto, I think way back in the day, this was probably the best way to go about it, because there were 10% arbitrages between the exchanges. The problem was like, how do you move money between them? Not like, how do you predict the price? And so, this will work super well. These days, there's, it's been an interesting trajectory where there's been splitting, splintering of liquidity, and then some sort of consolidation towards Binance, especially recently. And so the thing you mentioned is probably a very good place to start is just use Binance as a fair. That being said, I think you need to be careful when just using an external source as a fair. Yeah, maybe OKX is lagging a couple milliseconds behind. And maybe it's not gonna be the simple these days, but let's say there was just an opportunity to close the ARP each time Binance moved because nobody was lifting orders on OKX. So you do that and it'll work most of the time, but then it's crypto. So OKX maybe, OK, they go into wallet maintenance, and it's no longer possible to withdraw or deposit this coin, at least between Binance and OKX. And now suddenly you'll see the ARP can't be closed in the market's leverage. And if your fair is just Binance price, then you might get screwed. So there's always subtlety, even in this super simple example, it's never gonna be as simple as, OK, here's a number that I pull from some feed, and that's my fair. But it's certainly a good first approximation. Well, it leads nicely into where I wanted to go next, which was around the idiosyncrasies of crypto exchanges. And just that historically, reputationally, they are notoriously unreliable from a technology standpoint. You gave the example earlier of the dirty data where price and volume got swapped, broken APIs, poor documentation, not all the API endpoints are always documented, some of them are hidden. Sometimes you can have different parameters that no one actually knows about. I think you had a great Twitter example about that recently, about being able to skip the risk engine or have a risk engine run in parallel. Stuff that is completely undocumented, that is interesting examples of orthogonal alpha that doesn't necessarily have to do with price prediction around fair. How much alpha is there in things like simply understanding the API better than your competitors or measuring the latency of endpoints correctly versus, say, more traditional statistical alphas where you're trying to use the order book to guess pressure and direction. The tweet you're referring to, I think, was one of my more popular ones. Which I still don't know whether it was an April Fool's joke, by the way. I guess April Fool's is past, so I'm allowed to say it was a joke, but it's closer to reality than people think. I think the real joke is that it's actually kind of true. I've been meaning to do a follow up on that. That's a good reminder. I should go and tweet that after this podcast. I think your intuition is good. I think when you work at a company, you start to develop preferences or maybe you come in with some of what you want to work on. Like, oh, yeah, I studied math, so I'm just going to make cool machine learning models and find signals and generate alpha. That's what matters because that's the hardest thing to do. And I think that kind of attitude maybe works at a big company because people are so specialized, but if you're trying to run a shift here on your own, then you're not going to get anywhere that attitude. So the sort of dirty work that you're mentioning, understanding the API as well, seeing what's missing in the documentation, measuring latencies, this kind of stuff is super important. My mental model for high-frequency trading is really just like things in life is that it's like a product of many numbers. So as a quant, you know, I still want to be quantitative about it. It's not additive. Your efforts into different bins are additive in those bins. You might make your model a little bit better. Maybe you like spent 10x of time and like make 10x the delta there. But at the end of the day, it's the product. So it's like infrastructure times model, for example. As a concrete example, if your infrastructure is at one and your modeling is at 10, then where are you going to spend your unit of work? Like obviously, your mathematics, you should always work on the thing that is smallest. And the tough thing about HFT is like, it's kind of hard to know what these things are in the formula for like multiplying together. When we started, we thought it would be modeling work, but it's important to sort of have this meta analysis of like, wait, am I actually doing the most important things? And you quickly realize that it's not obvious. And there's a lot of edge and just like knowing what to work on. Third to work is super important. It's always about getting the lowest hanging fruit, the 80/20 principle. I think especially during when things are going well, it's easy to fall into the trap of like, all right, I got the basics down. Like let me go. Let me go do some like cool machine learning research and do the innovative stuff. And we fell into this trap as well. Not that there isn't any offer there, but it's a lot of work for like diminishing returns. And so when you're on a small team and there are still a lot of opportunities and your strategy is doing well, it's always good to like actually ask yourself and be honest. Don't be convinced by what the data tells you, you need to work. For those who are keen on starting out in high-frequency trading and crypto, you've recommended that they either just go make markets on Binance and focus on Alpha generation, which I sort of interpreted as taking, not making, or picking some long tail exchange and trying to figure out the infrastructure quirks around that long tail exchange. And that's a good source of edge. Can you elaborate on why you think these are the two best avenues and how the approaches differ? It's a bit like the bell curve meme. And you just don't want to be that guy in the middle. In this case, if you view the bell curve as like the exchanges, then the big problem is the middle exchanges, maybe say like rank two through seven or something, you have a lot less volume in Binance, but about the same level of competitiveness and toxic flow. And the flow can be worse than Binance because at least Binance, as we know, the reason their volume is so high is that they have complete stranglehold over retail volume. I don't know how they do it, but they do. That's just the numbers speak for themselves. And so you don't get that padding, that like nice mix of toxic and retail flow. The big HFT firms have all onboarded the top, I don't know how many, like let's say top 15, they've definitely onboarded. And so they're going to be trading full capacity figure strategies and you're not going to get much juice there. So if you're willing to like challenge yourself to do that super scalable, large centralized exchange trading strategies, then just start with Binance. And it will generalize as well as it does. And there's no point in starting in the middle. But the other thing you mentioned is like, yeah, you can also be like super left for the bell curve. There's no shame in just like finding a super small opportunity, something that is overlooked by the big players or just doesn't have enough capacity for it to be worth their time. And I think niche infrastructure is a super good example of this. Exchanges are written by people. So just like with DEXes, the protocol designs can be just outright dumb. You can see this to a lesser extent on a lot of how smaller centralized exchanges goes to write their tech. And if you're the only one who has this insight into how that works, then that can be a strategy. Infrastructure is actually like often big source for alpha. And there's not such a clean line between the two. And in this case, you have a problem. It's not really a problem, but like you might be concerned, oh, this doesn't generalize. Like, okay, I understand how the tech on this random small exchange works. That's not going to help me on finance. And yes, that's true. But I think people undervalue just having something that works live. That should just be everyone's number one priority. And it really shouldn't matter how small. I guess there's sort of a flaw on like how small it can be. Unless you're looking at like super weird things. If you're trading something on a volume, like you're going to make some money. And if that is high sharp, distant and robust to tail events, then you've got something that 99% people don't. And yeah, maybe the exact strategy doesn't generalize. But in my experience, you get the reps in for the full research loop, like putting things into production, you learn so much during that, that then even just scrapping it and going for finance at that point will be just orders of magnitude easier. And also like often little things like, yeah, maybe the tech isn't like exactly the same on other exchanges, but you start to notice these principles and you start to get this fountain of orders, like end the stream of ideas from other things that already work. And those types of ideas tend to be way better than things you just look out of there. I think there's a lot of value to both approaches. I'd say if you're not sure, then start with the small stuff, often then start with the big stuff. Honestly, just try both. You use this phrase toxic flow. Can you define what toxic flow is for people who've never heard that phrase before? It's basically informed flow. So a mental model for how I saw crypto grow up was when I came in, it was already a little bit late. So I can only imagine projecting back in time what it looked like. But even when I came in, it was quite a lot of retail and there were big players playing, but the balance was still that there was not enough liquidity for what retail is demanding. And so retail flow is like what you want to target. The super obvious things are like you just write generic makers strategies that post liquidity. Like we talked about earlier with making versus taking. If retail comes in and trades against your making orders, you're going to keep most of that spread that they crossed. You just do that and it makes money. And so that's a strong sign that the flow is by and large retail. But over time, you see like people notice this, they put up the maker strategies. And then when there's more liquidity from the makers, it suddenly makes sense for people to run taker strategies. And the spreads get smaller, people compete to capture this really good retail flow. And then the takers suddenly come in and start picking off bad maker orders. This is just how markets evolve. There's a lot of value that the takers provide as well. It's not clear that the maker orders are all market makers and the taker orders are retail. It's a bit of a mix. And so the best market is just, in my opinion, is just one where people are free to trade. But from the makers perspective, these takers are super annoying. Like they used to have this super easy strategy where you just like put orders out and like every time you got hit, you made a little bit of money. But all of a sudden, this like 1% tail of trades are getting, you're losing 10 basis points on. And that always one basis point you're collecting from all the retail flow, something like that, a bit of a mental model. So yeah, the toxic flow is basically these takers. And it kind of depends on who you're asking, whether the flow is toxic, depends on strategy you're running. But there's this general split between retail and sophisticated flow. Well, talking about sophisticated flow that I'm sure any high frequency trader would consider toxic is the idea of an adverse algorithm that tricks your algorithm. So crypto is, was, is in many ways still just the wild west. And there is a degree of explicit market manipulation that would likely be considered illegal in most traditional markets. And it will be used against you to trick and exploit any of your automated high frequency trading strategies. I would love to know how much you ran across this kind of adversarial behavior. Maybe you can share an example of an experience you had in the wild. And having run high frequency trading strategies, how do you think about protecting yourself from it? It is indeed the wild west. I think the positive way to look at crypto is it's also an experiment. Your perspective matters a lot. So regulators will obviously latch on to this. Oh, they don't follow our carefully researched securities laws. But if I proponents will say these securities laws really are probably the result of a lot of lobbying and human judgment and maybe crypto is an opportunity to look at a more libertarian experiment. What do we actually need to regulate? And I don't know, the truth is somewhere in between those two, I think I'm not a regulator or a policy maker, but that's my philosophical thoughts on that. But yeah, certainly like from a practical perspective, if you don't pay attention to these manipulative extractive strategies, then you're going to have a hard time doing crypto. It's also not that the exchanges don't want to regulate it, but it's not clear which bodies regulate which exchanges. Certainly it's not clear to me. And I think a lot of these laws are angry. Maybe that's a bit of why this happened. And it's just hard to run exchange. So they've got other things to worry about. For concrete examples, I think spoofing is a really big one. And by spoofing, I don't really know the technical definition. I think there are many terms in US securities and futures laws. But I just mean broadly, when I say spoofing is just, you see it very clearly on the order books and the resulting price graphs. It's like people place these massive orders that they clearly don't want to get executed in some sense. Like if they were executed, they would be unhappy. Hard to prove intent, but it's very clear. These orders are not to get filled. They're to give the impression that there is demand on that side of the book. And as a result, if there's some algo that is looking at the liquidity on the order book as a signal for where the price will go, then hopefully tricking these maybe to place orders on the side that they want. And then depending on what trickery is accomplished, then the spoofing algorithm can then either place making orders that get aggressed into or even aggress against passive orders that are placed mistakenly, I guess. I mean, that's a super common example. Another one is like, I don't know if this is like really market manipulation, but there are certainly these pump and dump circles. For fun, I sort of like joined a few never for to save just what was a lurker. And man, these things are quite something. And I think they've been cleaned up a lot recently, which is cool. But back in the day, they would generate crazy volume. You just basically be like some insider announcing some coin, and then all this is done retail. I have no idea where they find these people, but they managed to convince a lot of people just like buy at once. And then the insider is like selling to that. And as an HFT, like you might think that's okay, but it's actually surprisingly tricky to navigate because there's such a strong version effect that you can kind of be tricked. Those are two concrete examples. I guess in terms of like dealing with them, then it goes back to the earlier question you had about infrastructure versus model versus strategy, like what do you work on? And I view this as another category, miscellaneous, random stuff that comes up that you just need to do risk management, perhaps risk management. Yeah, special scenarios. I don't know. It's really like if you don't do this, and you do everything else perfectly, depending on the regime we're in, and what you're trading, this could make or break your average piano. I think when we first saw this, it was pretty scary because I guess we were lucky when we first started. Maybe the symbols we were trading on initially just were pretty hard to manipulate or people hadn't gotten around to it yet. Anyway, like we just completely did not foresee this problem and naively built in ignorance of it and got to a point where things were going well at this P&L. And then once we fell for these tricks, it was very dramatic. You could lose a day's worth of P&L in a minute. If you don't tune your strategies, they will do dumb things. And sometimes automated trading is the dumbest trading because it's some simple state machine that has no human discretion. It will just do what it's programmed to do. Our approach was just to be pretty practical about it. You could sit back and analyze it. You got to come up with oddles to predict whether there's manipulation going on. But one of our big edges, at least turning out, was that we just moved super fast and didn't really care for the proper way to do things. It was very much grounded in the data. So for us, it was like, okay, this is happening. It's not happening that much. Let's just shut it off when we lose money in a specific pattern. And this is something you can code up in an hour without in production. And I was like the 80/20 back then. And yeah, you're missing out on some opportunities. But it frees up your time to start scaling out and working on the things that actually are 10x multipliers in P&L and not really worry about this. Maybe this 5% and have you shut off. You're losing something. And you could have been making or something. So there's a bit of a judgment called there. Let's concentrate off of what's the best thing to be working on. Since then, we've had a lot more time to work on things. And so we do have more complicated models now of predicting these regimes and figuring out what's going on. And instead of doing these very discreet actions, rather like having a continuous adjustment to the strategies. And so at this point, we have a pretty good understanding of how these manipulators operate and detecting them. But again, I think for people starting out, the 80/20 principle is super important. Do you find that that sort of market manipulation spoofing is more prevalent in the fatter tail of exchanges with the fatter tail of coins? Or is that something that you will still see even on finance with Bitcoin and Ethereum? It's pretty rare for Bitcoin and Ethereum on any exchange because there's just a lot more liquidity. And I would say it's more about the asset and less about the exchange. So I've seen it on almost all exchanges. People do different things on different exchanges. You can kind of tell they're like different people, but they all have all the same patterns. There's some sweet spot of liquidity. I guess if there's like really no flow on the token, then maybe not worth doing. But some sort of ale asset that has some volume going on. So you can kind of trick the algos. The algos sort of expect some amount of volume and some amount of trading, but you can kind of trick them to make some bad trade. I'm a believer that the way we see the market is often influenced by the horizon over which we trade it. You as a high-frequency trader, I think probably have a different perspective of the way markets work given your intuition around microstructure versus say someone like me who operates at a longer tail. I'm horizon that might focus on more fundamental drivers of returns over the long run. You had a tweet where you said one mental model for markets is a viscous fluid. Docs to the system play out as damped oscillations in the price discovery process. I thought that was a really interesting idea. I was hoping you could talk about that a little bit, expand upon what you meant with that quote. I'm a big believer as well in the fundamental understanding of things. It was kind of like the math and physics upbringing I had. It's like if I don't understand it, then I find it hard to innovate on this sort of black box. And so I like to just come up with these mental analogies, sort of metaphors for how things work. If it is a viscous fluid model, maybe the right question is like, why does HFT even make money? And we ask retail often, they view it as this predatory thing. They're front-running us or hunting our stops or whatever. But I'm not saying that HFT is doing God's work or anything, but I think that it's providing a needed service to these markets. So in terms of these shocks to the system, my model is like outside of market structure and abstract price moves as these external factors that are essentially random for our purposes, maybe somebody just needs to buy a lot and demands liquidity now. Maybe there's a news event moving the actual fair value of this token. And so some people are going to trade that. But this demand just comes out of nowhere and often violently hits the book. It's a pretty PVP scenario. So there's a lot of urgency for people to execute. And it can be a cycle. Some people might be trading off of a momentum or trades can trigger other trades. And there's a lot of unstable equilibria. There'll be a big shock. And then people come in and almost have this discussion about what the actual fair is. And so the first move will be the biggest. And then often maybe it'll say, "Oh, we overshot." Someone will come in and trade that mean reversion. Maybe it's a medium frequency trader. Or maybe it's a high frequency trader who just knows five seconds from now that the fair price is not average in the river. And then someone else will say, "Oh, no, no, no. This is a much bigger deal than we're going to start teawapping until the price hits a 20% increase." Elon adding doge to Twitter is a real thing. And you guys are wrong. And so they'll pick off the mean reversion traders. And so there's almost like this big discussion/battle going on between the different actors. But the key character stick is like the moves get smaller and smaller. People are kind of like voting with their money. And more or less people get into the positions that they want to get into. And then there's sort of this dollar weighted averaging going on and the price settles at the fair. And that's kind of how markets work. Within all this chaos, HFT is like the mandate is to buy a low and sell high. If you think about that, just like the squiggly line that's moving up and down all over the place, if HFT on average buys when the squiggly line is low and sells when the line is high, then the market impact of HFT averages to smooth out this squiggly line. And that is good for everyone. It makes the price snap to the fair price much faster. And it sort of ensures that it's as close to fair as possible along its trajectory. And so it's sort of like the better the HFT is, the more liquidity there is on your market, the more viscous this fluid is. I don't know how full this mental model is, but that was what the tweet was about. You asked me whether I thought HFT P&L was positively auto correlated. I could probably come up with some arguments as to why it would be. I could see it being regime dependent. I could see it particularly on the left tail. Once you start incurring losses, I could see it simply just being a case where that algo for whatever reason was no longer printing. And so once you start to lose money, you would continue to lose money. You performed an interesting study where you looked at your P&L not being auto correlated to itself, but as an input to a predictive model on mid-frequency prices of the things you were trading. And if you asked me whether I thought your HFT P&L would be predictive in any way of the prices of the things you were trading, I would say maybe not unless they were taker strategies all in the same direction. I wouldn't expect particularly on like a maker strategy that to be predictive. You found there actually was some signal there that actually your own P&L on the HFT side was a meaningful predictor of mid-frequency price movements. Explain that to me. This was one of our crazy ideas. So I think I mentioned earlier that it's almost always better to work off of something that already works. It's just a lot. Your hit rate is going to be a lot higher. And you have this base to scale off of. But we definitely leave room for the one-off, crazy explorations. And sometimes they pay off. So this was one of our more successful hobby projects or something. We didn't have strong priors going into the study. The motivation mainly was, hey, we have more capital than we can deploy the high-frequency strategies. We've onboarded ton of exchanges. Those are constant factor scaling. It's like diminishing returns because the exchanges get smaller and smaller. And so maybe we can get in this whole mid-frequency. That's the golden goose of three, sharp four strategies that have NX, 100X, the capacity of HFT. Sounds great. So that was initial motivation. But we're generally pretty strong believers in efficient markets. Basically, yeah, we have all this edge in HFT, but give us the market data, I don't know, daily returns, whatever, and ask us to predict daily returns. And we don't know where to start. So with that humility, this crazy idea was our way to get a foothold into medium-frequency trading. Often, if you can just get some data source that is useful, that people don't have, that itself can be a trading strategy. And we're not about to send satellites to go look at parking lots or whatever the classic examples are. But what data do we have? It's like, well, we have our HFT P&L. And obviously, that's private to us. And obviously, it's not random. You just look at graphs. It's very interesting. And if you think about it, what is it correlated with? Going back to the discussion about toxic versus retail flow, it's pretty correlated with retail flow. I guess your priors in general, if you can segment some actors in the market and figure out what they're doing, then that's a very good signal in general. Priors are that thing that's predictive of something. The direction is less obvious. So we went in with just saying, okay, we have this thing. Let's go to this other thing, let the retail flow. And yeah, that's probably correlated with the price. And why don't we just work through it and analyze it? That was the motivation. So we did this analysis. We basically regressed various P&L-based features, the Deltem P&L, the derivative of the P&L, against a wide range of mid-frequency price units. We're also just not sure how the mid-frequency work goes. So we kind of cast a wide net. Okay, maybe split for five minute returns. We kind of just exponentially scale it out to hours. That was the whole study. We happen to have this data because we have a dashboard and it reports all the P&Ls of all of our strategies. So we could also slice it on exchange, on strategy, on symbol. So we did all these things. It's really noisy. So I think there are techniques to deal with this. Obviously, we wouldn't regress one coin's P&L and try to predict that coin's mid-frequency movements. I think it's just way too much noise. We basically just did an 80/20 on this and we did some bucketing, some binning, following our priors to not overfit too much. And by and large, found this pretty interesting effect, which I think is counterintuitive to everyone I've talked to about this, which is that our HFT P&L, whether it's maker or taker, it doesn't actually matter, is negatively correlated with returns in crypto. And this effect is pretty strong, but if you zoom in, I'm actually trying to count. So we were super excited when we saw this, by the way. We were like, "Holy shit, let's just pay for it. We'll just want any shift to get a loss. We'll just trade mid-freakings. Things are going to be great." It was a very strong effect. I don't remember the exact numbers, but tens of aces points, maybe an hour, two hour horizon, with very high capacity. And so the problem is, if you actually look, the signal only triggers to tell you to short, there's not a reverse effect. I guess maybe there would be, but we don't run our strategies. Or between the strategies, not lose money. So it's like, you make money, all right, short. And what are you short? You short the futures. But if you actually look into doing it, so there's this one effect, which is like funding rates. When this happens, a lot of sophisticated people are shorting. And I don't think everyone is using the same signal, but this is just, in general, alpha is super correlated with other alpha. People can be looking at totally different things, but at the end of the day, alpha is super correlated. And so I think people are smart and they're making the right trades. So there's a funding rate. And then there's this other thing where the symbols that perform absolutely best on outliers, like extreme success. We obviously look at those as in any study. And these were the things that are very hard to short. The net effect is still interesting because we accumulate inventory when we're trading. And you can bias the inventory. You can internalize between your strategies. Different firms think about this differently, but there's obviously something you can do. Even if you didn't do that, you could just bias your strategies when this is absolutely strongest to bias to not holding inventory. And this will have a positive effect. But it's not a surefire, obvious trade you can make in isolation. I think there's something there with the futures, but I think it was not compelling enough to really look into it and make a standalone strategy around that, which is why I think it's like the closest thing to alpha that this is the kind of stuff that's like shareable on Twitter, I guess. But I think depending on your set of strategies and what you're running, this could actually be like a super actionable alpha. I was going to say, I love this idea that it might not be an actionable alpha in the sense that if you actually went to short the futures, it might actually be priced into the funding rate of the futures. But biasing your inventory is another way to actually implement that alpha in a way that can have a meaningful impact on your P&L. It reminds me and the frequency I trade, DFA, for example, they don't trade momentum specifically, but when they go to buy value stocks, they're going to screen out the ones with really low momentum that they're not explicitly incorporating momentum as a factor, but they're waiting for that negative momentum, which occurs at a totally different time horizon to a bait before they buy their value stocks. Totally different set of factors, but similar idea of taking a theoretically orthogonal alpha signal, not trading it explicitly, but incorporating it into the way you're trading to add some marginal edge, marginal improvement to what you're doing. I love that concept. I was going to add on to that. I think that's a really interesting example that I hadn't heard of, but I've heard of some crazy stories, like some manual traders who swing large size. I seem to know what they're doing. We'll say things like, oh yeah, in crypto, when the 50-day moving average crosses, whatever, it's like, I have a signal that's not technical analysis, but when that happens, that's when I trigger. I haven't looked at that in particular, but it reminded me a lot of that. It's waiting for some other thing that you think is breaking through some conditional signal to change. Yeah, fascinating stuff. One of the things you've mentioned, we've been talking a lot about centralized exchanges. We haven't really talked about on-chain strategies or decentralized exchanges all that much. You mentioned one of your favorite discontinued on-chain strategies was trading RFQs. I was hoping you would explain what that was, why it was a strategy that you loved and that worked so well, and then why you discontinued it. This was about half a year ago, I think, when we were in the middle of expanding DeFi. We had heard a lot of the best opportunities were starting to move on-chain and centralized exchange trading was hitting. Dimension returns, volumes were pretty low, and so we were like, okay, let's just spend more time looking at DeFi. Back then, RFQs were a bit of a fad. I think Doug from Crocswap has written some interesting threads about this lately. I tend to agree with Doug. It's not a good design. I think it's trying to take something that works in TradFi, but not really applying it well to DeFi. I guess for context, for listeners, RFQs, they're a request for vocation, I believe. The idea is good. It's like, well, let's try to filter out this toxic flow that makers hate so much. Let's try to have retail interact directly with makers. The retail will come in and say, hey, I'm retail. Give me a quote, and then the maker will give them a quote, usually inside the BVO, or certainly for the size of retail wants, maybe better than if the retailer were to hit the book directly. Then the retail gets the quote, and with DeFi, it's like a signed payload that you broadcast to some smart contract, which then verifies it and then does the fund transfer between them, retail and the market maker. It's just like OTC, but this protocol built around it, I guess. Yeah, this might sound good, and it happens a lot in TradFi. I think in Jane Street, there's a lot of this kind of stuff, and I think it's really good. You want to be on this other retail flow. You're providing retail a great service by giving them bigger size, not getting frontrun by agent. Good in theory, but in DeFi, it's just obviously a dumb idea, because how do you prove that you're retail? Everything's anonymous, and you're not KYC'd. So, it's a proof of concept for this. We basically just span up the simple Python script that just asks for quotes from these market makers, and they're recording like five basis points away. Quotes are valid for 60 seconds, 90 seconds, or something. Most of the time, it's pretty good for the market maker to get that fill, but they're recording 100K in size or something like that. We're just like, okay, we'll just wait until the price moves, and the price obviously moves. Crypto is really volatile, and when it moves, we're like, okay, we'll just like broadcast this transaction. What are you going to do about it? This seems super high sharp. You can do even better. You don't even have to wait until the price moves to trigger. It's basically a free option, and the option has time value as well. So, you literally just wait until the option is about to expire, and then you just decide if you want to trade or not. So, that makes it even more consistently good. We just did this, and then, I guess we were not the first ones to do this, or maybe we were, but the market makers react, and they say, okay, we're going to stop quoting you because you are making us lose money, and so you're clearly not retail, and they just start to give you super wide quotes, or they're just not quoting at all. Then you just switch accounts. You just fund a new wallet and do it again. Fundamentally, I think there's nothing wrong with this strategy. I guess a little sort of a concern I have is the main value we're adding when running this strategy is that we're showing the world. We're proving that this RFQ microstructure is dumb. There should be an intellectual reallocation of capital towards working on something that makes more sense, and maybe we sort of accomplished that. I think now RFQs are like, the makers have last look instead of the retail. I mean, like you said, we sort of stopped running this strategy, but I think that has been an evolution. I do think that once you do that, though, the whole benefit of RFQs goes away, and you can see the discussion on Twitter threads, but this is a hard problem to improve upon Central Limit Order Book. I just don't think RFQs do that. I guess this was a good example of just us trying things in DeFi, just realizing how immature the space is and how the protocols just have not thought things through. This was a nice segue to us basically deciding, hey, maybe we're actually the best people to build something that is actually going to service retail and create a platform for decentralized price discovery. Let's take that segue because that's where I wanted to go next and talk about your newest project. You're continuing to run the high-frequency book, but you've pivoted a lot of your intellectual horsepower towards this project hyperliquid. What is it? Why are you building it? That's right. We're basically building it because when trading on DeFi, we were perplexed. There's a ton of retail flow even in the DeFi winter of mid-2022. There's a ton of retail flow, and they're using these absolutely horrendous protocols. They're paying a ton of gas because the L1s suck, and they're using these protocols where the design also sucks, for example, RFQs. It was amazing to us that people actually want to use this stuff, and you can see it in the data. The man is there. We actually started exploring this, I don't remember exactly when FTX happened in this timeline, but it was certainly before FTX collapsed, but not that much before. Then when FTX blew up, I think the narrative obviously shifted dramatically towards, oh, shit, there's this whole counterparty risk thing, like not your keys, not your coins. This kind of stuff that used to be a meme was all of a sudden top of people's mind, and that just solidified our conviction that this was something we could build. What to build? I think we actually struggled with that a decent amount. We wanted to figure out what people actually wanted and what was not being serviced well in the market. There are a ton of uniswap clones, innovations, or integrations, like aggregators, different curves, different formulas, different adjustments you can make to make AMM thing work. We're not strong believers in AMMs. I think there's just a lot of dumb liquidity that is being provided due to this false misleading narrative of impermanent loss and/or yield farming and remnants of that. We're not really strong believers in that anyway. Even if that were the thing that the market was demanding, there are so many people trying to service that, what are we going to add by building one? We look towards centralized exchanges and say, what do people want? Where does price discovery happen? Where's liquidity? It's all in perps. Perps are just actually ingenious innovation. I think it was actually invented in TradFi, but popularized by crypto. Let's see who's doing that in a decentralized way. Basically, no one. I mean, EYDX is, order book is centralized, and they're the closest you can get. They have some traction. We basically thought, why don't we build this? I think the pitch for traders is you like Binance, you like BiBare. You like something that's centralized that you'd rather not have to trust. There will be this thing hyperliquid. There is this thing hyperliquid. Recently launched in Clubs Alpha. It gives you the same experience. Maybe liquidity is not quite there yet, but fundamentally nothing barring just the same liquidity, tight spreads, instant confirmations, Epsilon gas. Basically, gas to the extent of preventing DDoS, but the chain itself can handle tens of thousands of orders per second without an issue. Everything's transparent. Everything's on chain. Everything is a transaction. That is basically the vision. We're targeting DeFi to start because it's hard to make that educational pitch, and I think a lot of people are trying to do it, educating people that, hey, you can actually, there's this new way to like, you don't need a custodian, a blockchain, a smart contract, you can't be your custodian. That is a hard thing to sell and not really our edge in doing, but there are these people who want to do it today, and that's what we're targeting. We're basically showing them, hey, out of all the DeFi protocols, most of them are not serious. Most of them are just loans or something that sort of works like a bandaid solution. Maybe it's based on a local price, whatever. Good for DGen gamblers, but not good for serious traders who want real liquidity, but hyperliquity stands out because it is built with that in mind. We had to innovate a lot on the tech to make this happen, and so we were heads down building for a good part of a quarter. We really wanted to make it work through some smart contracts. I think we were kind of sold on the DYDX model of like, trustless off-chain matching, but like, trustless settlement. But I think upon further thinking, it's just pretty flawed. The systems only as decentralized as its weakest component, as its most centralized component. And so we basically decided this was not acceptable. This will not actually let us scale to the vision we actually want. And so back saying, okay, we need to be fully decentralized. That leaves us very little choice. Like, we need to build our own blockchain. I kind of just did it. We're very much of like a no-nonsense. Don't take things for granted attitude. And so people say it's hard to build L1s, but we kind of just said, okay, like, well, let's find some consensus protocol on tenement. Not great. Honestly, surprise, it works, but it's been battle tested. And so we took it and just built on top of it. And it's gotten us to where we are today. Can you talk a little bit more about that? Because I know deciding to build your own L1 is a key differentiator between what you're doing with hyper liquid and other DEXs and is a crucial component to your approach. First, let's make the assumption some folks listening have no idea what an L1 is. You're going to just explain what an L1 is. And then second, again, why was that such an important, critical decision for you? L1, I think was like this whole narrative, a lot of the big investments, Solana, Avalanche, et cetera. This is like the whole like L1 principle. But really, it's quite simple. An L1 is just a blockchain. It's usually contrasted with smart contract-based approaches where you take another L1, whether that's Ethereum, Solana, and build your exchange as a smart contract that the L1 executes. That's what it is. The reason it's so important, I think there's this weird incentive thing going on where people want to build on an L1 because you get the BC slush funds, and the L1s have a lot of tokens, and you get that kind of backing and the PR. And so it's sort of like a safer bet. Obviously, the L1s are really trying to get people to build on them because an L1 has a general-purpose smart contract-based L1 has no value unless people are building on it. So there's bias towards defaulting to smart contracts. Whereas if you look at Cosmos chains, which are all built on tendermint, no one's really incentivized to be pushing those. No value actually accrues. At least now, there's no value that accrues to Adam, for example. I think they're starting to come up with ways to do this, but it's fundamentally a self-sovereign system. And so just keep that in mind in terms of assessment between the two of you here. My personal opinion, having tried both, is that it's hard for me to imagine building a good exchange for a contract platform, certainly for derivatives, certainly if you want to run an order book, which I talked about earlier, is a good model. And so maybe some validation for this idea is that DYDX, which is probably the front runner, is pivoting to building their own blockchain five years later. I think for them, it was maybe some sort of legal pressures. I can only speculate there. But the current thing that they're running is obviously not decentralized. And everybody knows this. And I guess they will sunset that when they're ready. But from our perspective, L1's part of the way to build an exchange. Maybe as a concrete example, if you're running a smart contract exchange, you're constrained by how the smart contract protocol works. So on Ethereum, transactions must be triggered by a user action. So then if you want to do these things, these very basic operations on a perpetual exchange, such as distribute funding every eight hours, this is the mechanism by which the price is pushed towards the spot price. That's like a super hard thing to design. If you're trying to build a order book on an L1, let's say you have like 100,000 outstanding positions, the number of storage slot updates you need to make on Ethereum, like that doesn't fit into a block. And so you have to design a protocol around like, who does this needs probably like some auction to like figure out is that privileged people who are allowed to trigger funding, who gets the credit like it's got to be some fee to them because they're paying gas. It's not atomic. There'll be this weird thing where like, you get funding at approximately every eight hours. But depending on how many people there are, you might be like three minutes later, like, it's like, how are you going to run training strategy around that? This is like a super basic operation, like all per exchanges need this. But if you're running a one, it's trivial, like you just bake it into the consensus protocol itself, you say like, all right, when you're producing new block, you can execute arbitrary code. So if this block is a new multiple of like eight hours, since I'm zero, let's just trigger this thing and like do the thing. And it's just like so much simpler. And so like, I think like running an exchange is a lot closer to building an L1 than it is to writing some simple smart contract. Now you're talking about perps. I want to go back a little bit to the traditional way in which decentralized exchanges currently operate, which is via liquidity pools at different fee tiers. So someone who wants to provide liquidity might put in, I don't know, Ethereum and Bitcoin for the Ethereum Bitcoin pair, and they might offer liquidity at a one basis point fee tier or a five basis point or a 30 or a 100, I think is how high they go. But there are these very specific buckets. I can't, for example, offer liquidity at a 15 basis point here. This is a very, very different model than the order book model, one in which you are intimately familiar with through your high frequency trading days. Why do you think the order book model that you're adopting for hyper liquid is inherently better than this B tier structure that current decentralized exchanges operate on? The fee tier thing is interesting. If you look at the AMMs, they're slowly trying to progress towards being an order book. I know a lot of DeFi is a little frustrating. It's like reinventing the wheel. Maybe there'll be some innovations along the way. But fundamentally, the liquidity pool model, it's both ingenious and scam. So it was born out of necessity. If you're in like 2018 or whatever, you know, SOAP was built, it's not feasible to do anything other than a few simple arithmetic operations, one or two storage updates per transaction. The user, there's a tolerance, how much gas they're willing to pay. And so it was born out of necessity, this like computational constraint. And so they kind of managed to get it to work by basically tricking people into providing liquidity to the pool. I think impermanent loss was like a super good marketing ploy. Borderline, I feel like unethical. I don't know, I think these people are smart people. I find it hard to believe that they didn't know what they were doing. But I think tricking people to say, hey, like you put your stuff here, you're not trading, you're not like posting liquidity, you're just depositing into this like yield thing. And yeah, you might have some loss, but like, don't worry, it's impermanent. It's definitely questionable. And I think people working up with this now, you just model the prices of random walk. There used to be a lot of controversy around this, I don't really know why it's like super obvious as a trader, you just arb these pools and make a ton of money. It's a super competitive trade now. But like, it's a really good trade. And like, who's providing this liquidity, it's not professional market makers, like an order book, it's a bunch of retail that maybe put their funds down, like literally like forgot to put it there. And it's just like this negative EV over time, you're just suffering. They throw on this like yield farming stuff, incentivize liquidity, and then maybe the yield farming thing like dries up within the retail like forgets that their liquidity is still there. Like, I don't really know, but it's not a sustainable model. And like people might say, oh, the volumes are pretty high, maybe it works, but it's because of this sort of ingenious marketing scheme. Over time, I expect the liquidity just to be like trending downwards. And when it actually hits the equilibrium, you're just going to find the liquidity needs to be so bad that the fees paid for the adverse selection relative to the retail flow. And that level of liquidity, if you do the math is awful. And that's the fundamental like argument for why these pool based things don't work. And evolution of that is GMX or all the GMX clones, where instead of having this constant curve, they use an oracle price, they have all these tricks and sort of limits and things like that to get the oracle price to be relatively accurate when trades come in. But even then you start to see these pretty famous cases of people manipulating a price on centralized exchanges, and then trading on GMX against the manipulated oracle price. And maybe all this stuff has band-aid solutions. I think the tech is finally at a place in, I guess, like L1 consensus or this kind of a general area of research where you can just like not make these sacrifices. You can have your cake and eat it. You can be decentralized and run an order book, which is from what I can tell empirically speaking, the only way people have found to encourage real price discovery, real markets. One of the potential problems with having your own L1 is it requires people to bridge money on and off the L1 from some sort of fiat on ramp or another chain, which I could see potentially being a risk to price discovery. The price discovery on the platform might not be as efficient because money moving on and off the platform is inherently speed limited by this bridging component. I'm curious as to your thoughts there. Do you see that being a potential risk in operating this as your own L1 or do you think that that's a non-issue? It is definitely an issue in crypto in general, not even just in D5 because even if you're trading on centralized exchanges, when you're doing ARBs, your withdrawals and deposits are on the blockchains. If things are congested, then you still have this issue. We're focusing on perps to start. Like I said, it's because it's the 80/20 here in terms of opportunity, almost all the volume is in perps. The next thing about perps is you can start with another 80/20, which is like let's just margin them with USDC and call it a day. It's not that hard to add a couple more stables in there to diversify across. Stable coin risk, but by and large, people are pretty willing to get on board with this model. It's like, all right, I deposit my USCC into this bridge or chain or contract or whatever. And then this lets me express my opinion on a large class of crypto assets. That's pretty cool. So in times of high volatility and price discovery, you can basically just as long as you have the collateral, you can express your opinion. ARB is in that sense. It's not an ARB. The spot perp ARB is a statistical thing. You're just trying to harvest the funding rate at a profitable spread between spot and purpose. But you can do that trade without moving the spot or the USCC around, at least the purple leg you can do on hyperlabel. That being said, I think the bridge means like an interesting concern in general. And I think there's a lot of interesting sort of omni chain technology coming out these days. We've integrated with some and we're always looking for more and we're happy to basically be supporting the people pushing that frontier. We've got a lot on our plate. So we're not really doing the multi-chain innovation stuff. But the ultimate goal, which it really is just like a technological limitation at this point, which is being solved in many ways. The ultimate goal is you have your assets on any source chain. We're pretty agnostic. Just send it to this trustless bridge, decentralized bridge protocol, and then it will serve as collateral on hyperlabel. Now, even writing your own custom L1, my expectation is that you'd still be operating at speeds that are orders of magnitude slower than most of the major crypto centralized exchanges, as well as traditional finance exchanges. Do you think faster is always better? Or is there a ultimate limit to the benefit? Can you get 99.9% of the way with an order book speed that's still orders of magnitude slower than what you see at something like Binance nowadays? I think you can. Even today, if you try hyperliquid from the UI or from the Python SDK or whatever, the raw API, you'll see our latency is maybe 100 milliseconds, maybe 300. It's not super deterministic because of the blocks being produced. And you might say, "Oh, that's terrible. That's like 10x the Binance latency, order entry latencies." But latency doesn't work like that. It's not like fees. It's not linear. And certainly for a user, like for retail, which is the most important segment that you have to cater to first, human reaction can't really differentiate between 100 milliseconds and 10 seconds. Even if they can, they don't care. It's like they just want something that's immediate. Prices don't move that much in like 100 milliseconds versus 10. For all intents and purposes, it's zero. So the latency incurred by block times is basically solved by running a custom L1. Now, if you look at Ethereum and other block chains, yeah, more than 10 seconds, that is obviously a huge hit to user experience. Prices move a lot in 10 seconds. These are the things that we said there's diminishing returns for latency in that regard. In terms of the order book speed, I guess the thing you really care about is TPS and transfer transactions per second. And I guess completely for a dex you care about orders, answers, etc. per second. And yes, there's going to be an order of magnitude difference here between running a decentralized exchange and create somewhere like Binance. That being said, I also think this doesn't matter because computers just get exponentially better anyway. And even now they're at a point where they're good enough. So I don't know the exact numbers on Binance's matching engine, but let's say it does a million orders per second. And let's say we write our L1, it's really performing those 100,000 orders per second. It's not like Binance is 10x better there. It's hard to evaluate this, but you can very easily design a protocol that caps out at 100,000 transactions per second. That is a great protocol and is sufficient for price discovery on the assets that are listed. And sure, like during the insane volatility spikes, this thing, maybe your orders will be a couple blocks delayed or like 10 blocks delayed to hit the chain. But it's not like this stuff doesn't happen on centralized exchanges either. It's like, yes, it's an order of magnitude, but it's in the direction that doesn't suffer an order of magnitude cost. But if you look at the non L1 chains, and yeah, they do maybe like 10 transactions per second, then yeah, I think the difference between 10 and 100,000 is a huge deal. I think some people take different views on this. It's not only a TPS thing, it's also like an engineering thing. UIDX is really into the idea of off chain order books. I think even with V4, the plan is we're going to let validators run their books, but only have settlement on chain. And I guess like in theory, you can get maybe a new order of magnitude TPS boost there. But I think what you're giving up is pretty expensive. This increased opportunity for MEV and this, it's just like ambiguity about what truth is, like the source of truth, because order books in my mind are part of the state. And having that be off chain, it's a little bit hard to reason about. And I think just, you take the couple order of magnitude hits here and there, but the thing you're building is so much more robust and resilient. And the transparency you get, I think like far outweighs the costs. And I guess I will say also that we have looked a lot into the latest research on consensus, because we expect when it comes to it, that is going to be the limiting factor. And there's a lot of really cool stuff. Tenement's pretty old. Like the idea I believe is 10 years old. I don't actually know the birth of the idea, but at least 10 years. And people have thought a lot about this problem since then. The only issue is that the modern consensus protocols are not quite production ready. So we ended up going with Tenement for now, but building everything else from scratch. So not relying on the Cosmos SDK, but writing in a very performant way and Rust. But we've done the research and we will continue to keep tabs on this. And for us, it's very easy to swap out Tenement for any consensus protocol that is production ready, that we deem is better. And we expect like a 10x, at least a 10x improvement there when the time comes. We're pretty optimistic about the tech stack I went through building. And the proof of concept is there. The benchmarking looks good. We wouldn't be doing the marketing and use access from push if we didn't think the platform could support this exchange. Well, Jeff, we've come to the end here. Long time listeners of my podcast will know that one of the things I do is completely change my cover art every season. And the cover art this season is inspired by tarot cards. And I'm letting each guest pick the tarot card that speaks to them. You picked the chariot, which will be the design of your cover art, which you've yet to see, but will be available soon. The last question on the episode is why did you pick that card? So there's like positive versions and negative versions. Control will power, success, action, determination, all very positive things. I think it speaks strongly to how we go about doing things. I think it sets us apart from a lot of projects or teams in the space. We shoot for something that is pretty unreasonable. We ask most people, can you build finance in a fully decentralized way? Not sacrifice anything. They'll probably say maybe in five years or something, but we don't make assumptions. We push ourselves, do research from first principles, and ship things. And so the willpower, action, determination, that's how we do things. And it's part of the game. For trading, you've got to win just as much as you want to make money. If you just have one of those, you're not going to succeed in trading. And now that we're building something bigger, I think it's even more important. We have this vision. It's like people need this thing and nobody's building it. And so it's partly because it's just really hard to build. And our team is like the cherry. We're just going to go do it. I love it. Well, Jeff, this has been fantastic. I really appreciate your time and best of luck with HyperLiquid. Thanks, Corey. It was great talking to you. Appreciate it.

Podcast Summary

Key Points:

  1. Corey Hofstein hosts the podcast "Flirting with Models" that explores the human aspect behind quantitative strategies.
  2. Jeff Yan, founder of Chameleon Trading, discusses high-frequency market-making and decentralized exchanges in a podcast episode.
  3. Jeff Yan shares insights on the challenges and opportunities in high-frequency trading, emphasizing the importance of understanding trading infrastructure and data normalization.

Summary:

In the podcast episode of "Flirting with Models," Corey Hofstein interviews Jeff Yan, the founder of Chameleon Trading, discussing topics like high-frequency market-making, decentralized exchanges, and the challenges faced in the trading industry. Jeff Yan shares his journey from traditional trading to the crypto world, highlighting the importance of infrastructure and data analysis in high-frequency trading. He stresses the significance of understanding APIs, measuring latencies, and ensuring data accuracy for successful trading strategies.

The conversation delves into the concept of determining fair prices for trading, the differences between making and taking strategies, and the complexities of crypto exchanges. Jeff Yan's experience provides valuable insights into the world of high-frequency trading and the evolving landscape of decentralized finance.

FAQs

The podcast 'Flirting with Models' delves into the human aspect behind quantitative strategies.

Corey Hofstein is the co-founder and chief investment officer of Newfound Research.

The conversation covers high-frequency market-making, infrastructure quarks, adversarial algorithms, and decentralized trading platforms.

Making is more infrastructure-heavy, while taking is more focused on statistics, math, and modeling.

Understanding API nuances and measuring latencies can provide alpha by exploiting hidden features and gaining a competitive edge over competitors.

Chat with AI

Loading...

Pro features

Go deeper with this episode

Unlock creator-grade tools that turn any transcript into show notes and subtitle files.