ZKPodcast: dYdX’s Antonio Juliano on using STARKs for Scalability

20 May 2021 · 54:29

Anna Rose and James Prestwich talk with Antonio Juliano, founder of dYdX, about the derivatives exchange's move to a StarkEx-powered layer-two infrastructure. Juliano brings a product-focused view to scalability technology, explaining why dYdX chose StarkWare's STARK-based rollup approach over other layer-one or rollup alternatives and what that shift enables on the product side as dYdX becomes more decentralized.

Speakers

Topics

Transcript

[Music] welcome to xero knowledge i'm your host anna rose in this podcast we will be exploring the latest in zero knowledge research and the decentralized web as well as new paradigms that promise to change the way we interact and transact online [Music] this week james and i are chatting with antonio giuliano founder and ceo of the dydx project we look at how dydx are leveraging starkware's stark technology stack to create a different kind of zero knowledge roll up from the zk rollups we have featured previously

we discussed how the dydx system works what went into their decision making around which l2 construction to go with the goal of dydx and how their new system aims to get them there but before we start in i want to let you know about an event that i'm running next week may 19th it's a joint zk sessions plus zk jobs fair zk sessions is a series of monthly events i've been doing since the beginning of this year this particular zk sessions is all about zk languages and it will feature short talks from the teams who are developing the domain specific languages you need to build with zero knowledge proofs so if you are a dev thinking of jumping into the zk space but you're confused by all the options this is definitely for you right after the zk sessions event which should last

about an hour and a half to two hours we will be hosting the second zk jobs fair again it will be on gather.town and you are welcome to come by and just get to know the teams who are looking to hire new talent with every zk jobs fair i'm releasing a new zk jobs board here you can see open positions from many of the best teams in the space the jobs board is public be sure to check it out and if you do send an application just let them know that you found out about it through the zk podcast i also want to take a moment to thank this week's sponsor of the podcast leased authority leased authority is a leader in the security of distributed systems they provide security consulting services develop open source products and contribute to the advancement of

learning and research in the field in addition to their security reviews of innovative projects such as chia network mina loopring and falcoin this may they will be releasing a white paper on zcaps or zero knowledge access passes zcaps adapted from privacy pass is an anonymous token-based authorization protocol that facilitates an online exchange of value while disconnecting the necessary payment data from the day-to-day usage service data of customers they've implemented zcaps in private storage which is a cloud storage service designed with privacy and security features to give you control over who has access to your data private storage will be launched just after the white paper release

sign up for leased authorities newsletter to be notified on the release of the zcap's whitepaper private storage security audit reports job openings and more visit leastauthority.com newsletter to join the mailing list i've added the link to this in the show notes so thanks again leased authority now here's our episode all about dydx [Music] so this week james and i are chatting with antonio giuliano who's the founder and ceo of dydx welcome to the show antonio hey thanks so much for having me hey james hi anna how's it going well good i want to find out first what is dydx maybe give me the high level description of what that project is

yeah absolutely so dydx is a decentralized exchange and we're really focused on advanced financial products and specifically derivatives right now our main product that we have on the platform is this thing called a perpetual contract and this is financially the product that was really popularized by bitmex and now is extremely popular in the crypto space it's the most popular product by volume in the entire space it does more volume than everything else in crypto put together on perpetuals and that's kind of the main reason why we're so focused on it specifically what perpetuals are they're a type of synthetic contract which can give you price exposure to

any asset all you need is kind of some collateral in the system and then you can synthetically trade any product that you might want to trade the main way they function is kind of based on this core component called a funding rate which is a dynamic interest rate that's paid between longs and shorts but anyways the the main reason they're so popular is because they can be traded with really high leverage so this is where you see the 100x leveraged products of the world and so and not everyone trades with that high leverage but leverage itself is a really powerful concept because you can kind of just come to an exchange with a certain amount of money say a hundred dollars and you can start trading as if you had multiples of that amount of money so you could start come to the

exchange with a hundred dollars and start trading as if you had a thousand dollars or potentially even more based on how much leverage you're willing to take on and that's the reason why these products are so so popular is because uh they allow traders to trade as if they had more capital cool where's dydx come from because it's kind of neat it looks really like it looks like a bit of a function or something what is it yeah absolutely so this kind of belies my background a bit um but the first thing that i thought about when i thought about starting a company that built derivatives was derivatives in the mathematical sense rather than the financial one so my first company i guess like i thought about the name for like months and i couldn't come up with anything but somehow some way or another

when i thought of derivatives i just thought of you know d y over d dx as in differentiating something in math and also it was like four letters kind of sounded like an exchange like a gdax or like a binance or something like that dydx so it seemed like the name fit nice and also like that i think your logo kind of shows that too it has like this special d yeah it's like the special d it's like lowercase delta in greek or something nice so are you a dex yeah i guess it depends on your definition of dex um but i would call us basically what's known as a hybrid exchange which kind of means we have some centralized components to the exchange and then some decentralized components to the exchange our centralized components we run our

