dYdX logo
dYdX logodYdX icon
English
中文
日本語
한국어
русский
Türkçe
Français
Português
Español

Sixtant AMA Recap

Product
Product
ama-recap-sixtant
Product
Product

On May 14th, we hosted a live AMA Spotlight with Josu San Martin, Cofounder & COO and Matthew Downey, Cofounder & CTO at Sixtant.

This is the second AMA that we're doing in our series focused on market making. Sixtant is a data driven market maker and liquidity services provider for exchanges and crypto companies. They are one of the largest market makers on dYdX's Layer 2 perpetuals.In the next hour, we'll be discussing community questions around Sixtant and market making on dYdX and DEXs more broadly.

Josu and Matt discuss:

  • Their backgrounds and the story behind Sixtant

  • Market color on dYdX liquidity, volume, order flow, and bid-ask spreads dynamics vs. other exchanges

  • A deep into crypto market structure and different strategies deployed

  • Sixtant’s strategy to manage inventory, risk, collateral, and credit

  • The future of market making in DeFi

Links:

A redacted transcript is available below:

David (dYdX): Hey, everyone. My name is David Gogel. I'm on the growth team at dYdX. I'm excited to be joined today by Josu San Martin, COO and co-founder at Sixtant, and Matthew Downey, CTO and co-founder at Sixtant, as well as Vjay Chetty, head of BD at dYdX. To kick things off, can you both introduce yourselves and tell us the founding story of Sixtant?

Josu (Sixtant): Thank you so much for having us. This is great and really it's been a delight to be market making on dYdX. It's been one of the coolest exchanges to integrate and to be offering market making there, so really thank you. And thank you for doing the AMA. These things are always interesting and fun to do. My name is Josu San Martin. I am the co-founder from Sixtant, and I think I'm going to refer to Matt for the founder story because he was there a little bit earlier, so I think he does a pretty good job at explaining the company.

Matt (Sixtant): I'm Matt, the other co-founder of Sixtant. We develop high frequency trading systems and strategies, largely based on ideas around market microstructure and market efficiency. A little bit of my background. My background is mostly in systems engineering, but in 2015 I started playing around with the idea of doing a homemade HFT system, which led me to crypto markets due to the low barrier to entry. After a couple years of doing the simplest trades that everybody was doing, lots of arbitrage and reading everything I could get my hands on about trading and finance, I became captivated with the idea of building a really high precision, more professional trading operation for crypto, with its unique market structure and product offerings. I think at the same time, Josu was also doing a lot of that manual arbitrage, but with an eye towards how could we do this on a larger scale and maybe take advantage of strategies that are a little bit more nuanced than just, "going to buy here at one price and sell here at a different price." We actually ended up meeting in a book club in Mexico City, where we read crypto project whitepapers. And we had a really good group of people. Some of the founding team of Bitso, which is now the largest exchange in Latin America, and just different people from around Mexico City. I think Josu was the head of the FinTech Association for Mexico at that time.

Josu (Sixtant): Yeah. That's correct.

Matt (Sixtant): And so that's how we got the idea to start Sixtant. In 2016-2017, I was also working with a small private bank in Liechtenstein, both on their move into the crypto space and their service offerings there, but also on their custody solutions and managing the wallets and whatnot. But at that point, I was still keeping in touch with Josu and everyone from the book club. And then at the beginning of 2018, we decided to start Sixtant and focus completely on prop trading, market making with HFT.

Josu (Sixtant): Yeah. Better intro. Again, my background, it's a little bit more traditional. I worked for the Ministry of Finance in Mexico between 2014 and 2016. Then I joined a Mexican fintech association as a manager of the Mexican Fintech Association. I ran that for like a year and then in 2017, the bull market happened and I decided to join full time in crypto. I had run into Bitcoin relatively early, but I didn't find a way how can I get working here full time. And finally in 2018, Matt came to me. We had this idea, we wanted to, and everything made sense. And since then, we've been full time working into Sixtant and trying to make it real.

David (dYdX): Awesome. Thanks for sharing your background. Josu, could you describe what it means for a market maker to be data driven? Sixtant is one of the leading data driven market makers. What does that really mean for our audience?

Josu (Sixtant): Sure. Market making could be a bit of a commodity. We are just providing liquidity and that's it. You want us to be placing on both sides of the book. And anybody can do that. All you need is capital and a relatively simple trading system. When I say simple, it's not that simple. You just put a few engineers together and they can put together this system relatively quickly. But we don't think that's enough. We want to go a bit farther. And when we work with clients or we work with new exchanges, we really want to understand the market. We want to know what's happening at that microstructural level, and really get a feeling of what's happening. Not just posting orders. Making that with a little bit of sense. For us, usually everything starts with us collecting data, we start looking at the market. And even before we start coding any strategies, we are looking at the data and collecting a ton of data. It's terabytes of data. And for every market, we like to look at the levels, we like to look at the market microstructure. We want to understand how this market fits with other markets, because you cannot just look at one market isolated.You need to understand the whole ecosystem. What are order books doings, where is the price forming, and all this. That's why we like to say that we are data driven, because it is not engineering driven. And you say, "Okay. We're going to have the best trading engine," which we try to do, too. But also want to support all these efforts with data and understanding what we are doing. And if we have clients or for our market making clients, we also try to do our best to pass on this data and for them to also understand, to see the same things that we are seeing.

David (dYdX): Awesome. And with all of this data, how would you say the role of a market maker evolves in terms of making crypto markets more efficient?

