Ethereum Scalability, DEX, and DeFi
ETHCC 4 · July 2021 · 39:56
Eric Chen discusses Ethereum scalability, decentralized-exchange development and the economic impact of DeFi and digital assets.
Speakers
Topics
From ETHCC 4, hosted by Ethereum France.
Transcript
foreign okay one second okay thank you hey everyone this is uh Aero Chen co-founder and CEO of injective labs So today we're going to start talking about ethereum scalability Jackson D5 and I think this is specifically applicable for injectors case because we are a decentralized exchange that's affordable base and builds on top of ethereum trying to scale a lot of transaction issues and economic issues that are
sitting on top of ethereum with regards to Dex and specifically to reduce taxes in our case and for the greater D5 so it's actually not the first time the ethereum had a scalability issue in terms of gas price uh in an absolute sense in uh um basically during their crypto Kitty um around uh uh kind of early uh 2017 or late 2016 we had a giant spike in gas cost and this kind of caused a basically a negative externality for the entire ethereum ecosystem and creating a very very high gas a bite at that time ethereum was not that expensive to acquire
um it still created a very interesting phenomenon and we kind of saw how the community reacted to it in terms of dealing with the scalability issues on ethereum and also for greater ecosystem and how the greater blockchain space reacted to it when it comes to uh ethereum's gas costs and also a long time but one thing we started noticing is that it basically creates a an interesting dichotomy because um back then uh there was basically a quick reversal in terms of gas costs and it relatively stay stable uh after it out a single incident but this time it's
drastically different while we don't see a very major spike in gas price after this uh um we still see a consistent growth in gas cost and basically what was the reason behind us and the answer is fairly simple it's because of D5 and a greater Dax ecosystem um so right now if we take a quick look at the Dex volume it's been basically dominating most of the ethereum transactions um and it has created a lot of value extraction value accrual um so uh during may we saw an all-time high in terms of uni swamp volume which is 59 billion um and total tax volume to be around 162. so there's 85 uh 85 000 growth over
the year and obviously this entire phenomenon is fairly new to the average user we don't really see a major dominance and transaction for dexas within ethereum until you know 2020. so this is extremely interesting because right now we see around uh 3 million uh unique addresses trading um and engaging in D5 uh out of the 58 million uh of the address in ethereum um so this is uh basically a 13x growth over the past year and we see units of total users to be around 1.53 million
users and taking compound as a lending protocol for example which doesn't require that much action trading which has a lot more quote-unquote value per user it still has 360 000 users and even for daily next volume at the peak we saw 3.3 billion uh Dex volume with 1.98 million uni addresses on a daily basis so even right now um uh we're still seeing a lot of fees uh going to reunion Swap and you know the daily volume is still around 700 million um we I remember back in May um the average ethereum transaction fee um basically Beyond just a standard Eve
transfer or sender erc20 transfer is around 43 and at the peak Union swap transfer did hit around uh I believe to be 60 to 100 which is pretty crazy but this isn't first time that for running and minor extractable value um has occurred so back in around uh 2018 or 2017 um a Xerox protocol and also either Delta had a similar issue about it on a lower scale um Xerox relayer and also zeros protocol settlements are able to be sharp month and this is especially the case for any type of cancellation transaction so
taking in the case that you are a market maker um your trades are effectively uh under the danger of being captured by some arbitragers if you don't cancel your order fast enough and pay a high enough gas speed so the standard Xerox model works is that you can place an order and sign with a uh with a certain relay or a certain approval but cancellation requires a non-train transaction so that means that you can create Stellar liquidity uh on the order of four is zero X pro uh for a zero X Exchange um but in order to respond effectively to the price you would have to pay the cost of updating the order book and replacing it so this kind of creates an interesting uh economic because market
makers from uh uh would have to completely deviate from a traditional market-making model you don't just uh a market make on um uh on a standard exchange being able to place and cancel placing cancel thousands of times per second and you have to be extremely mindful to economics of uh audible quoting so this uh this kind of creates a perverse incentive where market makers want to quote wider and less frequently and kind of create more uh quality slots so this way it prevents people trying to hit a battlefield and trying to uh I'm trying to create a sandwich attack but this creates an issue where um liquidity becomes a lot less competitive on orbok Texas um basically you're going to uh we
started seeing orders that are being quoted at a very significant premium or discount uh with you know a very very large spread so this way um at least during the price movements uh for a on-chain ethereum block of 15 seconds or uh two minutes market makers have that safety of cancellation won't be able to put them into a bad price position but with poor liquidity comes um basically poor volume and poor user experience and kind of created this negative feedback loop so this is also one reason why um zeroes protocol and also the backend back then the uh launching settlement option relay model never really reached
the amount of volume or uh quote-unquote adoption that we see today with a M Texas there were Solutions at a time of course and um there were a couple of really brilliant writings uh done by the creators of Xerox protocol on you know dealing with uh for running and the prayers of uh and virtual settlement and so one of the pretty safe approach that uh back then was creating a Tec model where essentially you get to soft cancel and just uh placing more trust into uh the relayer so that the relayer handles the cancellation for you um another way to deal with this is obviously you know what we constantly discussed today and what became the canonical or dominant discussion that we
see which is uh Layer Two um even back then there were already ZK Roll-Ups the uh the discussions around it there's already a plasma so it's really interesting to see how everything played out uh to today um so here's uh uh so so uni swap came along and kind of created this very ethereum friendly uh um type of exchange model so basically the mechanisms of design is honestly pretty brilliant so there's liquidity provider and there's an arbitrator and in order to keep a liquidity provider uh making money all the fees from the arbitrager or any type of trading fee will go to the liquidity
provider uh basically in a short volatility a stance and on another hand Arbor Charter will consistently gain these uh quick Arbitrage spreads essentially working in profit for every single trade so that every single auditing transaction has an expression of itself so this means that you know as a liquidity provider I'm active I'm automatically Market making on top of the liquidity pool but on the same time Arbor Charter is also making sure that the price of the liquidity pool actively reflects basically the global liquidity while receiving even profit that's greater than you know the 0.3 percent in
exchange fees and also a gas I see B3 kind of change a lot of the math around it and kind of complicates a lot of the uh aspects of uh LPN and also arbitrotting but I think the general uh the general rule of Thumbs Up States but the problem with amm is that it kind of uh exacerbates and kind of um augments this entire issue around competition for uh transaction ordering and also competition for transaction inclusion while back then it was basically people trying to snipe a few cancel orders and market makers can be smart around um basically making sure that their
order isn't being a sandwich attacked in the amm's case it kind of became an option or it kind of became a gamified element where essentially there's a profit window and everyone is trying to bid for the inclusion or for the um uh for the opportunity to make this Arbitrage profit so this is why we started seeing you know the term minor extractable value coming out um and uh Phil Diane and a few others from Cornell uh also created a lot of work around Flash Boys and for running um even last 30 days long we saw 9.1 million dollars in extracted to MEP uh
400 000 in extraction B in the 12 last 24 hours um and uh total Meb to be around 761 million which is a priest uh a scary number but the interesting part here is that it's mainly gas auction because it's a standard income rather a minor income but the total waste of fees on failure may be gx's uh transactions is still 12.5 million which is pretty crazy so why should we care um so first of all uh this is this seems like a pretty natural ecosystem when we uh when basically a lot of these profit windows and a lot of these transactions
are getting more and more profitable it's a demonstration more asset growth of an ecosystem and a growth of participants um but basically it creates a negative externality for fees because while there are D5 transactions there are highly profitable um that kind of attaches a value and allows people to bid um you know in a a net positive cost basis ethereum is not only just about D5 and there's also nfts there's also a lot of different Elder elements there's also basic token transfer and uh basically um because of the way uh ethereum uh uh consensus works all these transactions are going to have to create uh pay the
premium and pay a significantly higher gas cost than other ad uh than other layer ones to be able to basically satisfy the same use that ethereum D5 is using and on the other hand during the market volatile events um gas costs will be extremely high because their liquidation auctions almost and there are also Arbitrage gas options this kind of creates another issue where basically of the entire industry have to strategically place their transfer or the use of ethereum has to be modeled around basically their trading and D5 aspect of things which is essentially demonstrates you know kind
of naturally asian-based uh ecosystem but uh ideally we can do better than that um on another hand the convenience of uni swab and kind of this instant swap model does bring a lot of uh uh this does bring a lot of users to be more accepting of uh uh going through the amm model going through on-ching transactions but uh any type of uh unsophisticated uh Market transaction does create a proper window for arbitragers which is kind of uh which is a good thing for arbitragers but not necessarily the best thing for the overall Capital efficiency of the greater Market but it kind of brings back the question
of whether this is a scalability issue um because at the end of the day um um even if we create a larger and larger uh a larger and larger throughput it doesn't necessarily mean that this problem is going to be solved it's because the transaction auctioning model itself is uh kind of creating this uh a competition around gas and you know long as the ethereum ecosystem grows at the same pace of the scalability of ethereum um the gas cost is going to stay relatively uh uh the same simply because uh as the theorem ecosystem grows has more and more liquidation and more and more extractable value comes in um no matter how big the throughput is
it just might create a bigger uh option or you know more sophisticated option uh option and any type of gasty will still spill over to the average user so while it does help to uh to to have higher throughput and it might be a temporary solution but acid theorem grows over time it might not necessarily be a long-term solution so when when we started seeing um you know ethereum transaction costs going higher and higher and we started seeing basically um uh gas auctions and orbital auctions actions dominating that their event pool um how did the community dealt with this so first of all we kind of see the
blossoming of other alternative uh ethereum layer ones like BAC like uh Phantom like uh I mean maybe not even a layer one uh layer one that's a evm compatible like uh solata so there's a very natural move for people to kind of move their token off of ethereum or move their uh transactions or uh needs off of ethereum but um as we see now basically um eventually all the valleys still wrestle on ethereum it's kind of like a uh it's almost like a spillover stadium within like a uh within like a large game like the Super Bowl where the the users are coming in here mainly uh for
the Super Bowl and not necessarily for the tailgate party on the parking lot um obviously they might complain on Twitter um but there's also a lot of it also encourages a lot of gas optimization designs within ethereum contract um back in the day there used to be a lot of pretty brilliant Innovation around um uh gas token Futures obviously right now it kind of trading uh almost like a negative uh uh externality for an overall gasty and we actually saw an improvement of gatsuit after uh you know um uh uh a deletion of storage uh gas refund is uh removed another thing is uh ethereum 2.0 will have a sharding
solution and so this means that it does help a lot in terms of uh scalability and also removing this kind of uh uh negative uh feedback loop with a gas option but let's keep getting a little delayed so we'll wait and see but I I mainly want to kind of shift a focus around uh the dominant discussion of this talk which is Layer Two Solutions um basically is going into production more every single project that we're seeing uh is going into production it's finally going along with mainnet um and we started seeing a lot of significant adoptions a lot of economic values resting on these other two solutions um and more interestingly we started seeing
um basically literature Solutions having a very very serious discussion in terms of adoption usability and use their experience and centralization slash decentralization risks so um while uh basically gas option um might be removed by layer 2 Solutions we want to kind of compare how they work and whether they can be the perfect solution uh for everything that we're dealing with in D5 foreign so basically there's a few like fundamental principles around Layer Two
um obviously it's a very very broad thing and they're very various levels of or you know schools to follow when it comes to what defines this is there to decide to encount um this you know like a layer one with a independent uh or like a full decent transverse count um there's a POA side chain count um so I would say that you know fundamentally um if you want to go down like a more strict sense Layer Two is essentially resting uh the security or the Ultimate Security um uh uh on ethereum while maintaining the transitory State elsewhere so this means that basically for uh any type of uh layer 2 solution uh in a strict sense Layer Two should be having uh uh
ethereum as a final source of Truth and basically only maintaining the state between every ethereum block or between every checkpoint to be maintained elsewhere but eventually all state is going to be verifiable and settled on chain so the most obvious example in this case would be a Zeke and Stark roll up basically uses recursive start to basically maintain off chain all the uh in between information but basically it's going to be all every single transaction that's being submitted to the ZK start or uh ZK roll up or start roll up operator uh we'll be uh uh a stock or stock proof will be produced
and immediately verified on chain so it is a pretty promising solution and we do see a lot of support from matter labs and software working on this diligently um but right now uh there's still not a full even compatibility or smart contract Suite which is why it kind of uh uh produce optimistic roll up which does support for evm or OBM in this case uh with a lot more smart contract composability and uh um kind of a very natural uh and easy deployment for for any type of existing solidity contracts so obviously people are working on optimistic rollups like optimism and arbitrum and both of them are actually going into production so
the way optimism Works uh and I'm sure since there's already people from optimism here uh at this talk I'm just gonna uh probably just uh let them kind of uh cover it more in depth but uh the interesting thing here is that basically it it ought to it operates in more of a optimistic sense obviously uh where basically a transitory say it's going to have an operator and um there's going to be a verifier disputer and in the case that the operators not uh not uh producing these uh transactions or verified nutrition license fairly um basically there's a bondings uh
there's a stake or a bond that's going to be removed and uh the entire chain is the entire transaction is going to be replayed on ethereum almost and so this kind of allows for uh basically uh an issue where uh the withdrawal period has to be uh uh confidently long so that people can actually be able to disputed and bring the bring the transaction history on chain so generally for optimism's case it's around seven days and I think this is mainly fine because they're mitigating Solutions uh such as a optimistic uh optimism Futures where essentially you know you can create a
future surround this token that's going to be exited and basically pay a simple slight premium uh for uh tokens um that are kind of currently awaiting withdrawal and exercise is actually a pretty interesting innovation in a sense that um they kind of went with a POA consensus and a completely uh have an independent uh um uh change that doesn't rely a checkpoint per se uh on ethereum so this this turbo sizing model actually uh is very natural for uh developers to build on top of mainly because it has basically unrestricted evm compatibility and more importantly it has fairly strong scalability and
um it has a very malleable and flexible consensus that can be approved over time uh based on developer needs and we started seeing uh Perpetual protocol and a few others building on top right side and basically generating very impressive volume even though it's not sitting on ethereum um we also see a explosive girlfriend for a polygon a lot of projects are uh basically deploying or uh deploying the exact same contracts or you know uh uh completely new contracts as a matter of fact on top of polygon um and the way polygon works is that um basically it's a a it's a it's a it's a fork of Cosmos initially um that has uh it basically dual chain
model where there's the evm layer um where all the transactions are going to be sitting on top of that um and basically there's there's also going to be a bridge and generally uh right now polygon is using a POA or a multi-stick bridge that transfer uh also State over um but they do have also a plasma Bridge with a plasma predicate but we don't really see uh a significant adoption around that um usually what we notice these days is that developers generally prefer um to just go with an evm uh a full UVM compatibility and going through a relatively more centralized Bridge for injective's case um basically we built this a fairly
interesting Innovation around the way how register work so injective is actually kind of a triple layer solution where we have this order book layer that's a fully Cosmos a native with a keeper and query model we also have later on in ethereum layer with ebm compatibility and we have um this bridge component where essentially it's backed by the validators of injective but the consensus and the operation of it does not rely on uh does not rely on ethereum whatsoever so this kind of creates kind of like independent consensus again with um uh ease of improvement over time and we can
upgrade injective over time towards whatever the community needs the most interesting thing here is that basically all these three layers interrupt with each other the order book layer has an internal Bridge between this uh Eve to injected bridge and also to the EPM layer so this allows the position of the injective to be exported to the ABM layer and uh vice versa and more importantly it can be also exported down to ethereum as a representation of any type of derivative position which we do expect to be happily utilized over time as more and more people built on top of the interactive foreign
I kind of briefly mentioned about it um so for example uh optimistic rollout versus Z camera love which one is better um in terms of developer friendliness which one is going to be against a significant adoption although on a lot on a lot of metrics uh ZK Raul do appear to be uh more Superior in terms of TPS and in terms of basically trustlessness and in terms of uh uh security assumptions but what we do see is that optimistic rollups uh uh can get to Market a lot faster with the full ebm compatibility or in their case ldm and we do see that optimistic role it can be a lot more developer friendly um compared to you know a ZK roll up which you basically have to encode every
single logic or rewrite your entire solidity contract um but is it does that matter over time do you think uh uh uh one question is that you know matter of this work out something with full ebm uh compatibility um and uh Star Wars also working out something like that's similar as well um and on the other hand um optimistic rollup does have uh TPS constraint and it does have it kind of uh like a slightly higher gas cost compared to CK Roll-Up um and uh as a result uh optimistic World also has not as fast finality compared to the hero love which creates another interesting comparison because zika rule don't really have that seven-day
withdrawal period but another issue is that uh these Layer Two sectors a lot of them do rely on a centralized operator to be able to maintain these states uh to be able to kind of keep track of their transactions ZK rollup doesn't necessarily have to per se but in order to get the full transaction history in order to generate the proof uh uh in a in a fast and secure way it still requires a central operator and in most of the production cases we do see uh for the layer two projects they are relying on a single server uh for this and we do see Progressive decentralization steps uh towards trying to remove this single operator model but currently within the uh broad production environment most of
it is still reliable on a single server um but the good thing about most of these other two solutions is that it is trying to work on off of trusted spaces so that means that uh basically most of uh um uh you don't have to trust the central operator you don't really have to trust that Central as operator because eventually people are going to verify it it's bonded or to prove it's going to be submitted immediately launching but obviously in the sidechain and also independent chain cases um you have to trust evaluator or basically the economic and the consensus security of those chains but generally as the user of those platforms uh the trucks can't hijed together but it kind of brings in another major
problem overall is that um it creates this lonely island of um uh composability because the beauty of ethereum is that basically every single D5 project is composable with another you can uh you can basically create this entire money like uh Lego and go on top of each other and uh uh create a ton of transactions and very very interesting Flash flow attacks uh to to uh uh to to kind of bundle all this uh D5 stack together but as we see right now with the blossoming of multiple Layer Two Solutions and seeing so many uh scalability Solutions coming out is that individual projects either have to deploy to all the layer two solutions uh
and that is under the assumption that they can um or they would have to sit within their own there to a solution and face this kind of a partial composability with all the other protocols that are currently sitting on the same literature solution or um basically it will result in a Congregation of all projects sitting within the same literature solution which actually might face the same scalability concern that ethereum was tasting in the first place so the Lonely Island issue is going to be a pretty significant issue as we start seeing projects trying to move into more interesting and nuanced there are two solutions and how we see
compulsability is going to play out the italic has worked on very interesting work about making transactions between their two solutions but currently we still haven't seen anything in the production environment yet another interesting thing is that again like I said previously that there's a blossoming of alternative ebm layer ones uh when we start seeing a huge competition around ethereum gas and gas auction as we can see BSC was at one point having a significantly higher transaction volume to ethereum um there's a lot of other layer ones like a Solana and Phantom also blossoming and bringing a
lot of projects on as a result of the ethereum's congestion issues but is that going to be another Revival approach compared to the uh um uh the uh the current growth of layer 2 that we're seeing um so first of all this relies on two assumptions number one is that um Layer Two is generally a trustless solution it is decentralized eventually um whereas alternative ebm layer ones SD centralized to begin with um but the decentralization aspect of it is different in a sense that uh alternative evenly one has this test on the consensus string and also the decentralization of the consensus which a lot of the alternative layer ones uh
are trying to kind of uh forego in terms of decentralization in exchange for higher throughput or just in general um fancier futures um but I I think generally for users case this is something for them to be mindful uh when they're evaluating whether to move their assets over or whether to you know turn down to a go-to Avenue for until the T5 audience production another interesting uh consideration or thesis of the literature is that it's completely Reliant um basically the consensus of a side chain or optimistic roll-up or ck roll up or any type of other Layer Two Solutions or state channel are pressing their final State
uh on ethereum and any State updates or any change on the literature level doesn't matter in the long run um but alternative later once it's relying on a set of validators or a set of participants to have strong economic stake in the uh layer one while both of these are uh uh have their kind of considerations because when you try to do e-reliance uh you you generally require a compressed set of state or basically the uh the state transition uh to be sitting on ethereum eventually um validator Reliance kind of rust is uh stage to be custody or beholden by South Islanders that are about decentralized
uh if done properly is still not part of ethereum um another thing is chain consensus uh like I said before um the the strength of the consensus and also decentralization of consensus uh is very key when it comes to evaluating this versus a layer 2 solution and how the bridges work um this is one thing that we've been noticing very uh recently is that most of the bridges across uh chains are generally uh being a POA or uh has a significant centralization factor embedded whether that it's either it either has a multi-sick as a fallback um or it has basically mostly that's signing off every single deposit and
withdrawal and this creates an interesting problem because um Bridges between chains shouldn't be uh decentralized or it shouldn't be in a peer POA model and we do start seeing you know uh for example gravity decks going live with their gravity Bridge um uh bridges are basically fully decentralized and basically the use users can trust a decent dry set of actors that actually bounded rather than a mold C6 set of actors that does have a corruption risk and another interesting thing is that um while we don't see a lot of projects moving on to layer two at this moment mainly because most of these products are just starting to go uh into
production we do see we do search Stars seeing a lot of projects going into sizing Solutions or alternatively at once so a lot of projects for example Ave has already built on top of a polygon and a lot of major projects have already moved to polygon so this kind of brings into a question uh what are composibility by setting all within the same chain such as polygon matters or does a congregation around basically multiple layer ones uh sorry a layer of two's matter and this is kind of like a in progress uh type of discussion that we're going to see play out as more and more developers pick their Avenue and see how it works out
and the last part is um basically for the alternative layer one you're not really trusting the contract on ethereum you're trusting your chain and this kind of creates a lot of attack vectors and obviously building a chain as we know from injective is not the easiest thing um and basically the lack of under uh auditing solutions for uh layer ones uh is a concerning Factor considering ethereum uh for Intel solutio or ebm based you can always go to an auditor and they can give you a rough estimate or guesses of the attack vectors and the risk factors although it's not a perfect solution it is certainly better than a lot of layer one Auditors out there just because of uh how uh custom uh or how
bespoke the change setup versus you know solidity and another interesting thing that I haven't really touched on uh previously is the centralization risk of Layer Two is not only a risk in terms of security but also in Risk in terms of Regulation uh when you are hosting something when you are an operator for a DUI protocol um when people deploy some deep our exchange product on top of you does this uh fly like you as kind of a centralized operator into ISO regulator this might be an issue uh um but obviously we haven't seen any court cases uh being tested or any type of uh real challenges yet but uh from what we've seen before and from what uh what
we kind of notice in terms of the pattern of regulators this could be a Potential Threat for the adoption of earlier twos foreign so basically uh injective approach kind of mentioned before uh injective has an audible model and basically order placement and also order cancellations highly optimized um long as long as basically uh the mempool is relatively empty it doesn't require any cost and overall it's one of the
lightest transaction within a chain um since we are independent consensus with a valuable kind of uh governance uh we're no longer limited to launching through peninsulability compared to other Layer Two Solutions um but that being said trust is relied on objectives violators which we've uh which we've tried to curate over time amongst you know uh the Tesla phases and everything and we try to maximize composability um first of all uh like I said basically all positions are being exportable and also currently um the most interesting thing is that all these positions can be created and tokenized and uh kind of uh uh uh transfer in a certain interesting way
onto ethereum and basically creating entire philosophy a D5 protocol and another thing is that the only auctioning mechanism that injector has within the overall derivative model is the liquidation incentive so basically people are auctioning and bidding using a more Superior price to capture a position that's under liquidation rather than paying for gas which essentially caused a uh a negative externality for a clawback foreign but yeah um basically we previously explored a few like for running protection Solutions such as utilization of vdf and actually went down a pretty deep Rabbit Hole around it but uh we
decided to go with a more blockchain sensible model where essentially um uh um basically within the safe nature within this uh kind of uh uh the nature of blockchain where there's no time between every single state or there's no explicit concept of time um we decided to go with a batch Junction model and essentially uh uh before uh uh um with given the model of Cosmos we decided to put matching and the clearing and settlement at the end blocker and thereby kind of creating this entire interesting uh very uh blockchain applicant model of matching rather than a continuous double auction but yeah like this is all the moving
parts around uh injective um unfortunately I have uh unfortunately to the time I can't uh talk about uh every single one of them in depth um but yeah if you guys have any question uh feel free to uh thank you so much foreign [Music]