order book and our order matching system in a central way to run on servers like a normal centralized exchange but importantly we run on smart contracts on the ethereum blockchain and this is where you get all of the non-custodial trading all of the really big improvements in transparency that come with a decentralized exchange but it kind of all runs through this central order booking order matching system as well so the smart contracts exist to make sure that the order matching system is behaving correctly and that all its actions are transparent yeah that's basically right and also uh that we don't custody user funds when they're trading on the platform you can always just go directly to the smart contracts and trade or withdraw your funds um it can't be censored from doing that

so in what you described though like you're saying this originally existed on l1 all on l1 and now you're moving to become more of an l2 setup what does your l2 look like like we you know we kind of said it's not a zk roll up so so what is it yeah uh so so i think it's basically by definition a stark based roll up uh we partnered with starkware who is effectively providing all of the based proofs that our system runs on one important advantage and one important distinction is that we're running on starkwear's rollup mode which means we use layer one ethereum data availability um you know similar to an optimistic rollup or something like that

and therefore the system is entirely non-custodial because all the balances are stored on chain you can always just go to ethereum to be able to withdraw be able to trade and that's kind of where we get a lot of the the dex improvements from how does a stark like version of a zk roll up like what does that mean actually because i thought there was a reason that stark l2s were built slightly differently because of the limitations of starks yeah that's a great question i'm probably not the most qualified person to answer this james probably knows a lot more than i do um but uh my my impression is basically that starks are a pretty good improvement in kind of the scalability um and kind of the proving times and the proof sizes over what existed in like the very

earliest zero knowledge proofs um and that's why star query is using them and it's really focusing on them right now is it's the technology that gets you the most amount of scalability and also the most amount of expressiveness in your programming language that's available right now so for the you know new dydx layer 2 this is more similar to zk roll ups but powered by starks and a little bit of a departure from the earlier stark x systems right yeah that's exactly right and the main difference uh starkware offers two different modes which they call roll-up mode which is what i talked about with volunteen dail availability and what we're using and then they also offer what they call validium

which is effectively like a federated group of data providers promised to provide your data to you and i think there are trade-offs with these obviously it costs more in gas fees to publish all the data on chain and do in full roll-up mode but also of course it is more decentralized as much as decentralization is a spectrum now as long as you trust ethereum and you know you can run an ethereum node you can always get your data and we thought that was something that was important to be able to provide to our users and we were happy to pay the the modest i would say increasing gas fees to put all the data on chain to be able to do that i think that's a really good way of putting it is the the core difference

between a roll-up and a plasma or volidium is where the data is and whether any user can go and get that data at any time so last year i actually had will harborn from diversify also my co-founder at the xeronaut validator and tom brand from starkwork come on the show and explain the diversify setup the way that they were working with starkx and i kind of want to like i remember we walked through the federated system we under like we went through like what the committee looked like and everything i i want to understand a little bit more what it looks like now like you're saying that you kind of use the roll-up version but what does that like what does that actually mean yeah absolutely so at a high level the

data that exists on our system that we're using with starkware is all the user balances and also a bit of data about which particular orders have been filled and things like that but that's the only data that you need to be able to reconstruct the entire state of the system so whenever an order is filled the only thing that's actually going on chain or into starkware's system are the actual matches or the actual trades orders that are just placed but never filled are not actually going through starkware's system and that's kind of what i was talking about with the the off chain order book and order matching system that we're running so okay whenever a trade happens obviously there are two counterparties there's a maker and the taker

and both parties balances will be updated so the data that's actually going on chain is all of the accounts whose balance is changed in the current stark block only you know those accounts have to actually go on chain because of course we've been publishing data since the beginning of the system and you can always go back in time on the blockchain and be able to reconstruct the entire state tree with just like the delta balances basically so that's what goes on chain when i say on chain it uses uh the call data effectively for the transaction which is not accessible by smart contracts but that's okay because all we really need is people

that are watching the blockchain to be able to reconstruct the state and it's a lot cheaper to publish data there than it is to a smart contract state but effectively the smart contracts are requiring that whenever a new stark block is published that the delta data for all the delta balances is published in the call data for that starkware block to be mined i think you pointed out a really interesting property of the validity proof based uh rollups versus optimistic rollups you said that the only thing that goes on chain is the deltas the changes in the account balances and the orders don't go on chain this is

one of the like most compelling advantages of validity proof systems is that you can drop all of the extra data you can drop all of the orders because you don't care what they were as long as they were matched correctly and the validity proof proves that there were orders that match these state changes that match these uh updates all these trades does that mean like in the optimistic roll up you'd actually have to if you were to try to create something similar you'd have to include all the orders even if they never went through um you would have to include all of the orders that were matched that went through oh that did go through but you are doing that anyway aren't you yeah it's actually an important difference and i think it's a good call out by james because