Josu (Sixtant): Market makers, as a trader you don't usually see them. You don't know who you are trading against. But usually most of the trades are going to be crossing against a market maker. The probability that you as a regular trader or retail, that you will post an order to sell one Bitcoin, and the chances that right at that moment somebody else will want to be willing to buy that Bitcoin. That's really low. Really what happens is that you usually have market makers that are posting orders on both sides of the book. And usually retail traders are selling or buying against or matching their orders against these market makers. That's the role of the market makers, and we help to make the market more efficient. Because if you have to wait or if it was just retail traders trading one against another, they would be getting much, much worse prices. You would go to the market, try to sell a Bitcoin, and the price of Bitcoin will be like 50,000. But there is nobody taking that order at 50,000, so you lower the price to 49,000 and there's still nobody. And in the end, you end up putting even a lower price and you end up selling at 48,000. And you just lost $2,000 because there was nobody in that specific market taking your order at 50,000, which is the price you would get if you had gone to another market. The role of market makers, or one of the roles of market makers, is making sure the price in the end, you get more or less the same price in all the markets, so it doesn't matter where you go. If you have a market maker in that market, you more or less are guaranteed to get those 50,000, or the same price that you would get if you had gone to a different market. That's one really important role, having this price parity across all exchanges.

David (dYdX): You described different integrations with different exchanges as critical for the success of a market maker. Can you describe what types of market making strategies Sixtant deploys? Do you guys generally stay market neutral?

Matt (Sixtant): We do have strictly delta neutral strategies, meaning any change in crypto exposure is hedged immediately. We do also have some strategies which take inventory risk, and those are two ends of a really wide spectrum of possible ways you could construct strategies. In between, we have strategies that are delta neutral in spirit. But instead of constructing strict hedges we maybe transition exposure away from a volatile asset, like most cryptocurrencies, to something that we're comfortable having exposure to. And on top of that, we're also prototyping some beta neutral strategies. Meaning that instead of staying strictly neutral, we just try to net out positions that if the entire crypto market rises or falls, we're hedged for that sort of movement. But it's also probably worth mentioning that most non-directional trading strategies are based on a limited set of market invariants that people are trading. It's really a handful of ideas that people are using trades to express. For us, really small differences between how two different strategies as we think of them execute, make them into two different strategies for us. We'll work on them individually, we'll work on tweaking the minute execution logic even if the ideas are really similar. We have a lot of different delta neutral market making strategies. We have several different market making strategies that take inventory risk. But I think probably for us, there's a greater distinction between what those strategies do than there might be for someone looking from the outside.

David (dYdX): Super helpful. And when you look at your overall portfolio, what's the split or focus around spot versus derivatives across your book?

Matt (Sixtant): Obviously, perpetuals are really hot right now. In a lot of cases, it seems like probably more discovery actually takes place there, as opposed to on spot markets. Especially for a lot of the smaller, more sparsely traded coins, which previously had never really been the case with futures or other instruments. We're mostly trading spot and perpetuals. And I feel like looking at which markets we initiate trades on the most, I feel like it moves back and forth actually. On some days we're mostly initiating trades as makers on perpetuals markets. On other days we might have a little bit more activity in spot markets, but they're definitely neck and neck.

Josu (Sixtant): We also have strategies that make on spot, on cover on perpetual market, or derivatives, or vice versa. And we are pretty agnostic regarding spot. Some of the strategies we choose is the same market. When I choose if we start making spot or future and use that one parameter in the study, it works in a way. Most strategies are pretty agnostic.

Matt (Sixtant): The only perpetual we would really differentiate about would be the quantos that BitMEX has listed, which we're not trading but they imply all sorts of delta hedging in the background, that's actually probably more similar to options market making than it is trading a normal perp or future.

David (dYdX): Before digging deeper into some of the market color and other market making initiatives that you guys lead, just a general question around Sixtant. I'm curious, how big is the team and what does a day in the life working at Sixtant look like?

Josu (Sixtant): Well, we are a relatively small team. We used to have two people and we are six now in the team. We are spread across a few jurisdictions. We have the US. Well, New York and we have Mexico. I'm currently in Spain. We have another teammate in Germany and another one in the UK. We are probably missing the Asia working hours or trading hours. But I don't know, maybe this year we will hire someone from Asia. But for now, the team is completely distributed across the globe. I'd say that the only thing that happens every day is we have a daily meeting. It used to be a morning meeting when we were all in Mexico, but now for me it's at 5:00 in the afternoon. But we have that daily meeting. That daily meeting is 30 minutes to an hour long, and that's where we discuss what we are working on. Something that needs to be discussed with the team. And also, talking about the latest DeFi things or what's going on with the market. And it's kind of open.

Matt (Sixtant): Sometimes we talk about the strategies together during that session, too. Just pushing the configs around or something.

Josu (Sixtant): Yeah. It's really open. We don't have an agenda. And the days, they could be very different. If the markets are moving a lot, I may be focusing on the trading system, making sure we are taking advantage of all the opportunities, making sure everything is running. As you know, it's normal for exchanges to go down around more volatile times, so we have to be more on top of the system around those times. And if it's more of a quiet day, maybe I'm going to be working on operations. Sadly, accounting takes a lot of my time, too, as it happens in similar companies as ours. And I think Matt's day is different, too.