if you kind of look at like the distribution of number of trades on an exchange it's really really top-heavy like there are market makers that are quoting on the exchange and you know say a market maker may do thousands of trades in a given batch but actually we only have to publish like one delta balance for that market maker so it's actually a really important nuance but something that gives us a lot more scalability do you also find in these setups that there's a lot of trades happening between kind of the like the same actors back and forth so like you also wouldn't have to publish each one of those exactly oh interesting so the advantage of the you know zk model is that you prove that those orders all existed

and you don't have to show them in the optimistic model you have to put all the orders on chain two so that anyone trying to prove fraud can show the orders and can have a guarantee that those orders are available to be included in a fraud proof so the zk model here gets a you know pretty big scaling benefit because it can just drop all of that information entirely what made you make the choice in this case like you must have been looking at all the l2s and and evaluating like how they worked do you feel like this one fit your particular use case and needs the best or was there yeah like what was going into that evaluation i definitely think it was a combination of both starcraft just being

at the real forefront of production ready scalability technologies i would say and also our unique use case we kind of talked about the advantage that we get as an exchange of just having to publish our delta balances rather than all the trades on chain which is a really big deal one of the other things that you know is unique about dydx which we touched on at the beginning is we're a hybrid decentralized exchange which means we have our central matching model in central order book already and that fits really well with starkwear's current model and emphasis on currents but their current model is basically kind of a single central prover to the stark system

and one of the things that we're going to be working on going forwards is being able to fully decentralize our system and that maps really well with starkware's own roadmap to kind of decentralize their prover network because the thing we don't have right now for trading specifically is we it's not fully censorship resistant basically on the trading side it is fully censorship resistant on the withdrawal side like you can always close your positions and you can always withdraw um but we could say you know we could basically censor users if we want to from using our product or kind of our website and going through our central liquidity because of that central part of the hybrid yeah exactly the order matching engine exactly yeah so i think starburst

current system first of all is really general but is an especially good fit for exchanges that are operating on this hybrid model which both us and diversify currently do so i think that's some good empirical evidence of that maybe taking a step back and talking about our thought process for uh choosing a layer two in general at a very high level there were three main classes of things that we considered which is probably going to be obvious to everybody who's paying attention to this podcast but the first was other layer 1 blockchains that are not ethereum second is optimistic roll-ups and kind of optimism is the the leader there and then third is stark-based in stark where we think it's the leader there for sure

kind of going through these one by one in terms of why not another layer one blockchain right now this isn't a super original thought but like just the ecosystem for building decentralized apps on these other chains is not quite there yet like the wallets are really subpar in general uh the cross chain technology is like how our user is going to get tokens over if we move to another layer one chain james is making a face when you do that because this falls on his shoulders partially my fault [Laughter] yeah exactly like i mean that's the point right like people are working on it um and i think there are a lot of great things being worked on but at a really high level like we needed to scale

right now basically because our users were just getting crossed by these gas fees the amount of gas a dydx transaction uses compared to a uniswap transaction or so on layer one is roughly like five times higher or so um so our users were having to pay a hundred dollars in gas fees pretty regularly that would literally spike up to thousands of dollars in gas fees at the times when uh when the gas price was going nuts and that's actually the time people most want to trade to um so who's going to use it exchange we have to pay hundreds of dollars in fees for to make a single trade not that many people um so we needed to solve it like right now basically but kind of getting back to the question of you know why not

other layer ones just to finish there and other people have said this too but also like the developer environment there is you know is nation i would say like there's a lot of exciting stuff going on there but you know a lot of these other chains have their smart contracts written in rust which is fine like i'm actually of the opinion that like you know any good developer should be able to write smart contracts in any given language but you know there's not quite things like uh you know truffle or equivalents or like hard hat and stuff like that to be able to develop on those chains quite yet so we didn't think the time was was right to move to a different layer one quite yet and then we kind of touched on this before but like there are several advantages i think of use for us of using starkware

over using optimistic rollups the first is you know increase in scalability um the second which is basically the same thing as other layer ones is production readiness i mean just look at uh the the apps that have been live on starkwear you mentioned this before but diversify has been live on software for the past year or so which gave us a lot of confidence that they would be able to build a production grade system for us now and you know not at some point in the future and then the third thing um which is an interesting point as well that i'm sure we can dive into is kind of the withdrawal times on uh on optimistic roll-ups are usually on the order of a week or so whereas the withdrawal times on uh on zero knowledge roll ups

it really just depends on how much gas you're willing to pay and how frequently you're willing to publish the batches on chain for us we currently have that set to eight hours but likely it'll be uh lower in the future but being able to withdraw not that time period is a really big advantage for users um you can of course on the withdrawals use kind of a central liquidity provider to basically front the withdrawals for the system and we're actually doing that right now on starquers uh system so users of dydx don't even have to wait that eight hours you know they just it's as fast as withdrawing from any other decks or a centralized exchange because we're kind of fronting the withdrawals there but the thing that you have to think about if you're running one of these central withdrawal providers is how much capital