Matt (Sixtant): I think mine really depends. Probably the most exciting days are where I'm working on either strategies directly, or figuring out how to make a strategy better, or how to create a strategy from scratch. Or building some new component into the trading system to allow strategies to happen. But there's a lot of experimentation, too. I would say my favorite working sessions are where Josu and I can be working on a strategy together, and we have a little domain-specific language to allow prototyping really quick. Or simple logic strategies that we just run live or simulate live to try and refine. Vijay (dYdX): That's great. Switching gears a bit. Matt, you guys have been putting out some awesome market color analysis for dYdX, as well as looking at other exchanges. Can you describe the overall liquidity, volume kind of order flow and bid/ask spread dynamics that you're seeing on dYdX specifically? And why you guys think about those kinds of considerations and why they're important?

Matt (Sixtant): Totally. I would say a high level right now, just to lead off. I would compare dYdX market conditions to something like Bitstamp. They're really solid, tight bid/ask spreads, lots of volume. But I actually think they're going to outpace Bitstamp fairly rapidly, just because first of all, there's a lot more interest in trading perpetuals. I think people love perpetuals. It satisfies all of the liquidity needs for going short. You don't have to use any of these margin lending protocols like you had from Bitfinex back in the day, or even on Kraken that were expensive and kludgy. We're seeing bid/ask spreads for ETH and BTC on dYdX in the like five basis point range, or less sometimes. I think it wouldn't be a long shot to imagine that coming down to one basis point or sub basis point, just as activity in the markets increases, especially on ETH. And really when I think back, I don't even have to categorize dYdX separately as a DeFi exchange or as a decentralized exchange when I'm thinking about market conditions. Which is really refreshing. I remember back, I guess it must have been mid-2016. I was trying to trade on Ripple's distributed order book. You probably remember that, because you were at Ripple. Vijay (Sixtant): Yeah.

Matt (Sixtant): ... back then, right? And I remember I was trading Mexican pesos versus dollars, and the bid/ask spread was like 10%. And it was because the ledger took two seconds to update, compared obviously to block times on ETH that are 10 minutes or whatever. But even those two second was enough to really harm the market quality, in a way that people thought might happen but weren't totally sure until they tested, so I'm glad people tried it out. But we don't see that at all with dYdX because of the Layer 2. Though we don't actually have a ton of experience trading on Layer 1 exchanges. That's something we avoided until we saw what you guys had put together and decided, "There is no reason not to. This looks great." We're getting rid of the counterparty risk and we get most of the things, if not everything that we like about centralized exchanges. Vijay (dYdX): It sounds like in general, on dYdX as well as other DeFi exchanges, you guys are starting to see the level of latency that really caters to your model of trading and managing a book. Is that fair to say?

Matt (Sixtant): Absolutely. And I think dYdX so far has been significantly faster than other exchanges we're trading on. I promise I'm not just saying that because you guys are the ones holding the AMA. And obviously, those things are going to vary under load. When FTX first launched it was best in class, super fast, never went down. And obviously, they've had good problems scaling recently, just because everyone is eager to trade there. There are always going to be growing pains for exchanges, but everything has been really seamless so far. Vijay (dYdX): And how do you compare those kind of same dynamics in the long tail market? Kind of your LINKs, and UNIs, and AAVEs of the world compared to the major markets, like BTC and ETH. And both overall in terms of the broader market, as well as the market conditions on dYdX specifically.

Matt (Sixtant): One thing that's really interesting about dYdX, I think because it's a DEX at heart, is that ordinarily on exchanges you'll see Bitcoin has 80% of the volume, then ETH has 20%. And then if they have 100 other tokens listed, all of them are sub 1% or sub 3%. And on dYdX, that BTC to ETH relationship is inverted, so ETH has huge interest, huge volume. Then BTC is trailing, I think we're looking at maybe 20% or something. And then the small caps will follow the same patterns that we see on other exchanges. I think on dYdX right now, the spreads for those perps are pretty good. I think they're up for grabs because people aren't really sure where the market for price discovery for a lot of these tokens is going to be. There's Binance Futures, there's FTX for perpetual swaps. Obviously, there are AMM markets and I haven't really looked yet, but on Solana as well I'm sure a lot of them are quoting. But there's no single market or single trading venue that's taking 95% of the trade volume for a lot of these. But Binance Futures is really doing its best. But I don't think it would be farfetched to imagine dYdX overtaking on some of these, especially since you're focusing on a smaller product offering than something like FTX so far. Because even there spreads might be sub 10 basis points bid/ask spreads for a lot of these smaller caps, but they're not going to be sub basis point, because there's just no way to… No market has the certainty to pinpoint the price of one of those tokens at a sub basis point error margin, just because of how speculative and new they are. I'm honestly really interested to see how it develops, and which of those tokens end up lasting and having staying power, and how trading activity moves around between the different venues for them. And if it stays mostly in DeFi. Because I know a lot of people who are trading on DeFi right now would be maybe a little bit reticent to enter into Binance Futures or FTX, but probably wouldn't be to start trading on dYdX. It's going to be very interesting. Vijay (dYdX): It's definitely something that we think a lot about in terms of seeing an opportunity for decentralized perpetual marketplaces to really differentiate in terms of that long tail, and become the go-to venues. Especially in the long tail. Just given markets like BTC and ETH, you've got massive volumes on the biggest exchanges. And those are self-sustaining markets at this point, too, in a sense.

Josu (Sixtant): It was interesting to see how Binance Futures came out of nowhere, and suddenly all the prices discovery and liquidity is there. As Matt was saying, I think there's an opportunity for the liquidity to go somewhere else though, price discovery to move somewhere else. BitMEX was the undisputed BTC perpetual market, and now it doesn't even play that big of a role in price discovery.

Matt (Sixtant): BitMEX really evolved the game there. They maybe even coined the term perpetual instead of calling it a CFD.

Josu (Sixtant): Someone tweeted that today is their five year anniversary of their XBT perpetual. Matt (dYdX): Wow. We should have a party. Vijay (dYdX): That's great. It's the OG.

David (dYdX): How far we've come.

Matt (Sixtant): Yeah, for real. That's another thing that you guys are doing. FTX moved the game forward, when they decided they were going to list perpetuals for like 100 markets at once. Whereas BitMEX would never have dreamed of doing that. Because they really wanted their index prices to be perfectly aligned with what markets thought the price of the token was, and they wanted the funding rates to really keep the price parity in check for the perps. Whereas FTX I think made the right choice taking a little bit more of a cowboy attitude and just saying, "We're going to find a way to make indexes for all these, because we know people want to trade them." It turned out that people did. Vijay (dYdX): It's almost like in an evolving market, it's okay if the pricing and index and all the infrastructure is evolving itself as well. People just want more product at that point in time.

Matt (Sixtant): Exactly. I think it makes it even more dynamic, too, for all sorts of traders. Because it's not just like you arrive to this market that is 100% perfect, and there are no trades for you to try and figure out. And there's maybe no funding rate that you can really earn in an attractive way. Obviously, the market conditions right now are helping with that, too. But I think it makes it a lot more fun just for anyone to trade on those markets. Vijay (dYdX): It's almost like the more market permutations you have, the more exciting a marketplace tends to be for your kind of average pro trader or institutional trader.

Matt (Sixtant): Yeah, definitely. Vijay (dYdX): Talking a little bit about the perpetual structure itself, can you talk about the pricing parity and the funding rate activity that you've seen on dYdX perpetuals? And on that same note, you guys have been making a few comments on the market structure side of things, where perpetuals have often been leading from a price discovery standpoint. Curious if you can speak to how you guys have seen that evolve during your years in the markets.

Matt (Sixtant): Starting with price parity and funding rates. I think because some of the markets on dYdX are still just getting kick started, we see funding rates that are actually much higher than on both FTX and Binance Futures. Typically, Binance Futures has higher funding rates than FTX in general. If you're interested in constructing a… specifically for hedging it's a really good opportunity, because you can construct a hedge and make money on your hedge at the same time. But obviously, that direction is going to be dictated by market whims and if people are wanting to lever long or lever short on something. DOGE is a perfect example. I would say that has the most variable funding rate of any currency, because the speculative mania obviously had people levering long. But then you had people wanting to hedge or exit their positions pre-SNL. I think speculation at the moment from retail plus hedging from people who are slightly more institutional is creating a lot of jostling and displacement in all perpetual markets. We see it across venues, and that's basically giving people an opportunity to provide credit through funding rates. Because that's what the ecosystem is missing. Especially when you can see everywhere there are huge yields in DeFi, high funding rates in CeFi and now in DeFi as well. And I think all of that is an ecosystem-wide expression of a need for credit. Because there's a lot of stuff going on, there's a lot of financialization, there's a lot of transactions. And people want credit to trade with and there's just not enough of it at the moment. In terms of price parity, I think the price parity is pretty close. We're seeing 10 to 15 basis points. We're not seeing 2% or 3% spreads. Though with some of the more esoteric tokens on FTX, we have seen a few situations where the perp versus spot stays at a pretty wide premium. And I think again, that's just due to it being hard to put together a good index. A combination of it being hard to put together a good index for the underlying, and people not caring about the funding rate that they might be getting. Vijay (dYdX): Super helpful. And how do you think about the rise of inverse perpetuals, collerarilzed in the token itself? Do you think that's affected the broader market structure environment, or kind of the implications that might have from a market standpoint? And just on that note, it's been interesting to kind of observe for dYdX itself, with the Layer 1, we did have an inverse ETH perpetual. And that was kind of a test to see what the interest might be in something like that. With the Layer 2, since we had to go with a single form of collateral in order to support the cross-margining, we chose the USDC stablecoin. And adding additional forms of collateral is definitely something that we want to do at a future point in time. But it's been interesting to kind of see the user feedback and kind of the expanding interest in inverses as well. Just wanted to get some perspective.

Matt (Sixtant): I think you could even separate two things there, because there's whichever currency you collateralize the position in, and then there's the settlement currency of the perpetual. And I think if the settlement... If the perpetual itself is inverted the same way that I believe ETH perp was on your Layer 1, and the same way that BitMEX XBTUSD is, for instance. It definitely adds some interesting convexity there. I remember we did a couple trades between BitMEX and JEX, which is an options platform that was eventually acquired by Binance, where we were looking at, "Well, the options aren't quite arbitrageable. But with the convexity from the hedge that we would get on BitMEX, we might actually end up with something that looks like a likely positive P&L on these trades." But in general, I think the convexity is just one more thing that most people probably won't think of, similar to the funding rates.

Josu (Sixtant): Until they get liquidated. Convexity is a double-edged sword. What happened? Had enough margin, the price went down like 30%. Why am I getting liquidated as well? Because your margin also went down 30%. Vijay (dYdX): Yeah, exactly. We actually saw a lot of our users initially had some questions around that.

Matt (Sixtant): But collateral, first of all, the portfolio margin is super helpful. And collateral across currencies is something we really like, because it makes it easier for us to manage risk if we have collateral in multiple currencies. And often we will be in the position where we as a firm have inventory in certain currencies. And then maybe we actually need to make markets in currencies that we don't own, so we have to construct hedges by spot in those currencies. We end up spending a lot of time modulating how much of different currencies we have. The more of those that we're able to use directly as collateral, the easier that whole process becomes, and the less tangled and intertwined everything is.