do you need to be able to run one of them and we were kind of thinking about it and we were like okay with optimistic roll-ups uh you know we need a week's worth or whoever's providing the capital needs a week's worth of capital of withdrawals on the entire exchange and even for us at our scale that's quite a lot of money it's like probably like tens of millions maybe up to like 100 million dollars or so and as we scale like imagine trying to do that for an exchange that's aspiring to scale to like a binance uh level scale or something like that it's quite high um whereas it's definitely tenable for us to to be able to front the withdrawals for you know currently we're doing eight hours as we scale hopefully we'll shrink that time even lower so the withdrawal provider only needs

like capital proportional to an hour's worth of withdrawals on the system quick question uh what is the reason for the eight hour delay right now it's purely a gas cost optimization thing um whereas you're paying like you know if you did every hour you'd have to pay roughly eight times more in gas costs it's not exactly eight times more because basically the gas costs are i believe it's around 5 million gas right now uh flat fee to like you know prove the the stark uh proof and then plus like all of the data that you're doing and kind of the validity proofs okay so it's it's not a question of like you need eight hours it's a question of what's the right trade-off for uh the cost of operating the system

and as the system grows you can do that more and more often yeah exactly and that's purely just offset by the trading fees that we're making so as hopefully volume increases and our fees increase so it makes sense for us to publish them more frequently this is uh i think one of the interesting trade-offs of starks versus snarks is that starks have a higher base cost for these sorts of things that actually leads me to another question though so you've kind of done the rundown of what you you chose not to do like you chose not to do other l ones you chose not to do optimistic roll up but why why not do a zk roll up like the zk snark roll up and i feel like what we started with was more like you know the comparison to optimistic

but not necessarily to snarks so yeah like you must have looked at all of those options as well what made you make the call yeah we definitely did look at all of them i think the main reason for choosing starkware was a combination of production readiness and what we deem to be like professionalism on their team not to say you know i just think starkware is like the most professional and has like a really high quality team and empirically they had been running with diversify for a while so like i said that gave us a lot of confidence to go with them so we've been talking a lot about why dydx decided to go with you know a zk roll up using starks and a big part of that was that the limit order book that you are running the

order matching system kind of necessitates the choice is the order matching system works better with a zk roll up can you talk a little bit more about why dydx built a limit order book when a lot of the dex activity in the space has been moving towards automated market makers absolutely so i think at the highest level it's worth talking about what our goal is at dydx and our goal is to become one of the biggest crypto exchanges period but on kind of a three to five year time horizon and that informs a lot of the decisions that we make i think so if you want to be one of the biggest crypto exchanges of course you must

support the biggest marketing crypto uh which is perpetuals right now one of the interesting you know metrics on perpetuals is that just in the past year they surpassed all of the rest of volume on everything else in crypto combined and we think that they and kind of more broadly the derivatives market on crypto is only going to grow from here so that led to our choice on you know y derivatives addressing your question on why order books as opposed to automated market makers this is not a super original thought but i subscribe to it and that's order books i think are more efficient for building liquidity than automated market makers are of course their strides to improve this like the stuff that unit swap v3 is doing

with nothing stuff on their toes but i would i would kind of call that like a hybrid like a m like order book because like you can like place and cancel in different levels and stuff like that which i think is really cool actually one of the ways to look at it is changing the amm to simulate an order book yeah it's kind of a little bit in between and i think that's awesome and like there's trade-offs like you know all over the spectrum but answering the question of why order books like for a given capital amount you can just get much more liquidity much more depth on the book with an order book than you can with an automated market maker and to give people a sense right now roughly i think unislop has about 800 million or so locked up in their eth usdc

pool and that translates into about uh two million dollars worth of depth within one percent slippage um and that's the same depth we have basically two million dollars of depth within one percent uh but we only have our market makers quoting with like two million dollars um on the platform um and of course uniswap will improve and you know of course dydx will also improve the amount of capital and like market makers that we have as well but just we think we're going to be able at a really high level to build a much superior product experience with order books than we are with automated market makers specifically for the call it like top 50 or top 100 markets and that's like a really important point actually and again this isn't a super original thought but i think the thing that automated market makers are great

at is kind of quoting on the long tail of markets i mean just look at the number of markets that uniswap supports versus even like a binance or like an ftx or something who do great execution on being able to list the long tail of markets with an order book based model and automated market makers that's the real killer use cases they're just better for supporting like the long tail of markets because it's so easy to provision liquidity for them but you know going back to what i led with like what is our goal here is to become one of the biggest crypto exchanges so you have to like form an opinion on which one of these two is there actually going to be more volume in kind of like the top call it like 100 markets or so by volume or you know 100 plus markets

and it's certainly an open question as to like how many crypto currencies will there be um with tons of volume and what will the volume distribution look like but currently right now just bitcoin perpetuals like just that one market is almost bigger than everything else in crypto put together um so it's very top-heavy in terms of volume towards like the top coins and that's why we're focused on order books because we think for the foreseeable future most of the volume will be concentrated in these top markets and we can build a better product by serving them with order books interesting uh do you have a bitcoin perpetual dominance uh index that i can track yeah i think there probably is one on coin gecko or something like that

uh i i don't know what the current number is i think it's like 40 of like all volume and crypto is on bitcoin perpetual so incredible yeah that actually i mean you just spoke to this this question that we had which is about the selection of assets that you've chosen to list it sounds like you haven't quite decided how wide you're gonna go or or have you like what you just said you you don't exactly know what what the future holds for this like first of all how do you even make these decisions because that will change right those top tokens are going to change dramatically over the next few years anyway probably yeah absolutely and i think this is a good segue to one other really big advantage we get on our layer two system but i'll kind of talk about historically how our layer

one contracts were set up and how that really limited us and the number of markets we could support but on our layer one perpetual contract they only supported what's known as isolated margining and that means for every different market you might want to trade on you have to put down collateral separately for that market so like if you want to trade both the bitcoin and eth perpetuals you got to put down your 1000 you know die or whatever of collateral on the bitcoin perpetual and then your thousand on the eth one separately so this just really limits capital efficiency for traders and especially it really limits capital efficiency for market makers because market makers want to trade on every market

that the platform supports but with isolated margining say dydx wants to support you know 100 markets in the next year market makers would have to deposit collateral 100 times uh which is obviously pretty ridiculous so that really just limited us in the number of markets that we were able to support on the platform to the point where and to give people a sense we literally only had three perpetual markets ever on layer one ethereum for this reason and it was what did you call it bitcoin yeah we had bitcoin perpetuals uh eth and then uh chain link as well chain link was the choice yeah why why chain link well it has a good amount of volume and also there's a good amount of overlap with the the users uh

that we have which are oftentimes more defy centric got it i mean i actually wanted to ask you that before when you were talking about these gas prices getting crazy was that like during defy summer that you really found this problem to be unmanageable exactly and like yeah mid to late 2020. and consequently we really missed out on a lot of the volume uh that went into like these new d5 coins which was tough to foresee but actually dydx had about like 30 market share of all volume on dexes roughly in the first half of 2020 and then uniswap obviously just started going crazy um because people wanted to trade these long tail of markets and not even the long tail but going from three to on the order of 100 or so

we have captured most of that volume we think as well but we are unable to support that because we only had isolated margining and the reason for that is effectively like one of the things our smart contracts do is whenever a user makes a trade you have to check that their account is collateralized which means you have to basically loop through all of the markets on the system you have to get the oracle price for every single market which is you know number of s loads at least times like number of markets that you support which is quite a lot um so that really limited us in terms of like how many assets we could list on the platform because every single new asset that we would list would have increased gas prices um for everyone on the system even if they're not trading on those markets

um so there's a super big limiting factor you know looking forward to what we now support on starkware we support this other mode of margining called cross margining which is basically the opposite it's like you can deposit collateral one time and you can start trading on any different markets or as many markets as you want to using that collateral and again market makers can use this as well so they just deposit one time it's really easy for them to start quoting on just like any different market they might want to trade on so the reason we were able to support this on startware fundamentally is because of the scalability because you know you no longer have to pay constant number times like number of test loads you're doing basically uh gas per trade anymore and that's really allowing us to

launch a lot of new markets on the platform which is a really big strategic objective for us currently we're up to i think like eight or nine or so but we're on a pace of about launching two markets per week or so mostly just doing that for for growth purposes uh to kind of like build hype for like every new market that we're launching but that's like a really big advantage of using layer two as well as like you can just do things that weren't really possible on layer one uh due to gas constraints interesting when you say markets do you mean pair or do you mean a token yeah pair new like two new pairs every week right what are you up to now yeah i guess you could say pairs i for for me i always think kind of in token supported but i realize that that

isn't i don't think that's the way you're thinking about it it's basically the same thing yeah all of our uh quote currencies are in uh usd so basically we're listing like a new token for each new pair okay okay and how many are you up to now currently up to nine i think but we just launched the platform like a month ago okay so it's nine and growing at two per week so that's pretty good oh you said the quote currency was usdc that's right yeah cool do you foresee a limit though even on the l2 like does it have some point where you're like actually it starts to also affect this model yeah i would say it does i mean one like limiting factor that we haven't really touched on yet is even with starks a pretty big consideration is the

proving costs for starks which are reasonably high still we're paying more in gas fees and i'm pretty sure it's costing like starkware to run uh their prover engine but it is a pretty significant uh consideration as well so i believe we're we're totally golden until we get to like on the order of like two or three hundred markets um but at that point we'd have to think about you know scaling the proving engine uh making the the verifiers more efficient things like that but that's this kind of stuff that starkware continues to work on and that i think will continue to improve do you also see an evolution in the way that your l2 setup interacts with the l1 going forward or is this like you've you've done a lot of work to launch this and this is what

it's going to be from now on no it's very much like i think a lot of aspects will continue to improve over time one actual the kind of critical thing that our users are still running into basically is kind of in order to onboard to the system you have to send two transactions basically one to register your stark accounts on the smart contract and then a second to deposit your funds there's no way to get around like fundamentally you have to deposit your funds into the system uh one thing i'm excited about is just kind of more bridges between layer twos being a thing like imagine if coinbase or something like that like we're integrated with uh starkware optimism or whatever the case may be