Josu (Sixtant): And one thing cool thing of having USD as collateral is that lack of convexity. That's also good when markets are going down. You don't have to worry that much of do you have enough collateral? What's happening? This is just 50,000 USD. It's going to be 50,000 and there's going to be enough to cover a 50,000 loss, and you know that.

Matt (Sixtant): Stable collateral.

Josu (Sixtant): From a user, especially retail perspective, having USD collateral really simplifies things. As Matt was saying, the flexibility that having a portfolio margin is super useful for us. And also as a trader, once you become a bit more sophisticated, having portfolio margin is really useful. Vijay (dYdX): And the last question on this section is just do you have a perspective on how a retail audience, let's say your average trader. Maybe not so much a pro trader or a market maker, but your average user. How can they best leverage this kind of analysis, or how should they think about the kind of analysis that you guys have been doing on the volumes and order flows and spreads?

Matt (Sixtant): I think Josu and I would probably have different approaches here, because we have a complimentary approach to trading in general, I would say. Which is really helpful for us as a company. My advice to someone would be the more information you can collect about invariant conditions, the better. Because if you can look at something and understand conceptually what it's trying to express, the simplest invariant is the price of the asset should be the same across all markets. And that's one way you can maybe see that the price is higher, short on one venue, long on another venue. Probably collect funding rate on the venue where you're short, and then wait for that relationship to revert and collect some money. But that's far from the only market invariant you could be looking at. I think understanding how the market functions on a microstructural level helps you piece together what other assertions you could make like that. And usually once you come up with an assertion, like they should be trading within a range of this many basis points from this other exchange. Or the funding rate should be greater than or less than this, if this other condition holds. Or the price of the perpetual should have this relationship to the price of a future, given the maximum funding rate that could exist in one hour. Or just any permutation of these conditions that you think should be related. If you can figure out what the relations are and then trade expecting them to exist, when maybe they're broken temporarily, I think you can make a good amount of money that way in a less directional or less speculative way.

Josu (Sixtant): Matt was saying that because his approach is always more analytical. I try things and give it a shot. One example is when BitMEX launched their ETH quantos, it's like, "Look, there's an arbitrage opportunity here." I went long $2,000, I went short what I thought was $2,000 on BitMEX. And I didn't even read that the quanto contracts were like $4 each or something like that. When I checked my position I was actually super unhedged. I was long $2,000 but I was short like $10,000. But it's cool. That's why we're complementary. I like going into these new DeFi protocols, trying them, seeing how they work, and then once I get a good understanding. And sometimes I get an intuition, "Hey, maybe there's an opportunity here. Maybe we should start making here." Then when Matt comes in and we start collecting data and looking if there is an opportunity, or maybe I just did the same thing I did with BitMEX and there's no opportunity. Vijay (dYdX): It's kind of like the market exploration and then the market ramp up itself, once you guys have identified compelling opportunities to really double down on.

Josu (Sixtant): Yeah. It's like that. Vijay (dYdX): Switching gears a bit. Wanted to talk a little bit about how you guys think about risk management overall, and technology as well. Could you speak a bit, Matt, to how you guys generally manage your inventory and risk, and what role credit plays in that?

Matt (Sixtant): Sure. Well, obviously first of all, everything is automated so we're hedging things in real time. But another thing that we try to do is actually maintain a pretty conservative use of leverage. Strategically, we do think at some point when low hanging fruit is exhausted, it might make sense to figure out how can we take exactly what we're doing right now, and figure out how to lever up safely. But right now, we stay in the very low typically 2X or less, overcollateralized if possible, for leverage. That helps us out a lot when we're thinking about risk. But also, I would say our most explicit risk calculations come into play when we're looking at trying something new. If I look at some DeFi protocol that has just launched and maybe the contract is forged from someone else, but it's a little bit modified and we're trying to figure out what percent of the fund are we going to put in there, or what percent of our assets are we going to put in there. I think that's where we're probably most explicit about managing risk. But managing inventory is baked into how we think about all of our trading strategies. Maybe we have a strategy that's slightly riskier where we end up long a foreign currency and short dollars, so we have to think about, "Okay. Where are we getting our price feeds for this currency? When is it going to start and stop trading?" If we see an implied FX rate for that currency on a crypto exchange which trades 24/7, is that really just telling us that in post-trading hours the market has decided that the price of the currency has changed a lot? Or is it an opportunity to trade? I think on the one hand, the way we think about risk for inventory is really baked into how we think about the strategy while we're building it, and while we're having these back and forth iterative sessions. And on the other hand, risk for collateral and credit, for the most part our strategies are overcollateralized on the one hand. Or if we're going to be doing something a little bit more risky, really think about what's the max draw down we can take? How much are we willing to lose?

Josu (Sixtant): But in general, I would say we're not taking enough risk. We could actually maybe be more efficient and taking a little more leverage. The way we approach risk is, "Okay. We are not taking that much risk, so what can we do or what changes can we make? Or what checks can we add to the system so we can take a little bit more leverage?" It is not like, "How do we mitigate risk to not get liquidated?" It's more like, "How do we take more risk?"