and could support just withdrawals directly to layer two um that would be a lot more gas efficient for them and us and the whole system and i think that's the kind of stuff that's going to start happening over the next year or two whether it's withdrawals from centralized exchanges or it's like a bridge between optimism or some other layer one and starkware and you know any other chain you might want to trade on but currently i guess the state of the world is everyone has to go back to layer one and then maybe move to like whatever uh layer two you want to whether that's centralized layer two on uh your favorite centralized exchange or it's your uh starkwear stuff but that's still a pretty big constraint i would say that question of bridges between the l2s we i mean we have mentioned that i think

on almost every episode but like i one of the questions i have when i think of that bridge idea is who builds that exactly like is that agreement is that like an individual bridge built every time between two teams they have to like figure out who funds what and then they they deliver it and it only like it only provides that one bridge and there's so many of them that you're gonna need so many of these and each one is bespoke and it's just a nightmare that's like for some reason that's what i'm worried about i have some very strong opinions here but it's it's probably best for another another time yeah probably james can speak a lot better to the technical side of this uh than i can but maybe i can provide some color on like from a business perspective

like who is likely to be pushing some of these things forwards i mean like i just said obviously there's a huge incentive for us to to form partnerships with either other layer twos or centralized exchanges um to be able to to do these bridges and it's just like a massive improvement in onboarding to dydx so i think you'll see just like whether it's you know some form of like revenue sharing or like payments or like incentives or you know it's good for both sides basically but i think you'll see more of this start to happen from a business perspective soon because as we're starting to get these products that have real usage on layer two you know they have real incentive to to make a lot of these things happen i started to wonder like this is a

little bit off topic but it's it's sort of like the future of ethereum as this the role that it's holding if you have these bridges between the centralized exchanges and other l2s does eth and the ethereum base chain itself become the store of value like like is it no longer a used token ex i mean i guess it would be used for gas fees and that security model but like i know i know you need it in a way but i'm just like i'm trying to picture this future where everything is happening in this net above it and what actually happens to that l1 that's an interesting question macro cryptoeconomics is is a really hard topic i won't delve too deeply into that but i still think there

will be you know at least as much usage of ethereum if not more um because of these chains that are built on top fundamentally everything has to settle on some layer one chain yeah um and clearly we're we're currently going with ethereum as that that layer one chain for variety of like decentralization security etc reasons but i think just that the chain of ethereum or whatever chain things you're settling on will become even more valuable um because of layer two's not less valuable because now you have just all this new financial activity or whatever activity um that you can unlock and still that settling on this one chain yeah going back to the just the sort of options you saw for yourself you never had the idea of building your own

l1 did you no i didn't personally have the idea of building my own l1 yeah i know this is a funny way to say it but it's just like too technically hard i guess for me personally like i really respect people that work on that and you know have the capacity to do that but i think just for me personally and kind of given my background that having worked at coinbase and at uber and like this you know general silicon valley engineer um have a lot of experience building what i think are like pretty high quality products and being able to you know take that technology take that like smart contract scripting language that is provided by whoever's building the layer ones and transform that into a great product is something that i'm a lot more personally interested in but of course

both sides of the coin are required to make something that's great yeah i think my main takeaway from this is that uh as opposed to the other l2s that are being built and the other rollups we've talked to all of them have taken this tech first approach and are looking for products and dydx has taken the opposite approach which is start with the goal of being one of the biggest crypto exchanges in three to five years and have filled in the tech to support that goal and i think that's really interesting and uncommon in the space and why do you think you took that approach and uh why do you feel like that is uncommon in the space

yeah it's a good question and i think it gets back to what i was saying before around why start a company around the product rather than a layer one chain what we've seen in silicon valley over the years is that it's really hard to build a product that people want to use and that has product market fit even if you have you know the top class technology in the world it's just hard to find like a product use case that is differentiated that is 10x better in some way from what has come before so i think it's a really hard ask to just start with new technology and then say okay let's spend most of our effort building the technology um and then we'll think about like the

product later or we'll like come up with something that is useful it kind of gets back to also what i was saying with like the two sides of the coin of course there needs to be new technology but it's a it's first of all very very hard to build uh you know new world changing technology and also it is very very hard to build like a real world changing product on top of new technology yeah and kind of if you multiply those two things together uh it's just so so hard if you're building like both the technology and trying to build like the product at the same time so again we feel like our main expertise is in building really top class uh products at dydx and also of course at least we think understanding uh new

technologies and how we can use them to build a great product but we don't really feel the need to have to build those things ourselves there are a ton of great people out there that are building them and kind of by forming partnerships with those people and really focusing on just nailing the product use case well of course understanding the technologies and how that could have implications for what you can build on top of them but i guess in my opinion it does make sense to keep those things separate like you know have one great company that focuses on building the best possible technology and then another great company which focuses on building a product on top of that rather than having them together that's just my opinion very interesting um i i guess like what it leads me to think about is