Matt (Sixtant): In a sense, yeah. I would say that going through different events, obviously March 12th we came out untouched by that. I think we even made a little bit of money when futures were in backwardation, though I'm sure we could have made more if things hadn't crashed, or if everything had been a little bit more stable. And so when we start increasing these limits, we are definitely trying to look at what are the tail cases? Because if there are tail cases in markets, they're going to happen in crypto. And they're probably going to happen to us. We always have positions open.

Josu (Sixtant): Yeah. There is some adverse selection on our side. If an exchange goes down and the orders are there and the price is crashing, we're going to fill to buy and the price will keep crashing. And when the exchange comes back up, maybe we're down 40% on that position. Putting limit orders is just like selling options, so you have to be careful with that. Vijay (dYdX): And speaking of, on that note we've had a lot of the rapid price increases and flash crashes recently in the past few weeks. How do you guys ensure that you can continue to provide liquidity in all market conditions? Or in other words, what's your playbook during a market crash, and the steps that you follow?

Matt (Sixtant): I'm curious if this is the same for you, Josu. I think about it in two ways. There's risk mitigation mode and then there's double down, things are going great mode. And for me, the distinction depends on whether or not all the exchanges that we need to trade on are working. Or if one exchange isn't working, if we can just partition it off and say, "We're stopping any strategies that depend on this exchange, and we can keep going with everything else." Great. Typically, I look at how the exchange is working, maybe what does request latency look like. Because depending on how exchanges are implemented, you might end up in a situation where you're like, "Well, I'm placing orders and they say they're being placed, but maybe they're not actually." And they're in this queue and the queue is just stacking up. And that's one of the situations where what Josu said could happen. The exchange could go down but keep consuming their queue of pending order placements, so then your order gets placed and matched all within that queue without you knowing. And that's obviously bad. Josu (dYdX): Yeah. Latency is four seconds, so what do you do? Do you keep placing and run with four seconds latency? You can open up the spreads but will it be enough? Should you shut down the exchange? It gets complicated.

Matt (Sixtant): It definitely gets complicated. But I think that's another spot where maybe our little DSL, or just our general approach of trying to do things maybe flexibly is helpful. Because when we decide we don't need to be putting out fires, an exchange isn't crashing, things are basically working, it's just very volatile. Usually we start trying to figure out, "Okay. What tweaks to what we're doing right now would make this a little bit better? Or what tweaks to what we're doing right now would make us... " Maybe sometimes our orders are jumping back and forth a lot, because we're seeing our price to cover exposure is changing rapidly. How can we smooth that out or maybe how can we add one off complementary strategies, that are quoting orders in a complementary way to what we have there already? The recent market crashes have been very smooth for us. And obviously, there's this ongoing project for us of trying to figure out what are all the possible things that could happen to us in one of these crashes, and figure out how to handle it in a future-proof way in each case. Vijay (dYdX): It's kind of like you have to know what you don't know first or learn that.

Matt (Sixtant): Yeah. There are tons of lessons. They're directional, so at least you have a 50% chance that you make some money on your lesson.

Josu (Sixtant): And most of our risk are edge cases. Maybe it's the first time that it happened. Every crash, we see something happening for the first time. Exchanges sending us weird messages. We see all kind of... You have to be prepared for these things that you don't know. These unknowns. And that's the hardest thing. We try to mitigate. And also, we've been growing really fast this past year, so also having a larger size also allows you to... Even if you take a hit on one exchange, it won't really affect you that much. And you are making money on other exchanges, so that helps, too.

Matt (Sixtant): One thing that we have that helps a little bit with that, but I don't think we've really used it to its full potential, is the way our system works. The state of the system or what the strategies see is entirely reproducible from the stream of messages we get from the exchange. And we're rigorous about logging them in a certain format, so that after the action dies down... Typically, we'll do this for a single exchange where we have no idea what happened there like, "Why were they sending us these messages? What could we possibly have done to tease out the real thing that was happening from what we were seeing broadcasted over the wire?" We can go back and replay those messages and try and simulate the situations to see how we could have done better. And I will say actually that dYdX has had the best uptime of any exchange that we're connected to. So far, we haven't had any weird... Sometimes from other exchanges we'll see an error message that's faking us out in one way or another. We'll be trying to place an order and they'll say, "Your withdrawal cannot be processed." What could have possibly happened to make them say that thing to us? And what could we try differently to maybe make it work, or to at least cancel that order if we didn't know it got placed or not? Vijay (dYdX): There’s often a good amount of time you spend on retracing the breadcrumbs. There's some detective work there for sure.

Josu (Sixtant): Yeah. We spend a lot of time on that, definitely. And it's super useful, because sometimes we also uncover errors on our end or things we can improve.

Matt (Sixtant): And the devil is in the details, too. I think those are the moments where it really shows whether or not we have invested the right amount of time into making sure our infrastructure is really well built and really precise. Because probably we could cover like 80% of the cases that we're trading in, with a much less complex trading system. But those are the moments where we actually figure out how large do we need to make the scope of this, and how many cases does it actually need to cover. Vijay (dYdX): Very cool. And the last question I had before turning it back to David is, you guys had mentioned in the last couple of days that you guys had offered to help on the liquidation of the SHIBA tokens. The $1 billion of SHIBA tokens that Vitalik had donated towards the India COVID relief effort. And awesome gesture on both Vitalik and your part. But curious kind of how would you guys go about something like that just mechanically, in a few words?

Josu (Sixtant): It's complicated. We have talked about this, and I don't know. We have different approaches. One of the things that helps is that there's a lot of liquidity right now. There's 1.2 billion traded on the Binance spot books for SHIBA. I think there would be a possibility there, but it would be very interesting. I think we would set everything aside for like 24-48 hours and really figure this out. Because it is something that would be, as I said, a really interesting project, but also a little bit complex. Because you want to get the best execution possible without I guess spooking the markets. You also need to make sure how much do you sell, because if you try to sell everything, you'll really spook every trader and you would be better off selling 100 million rather than a whole billion. I'm saying billion in air quotes because you cannot really liquidate it for one billion, even though that's the implied price at the moment. But I don't know. It would be a super interesting project.

Matt (Sixtant): Yeah. We'd also start prototyping immediately. We'd start selling small amounts and seeing what's happening. One interesting thing there, too, is there's no... A typical execution strategy would be a VWAP where you're looking at previous volume patterns to figure out what time of day can the market bear the most selling pressure, in this case. Whereas obviously, historical data is going to give us no indication of what's going on. Though maybe we could look at trading hours.

Josu (Sixtant): The question is what's the real value of that billion dollars in SHIBA? Is it 50 million, is it 100? And how much would execution help? A bad execution could turn that billion into 10 million, but a good execution... And what are the community of Shiba? People are bidding that up, so the price crashed but you’re just recovering. Maybe people are willing to buy that liquidity. Who knows?

David (dYdX): Got it. The last section is really looking ahead. Obviously, with the rise of AMMs we've seen a lot of new innovations in DeFi, and a lot of people say that traditional market makers are becoming disintermediated by liquidity pools. It sounds like you guys are active on a number of centralized exchanges, and dYdX which operates an order book type model. I wanted to know if you had any thoughts on Uniswap's V3. In a lot of ways, it returns to an order book principle. And so just curious to see if you had any thoughts on that development, and what you see or how you see the role of traditional market makers in DeFi evolving going forward.

Josu (Sixtant): We are not big fans of automatic market makers. It is a really cool innovation and it is good to see. And they make sense in things like Curve where you are trading between one stablecoin against another. And also, it is cool to launch. You get instant liquidity if you are launching a token that nobody has heard about. It fills some needs and that's really cool. But I think that for a very liquid market like ETHUSD, a centralized limit order book is always going to be more liquid and better in 99% of the cases. It was interesting to see that V3 launch, because they are trying to find that in between place where they have some qualities from the automatic market makers but also some good qualities from limit order books. I don't know. It's interesting to see. And the other thing that it allows is that anybody can be a market maker now. That's also cool that you can use your tokens that you had in your hardware wallet, now you can actually add liquidity in the market and give some value back. That's cool.

Matt (Sixtant): It feels like the need that it's addressing is in a large part credit, as opposed maybe to supporting price discovery. I think there's room for both there. But I personally am waiting to see a DeFi solution that involves options. Because I think those lean into the idea that there's going to be latency, there's going to be maybe front running. There are going to be situations where it's not all about speed, but rather about finding the best price point for the market. I'm just not sure if people have appetite, because it's more of a clumsy UX. Maybe someone will figure out the UX for an option that makes people feel happy with it. Because I know Gemini launched their block trading options way back in the day, and they seemed like a great idea to me but nobody really used them. I could see a similar thing happening in DeFi, where it's like, "Well, this one thing is instant-ish and this other thing, I have to think about." How long it's going to take to execute and maybe my bid won't be included or will be included, so it's a little bit clunkier. But I think as a price discovery mechanism and as a transaction mechanism, it would be really, really cool. But definitely liquidity staking is not going away. People are hungry for credit.

David (dYdX): Super interesting. I think the auction space will likely see a lot more development and activity going forward, as people iterate it with different types of models for liquidity provisioning. Josu, just to follow up on a point you made earlier on testing out different DeFi protocols. I'm curious from Sixtant's standpoint, other than providing liquidity, have you guys been active in participation on governance?

Josu (Sixtant): Not at Sixtant. I participated in... I like YAM. It doesn't take itself very seriously. And I’m also in some Discords like UMA, but not in Sixtant. The truth is we haven't had time. We are a small team, we are super focused, and this bull market is really taking all our time. We've been turning down market making contracts because we are happy with the clients we are working with, and we really like to give great service. At the moment, we don't have that much time to be involved in various projects. The report you just put out that we did for dYdX. We are happy to keep doing those things and maybe getting more involved in the dYdX community. But it wouldn't be something across the board like we are collaborating with 10 different projects.

David (dYdX): Awesome. And then the last question I had before turning it over to the community, who also submitted a few questions, is really forward looking. Just curious to get your thoughts on what do you think is next for DeFi, and what would you like to see happen, and the overall market development?

Matt (Sixtant): What's next for DeFi? I don't know. I want to see more Layer 2 models obviously, because I like the trading experience with order books. I like trading quickly, I like trading with a lot of liquidity, so I think that's cool. Once you have an index for something you can do a whole lot with it, which I think we've seen on FTX listing equities, like spot and futures markets. Or equity tokens spot and futures markets. I think it'd be cool to see DeFi do maybe more of these things where regulatory arbitrage becomes more important, or more useful, or provides a lot more compared to a centralized alternative. But I'm just stoked to see all the experiments that people are doing. I think the only thing, sometimes I'm skeptical when experiments are prematurely touted as, "We finished. We understand this now and we never need to think about it ever again." But I'm constantly amazed by the things that people are thinking of, so I enjoy looking at them and then reading about them after they've been launched by people smarter than I am.