these rollups that are building out just general smart contract platforms i guess they're trying to be 10x better than ethereum and dydx has a very different goal in mind it's not trying to compete with ethereum for uh you know market share yeah that's exactly right i mean we 100 don't care um about the scalability technology we use well maybe that's not a great way to put it we do care like but the only thing we care about is like the actual you know benefits to our end users on a lot of different axes whether that's decentralization security performance all of that but we are you know we have no specific allegiance to like ethereum or something like that as long as we think it is giving our

users like the best possible trade-offs for decentralization and security and then kind of multiplying that by starburst performance is the best possible product we can build right now but if there was something better later on like you know i would definitely go out and settle like starkware's transactions on like some other chain if you were able to compete on the metrics we care about got it so you are focused on this product you are a company i guess in and you're based in america right what's your plans for the business itself like you talked about wanting to be kind of this an exchange of sorts but you're still you're at least you have one foot in dex world do you have any plans for decentralization on the company front yeah it's a great question this is

something we're thinking a lot about this year especially um and that's going to be our main area of focus for the next 12 to 18 months or so is full decentralization of the product and for us really what that means is full decentralization of what i would call the liquidity model and kind of get no longer running this central order book and kind of the central order matching system for a variety of reasons but we have some ideas on that we don't have any decisions on it yet i can talk through like what we're thinking about at a high level and of course like i said we don't really care what technology we're using we just want to build like at the end of the day like the best possible use case for our users so that's kind of the angle we're coming at it from

but okay talking about this question of like how do you decentralize like a central limit order book or maybe even taking a step back at a high level just like how can you build like the best possible liquidity system uh for perpetual contracts for the highest volume markets because as we talked about that's what we think most of the volume is we have a couple of ideas kind of stacked ranked first of all we're thinking about utilizing more of kind of a request for quote system rather than like an order book system um and the way this would work is effectively there are maybe like five to ten market makers or so which are known in the ecosystem and whenever you want to make a trade you just ask all the market makers for a quote uh they get back to you or they don't

and then you just take whoever's giving you the best price and the reason we think this could work pretty well specifically for us is twofold first of all it supports bespoke markets really well so order books are really good uh for just aggregating liquidity but if you have tons of products and like tons of markets it's hard for order books to scale to that number of markets like i was saying before and one of the things that we are interested in in the long term is kind of the growth of the options markets which is important from kind of a strategic perspective right now perpetuals have about 100x the volume or so of the options market in crypto but at least personally i think that's likely to change on kind of like this three to five year

time horizon where options and kind of more like even more sophisticated financial products will take up more of the volume share and options are very bespoke like there are tons of different expiration dates there are tons of different strike prices that you could buy and even in traditional finance uh most volume through options markets just runs through kind of this request for quote system like if you're trading on a robin hood or something like that that's basically how robin hood works is it just goes and talks to uh like these high quality market makers that can provide good liquidity and that's one of the things we've been focused on a lot at uidx actually is building these relationships with market makers um i like to think we're at the forefront of that index because a lot of these uh crypto market makers cdydx and kind of our current

hybrid approach being really approachable uh coming from centralized exchanges like we have an api we have like a trading client that is pretty similar at the end of the day uh to what centralized exchanges can support so we've been able to build a lot of really high quality relationships with really top-tier market makers in crypto and this kind of rfq system could potentially mirror our current liquidity model pretty well like right now it's like you know forgiven market probably like three to ten market makers are providing most of the liquidity um so could potentially work well and the cool thing about that is still you only have to put like the actual settlements on chain uh you know you don't actually need to put the order book on chain and the issue with putting the order book on chain which kind of leads to our

second potential option here is that order books the the main throughput that you require and the main thing that's happening is not trades it's just orders being placed and cancelled and not filled all the time it's like market makers placing and canceling repricing orders and roughly this happens at about 10 000 times the rate of actual trades happening so you know if you're trying to think about moving this to an on-chain system uh which again like point number two that we're considering is building an on-chain order book something like what crm is building on solana but the real question here is like how much scalability is your your solution actually providing um and like what's the order of magnitude increase uh in in roughly you need ten

thousand times more scalability or potentially even more to run an on-chain order book than you do if you're just uh doing the trade settlements launching which could be achievable um on the time horizon that we care about but this is very much like a research question as to like what is the real level scalability specifically for our use case of like placing and canceling or repricing orders on a given chain and then the third one that i'll just touch on uh is kind of like moving to more like automated market maker uh model with this third so it's like lowest on the stack ranked uh for reasons that i touched on before in terms of like thinking that other liquidity models are more efficient for for building liquidity for the top tier markets but we are watching what's going on in

crypto um you know like i said like excited about a lot of their new developments with unit swap v3 and kind of their what i would define as like hybrid order book like automated market maker model and potentially there's something that comes out that could work well for us too and that's the last point i make is uh once you're fully decentralized the cool thing is that these options are no longer mutually exclusive like you could imagine you have like an amm or like a non-chain order book and that could be supplemented by rfq liquidity and all these ideas like you know we're not the first one to think of these like everyone like tons of people have tried like every one of these three things but i think we're uniquely positioned to do it just because of our focus on the product like relationship with