Josu (Sixtant): Yeah. I think I agree. I really look what's next. Four years ago, the most difficult thing to understand was Lightning. How does this work? Just the Lightning network on top of Bitcoin. And you could more or less understand everything that was going on in crypto. Right now, I don't know half the projects that are going on in DeFi. I try to get DeFi into UMA, Bancor, Synthetix, and all these projects. They have their own nuances. Then Uniswap V3 launches. I try to go there to provide liquidity and the UX was a bit confusing. I wasn't really understanding how to provide liquidity, and I didn't have the time to actually invest one hour seeing what's happening in Uniswap. What's next? I would focus on what's happening right now, try to understand everything. And also, a super cool thing that I think that Andre Cronje is working on is how are we going to interconnect all these? All the DeFi compsability. I think that's the coolest thing that's already happening. We will see more of that in the future, but already what's happening is really cool.

David (dYdX): Awesome. I guess just being mindful of time again, we can take a few questions from viewers. We've already received a few that we'll start walking through. I think this goes back to one of the prior points we discussed, which was dYdX, versus other DEXs, versus other centralized exchanges. Could you share your experience integrating with dYdX Layer 2 perpetuals API? How would you say it compares to other DEXs or centralized exchanges more broadly?

Matt (Sixtant): I had so much fun. I haven't had a chance to work on anything nearly related to cryptography in a long time. And since we write everything in our own trading system, and it's an esoteric language, it's not usually compatible with clients in Python or JavaScript. We ended up writing the whole integration from scratch. The reference implementation that you guys put together was super easy to follow, very clear. Overall, I had a lot of fun integrating that. And I think the cool thing, the thing that I was anticipating being difficult at first, was needing to sign transactions for order placements or cancellations. Or maybe even have to sign some sort of potential transaction that could later be broadcast. Turned out I did not need to do that, and that made the whole thing super easy. Really the account setup is the part that requires a little bit of smart contract interaction on the deposit. But from there, it's pretty much like trading a normal centralized exchange, just with a little bit of extra special hashing and signing for the messages. Really A+ experience, I would say.

Josu (Sixtant): Yeah. Once it's integrated... Matt did all the integration. I'm not technical at all, but I'm just operating the system. From that perspective, it's just like any other exchange. We don't need to add any additional parameters, just trades to go. We set the price and that's the price it executes at, and everything works just fine.

Matt (Sixtant): It fits really well into our abstraction layer for exchanges. And that was actually something that was making us hesitant to dip our toe in the water with DeFi with other exchanges. Because we were thinking, "Wow, this is really interesting. We want to try it, but also it's clear that some of these things will not fit well into this abstraction layer that we have now, where we treat every exchange as basically the same." We have to develop this whole separate infrastructure where we need to take into account maybe we're paying fees to cancel the order. Along with more minor challenges, like in the Layer 1 version dYdX there are things like EIP 712 hashing, which is sort of standard but not 100% standard. And there's an implementation of the Python library, but there are some parts of it that say, "Don't use this code because it might not work." Or you found a partial implementation that sort of worked. There are obviously these other minor things that make it just harder to interact with DEXs that lean heavily on L1.

David (dYdX): Awesome. And then the last question we have time for relates to one of the comments, Matt, you made around Layer 2s. I'm curious if you have any thoughts on integrating with StarkWare and the Layer 2 system on dYdX. And if you have any views on some of the other Layer 2s in the ecosystem, and some of the challenges with trading across different Layer 2s more broadly.

Matt (Sixtant): Sure. To be honest, I don't want to comment on other layer twos, because I haven't looked at them at all, so I couldn't tell you how similar or different they are, or what pros and cons might be.

Josu (Sixtant): Same for me. I've used stuff here, but just as a user and I don't have an opinion there.

David (dYdX): Got it. And specifically for the integration with dYdX, any views on how easy or difficult it was to incorporate a Stark Key and how that impacted development timelines?

Matt (Sixtant): Well, first of all I will say that I started using the Python client library that you guys put together day one, and it's working perfectly out of the box. I think that covers the 99% of cases for most people. But if someone did want to write that client library themselves to interact in a different language, a lot of the StarkWare stuff is... Well, first of all the reference implementations are really well documented, so that made it faster. Because instead of thinking about what needed to get done and then just trying to generate it from nothing, a lot of it was porting code over from Python, which is fairly straightforward. And the signature scheme that StarkWare uses is very similar to a normal elliptic curve digital signature algorithm. If you have that implemented somewhere, if you have a reference implementation, it shouldn't be too difficult to look at it and figure out there are just these minor tweaks that need to be made. And for the generation of some of the signature parameters, they're using a variant of the main electric curve digital signature algorithm that is supported in the Python and JavaScript client libraries, but might not be supported in more boring languages. If you look in C# or Java, the different bouncy castle crypto implementations don't have it. We did end up writing a bit of custom cryptography for generating the inputs to the signature algorithm, as well as implementing the custom signature algorithm. Overall though, it was a very pleasant experience. Things were well documented, which was really all that was necessary.

David (dYdX): Awesome. Matt, Josu. That wraps up this AMA. Thank you so much for all of your time and answering all of our questions. For the viewers, hope you enjoyed the AMA. You can follow us on Twitter at dYdX protocol and at Sixtant.io. And then if you haven't traded perpetuals, you can start trading perpetuals on dYdX on Layer 2 at dYdX.exchange. Thank you so much for your time.


About dYdX

dYdX is the developer of a leading decentralized exchange on a mission to build open, secure, and powerful financial products. dYdX runs on audited smart contracts on Ethereum, which eliminates the need to trust a central exchange while trading. We combine the security and transparency of a decentralized exchange, with the speed and usability of a centralized exchange.