high quality market makers and just being able to translate technologies into really great working products does what you described really make you censorship resistant i mean you're still a us company like if you were able to kind of articulate some of this decentralization that you described in terms of the order book like would that mean that you no longer have control over it yeah i guess control over it is a bit of a loaded terminology depending on who you're asking but decentralization obviously is a spectrum and i think it gets us like much much further to the right i mean our goal is to be able to say like all we're doing here is like publishing this open source code that our users are using whether our users are like end users of the product or you could imagine potentially we published like open source nodes that

market makers could run as like part of like a rfq system or something like that and we're kind of the technology provider in that ecosystem but i think another thing that we're moving more towards over time is uh decentralized governance kind of like decentralized like ownership of the protocol itself and obviously there's been a ton of activity and that in d5 over the past year and we've been watching and we think that's you know something we want in terms of like users actually owning and you know having more decision making power in the protocol for ourselves as well is that on a public roadmap to actually like create some sort of decentralized governance of the protocol yet no no road map for that right now it's just kind of internal thoughts uh that we're having but like i said

we're watching everything else that's going on in d5 and there's obviously a lot of momentum around that totally so i think it's a last topic that i want to touch on and i just want to get your thoughts on you know now it's not defy summer it's defy whatever is now i think that the difference here though is the price of eth has gone up so much that if you're outside of crypto it's brutal what is your what is your thinking on the state of it right now do you do you see it as like is this the moment that it cro it's crossing over you've you've also been working in the space for three and a half years or so i like i think you might have started around the same time i did so yeah i'm just curious to hear your thoughts on on the state of d5

yeah i think the state of d5 is really interesting right now i think the thing that layer one gave us is just it's really easy to experiment and kind of build new things in d5 and that's just a really awesome thing like it's just so much easier to build in crypto actually a financial product than it is in traditional finance just one quick like allegory on this i used to work at coinbase as a software engineer and i think the thing people don't realize about coinbase is like 75 to 80 of the work on the engineering side goes into dealing with the traditional financial industry and roughly like 20 it's on like the crypto side like what i did was like integrating with banks and so it's just massive headache even from the technical side not to even get into kind of the

regulatory and compliance side there but you know it's it's so easy to to experiment on d5 right now and that's amazing but as you mentioned the main limiting factor here is as there's more interesting stuff being built and there's more usage of the chain because there's this really low cap on throughput of the system on layer one ethereum right now that just results in these astronomical gas prices um so it's kind of this like balancing function where it's like all this cool stuff that we want but it was like too much cool stuff then there's this like cap on how much people are willing to pay for said cool stuff and i think the thing that is going on in crypto right now and obviously you mentioned this in terms of the types of guests you've been having on the podcast and stuff recently is

layer twos are happening like they're here um like real like mainstream d5 products are moving to layer two uh you know dydx synthetics i think unislop has plans uh to launch with optimism really soon as well and i think over the next 6 to 12 months or so we're really going to see almost all the mainstream d5 products i think just like be on layer 2 in some form or another one of the things that is interesting to me as a bit of an aside is everybody seems to be moving to a lot of different player twos like there's not yet consensus around like which layer two is is the best i guess and of course there's no objectively best one it's like different things are better for like different particular use

cases but i think we'll likely at some point see like a re like centralization to kind of like the top most or like the most winning like layer twos as people realize that it's harder um at least to have like a lot of composability that makes like certain like d5 products uh interesting totally if everybody's on different layer twos but we'll see um so i think it's going to be a really exciting like next 12 to 18 months but you know the we just had this ridiculously huge problem of like who's going to use d5 if you have to pay a hundred dollars in fees every time you want to do something and now we're solving that on layer twos um that'll bring like you know new issues with composability and all that kind of stuff uh but we'll

solve those next going forwards as well cool well antonio i want to say thank you so much for coming on the show yeah thanks so much for having me it's a great conversation if anyone wanted to find out more where do they go yeah so you can head over to our website dydx dot exchange or just google dydx and we'll probably show up and you can join our discord and ask me or anybody else on the team questions directly try out the product i mean i think i guess as an aside like one interesting thing is all the stuff is live right now like we're not just talking anymore like go out and use the product and like see the gas fees like see the user experience and stuff like that and kind of see for yourself about a lot of these technologies that

we've been talking about for a while now and kind of related to my last answer it's like an exciting time where we're not just talking anymore go and go and use the products and see what the technology can build and uh do you have a docker container that i can go out and run a node on the dydx roll up he asked this on the last episode too i'm gonna ask this on every episode we don't have a docker container right now but i mean all the data is on uh on ethereum itself so not no notes required i guess right now cool cool all right so thanks again big thank you to andre the podcast producer henrik the podcast editor and to our listeners

thanks for listening [Music] you