New Ethereum talks, every Monday. The week's conference uploads by event, in your inbox.

Loading player…

Ethereum Scalability, DEXs, and DeFi Eric Chen

Ethereum DenverSun, Oct 9, 2022, 12:00 AM

Transcript

hey how's it going guys um who is the guy who's building that uh amm uh option derivative platform good good job um so yeah so today i'm going to talk about ethereum scalability but more application specific uh with regards to dexes and d5 and obviously i'm going to plug my this project i'm contributing to which is called injective so currently the entire ethereum d5 ecosystem is really designed around you know evm constraints and on-chain constraints and so you can see that it's not a direct replication of the traditional markets and a matching mechanism and overall kind of ecosystem uh components and that's because obviously with the possibilities of ethereum and obviously with everything around evm that enables and also constrains uh an entirely new form of exchange mechanism and also a decentralized finance mechanism kind of borns from this so let's go through the most classic or the most well-known uh dex mechanism on ethereum which is constant function market maker and so the really cool thing about cfmm is that it's a very succinct and very simple representation of this entire broad pricing and liquidity just simply with three parameters which is x y and k and it basically allows for this extremely kind of gas efficient and overall like computation efficient extraction of liquidity and overall representation of liquidity on ethereum uh compared to central limit order book which probably has megabytes of data of order book for every single tick but obviously there are downsides that comes with it which is cfmm liquidity expressions are generally static and limiting and obviously as a continuous representation of liquidity amongst all price levels cfmm doesn't have the discrete and dynamic representation of liquidity and generally obviously for cm cfm it requires arbitragers to ensure price synchrony for the global markets that are trading you know outside of this amm pool so the downside of this is that generally the price or the mid price is bounded by the swat fees which may cause some differentiation or difference compared to a global mid price of 0.3 percent typically and obviously with the evm design constraints mvv incurs additional taker risk and sandwich attacks and so forth so it generally does create this cost prohibitive order execution for this kind of naive implementation of cfm and generally you can notice you know from a capital efficiency perspective there's high slippage the swafi is still decently big as it is required to compensate the il for liquidity providers and there's a decent amount of gas costs especially during high traffic times and so when we look at the d5 takers or d5 users for these type of cfm markets they're generally bounded by two economic constraints number one is the base cost which is uh every execution there's a fixed gas cost regardless of the transaction size so it puts a cap on the minimum order size that can justify this type of trade and there's on top of that an upper bound in trading fee and variable slippage cost that kind of create this uh upper ceiling of the order size that makes it worth it for people to transact on a traditional cfm exchange but obviously this is a more traditional model there has been a lot of really amazing improvements within the d5 space for example unisof e3 it has this notion of a non-fundable position that creates this type of like very dynamic curve order book and concentrated liquidity uh cfmm and it's a very strong improvement upon v2 and as you can see the slippage and the volume compared to the capital state has improved drastically and overall it's extremely evm layer 2 friendly because first of all it doesn't have that much liquidity requirement to provide really really strong slippage well really really good slippage and obviously you know in order to effectively uh lp for these type of pools it requires uh quite constant and uh frequent adjustment of these positions uh on top of unit 12 v3 so on ethereum it is somewhat expensive and it's quite costly especially during extreme volatile events but that being said really really strong improvement and traditionally there's also uh you know since uh the first day of zero x and you know slightly before that ether delta and so forth there's obtained order book that's somewhat centralized it does have you know safety liveness and censorship concerns but a good thing is that it's extremely fast and obviously sometimes i think xerox later version has gotten a lot better at this but it does have uh composability limitations which doesn't fully leverage the greater defy and layer two evm based order books as we are starting with some of the newer implementations uh are also becoming this kind of like data availability for these discrete order types but it still kind of suffers from scalability versus composability trade-off because at the end layer two execution is still quite expensive yeah so this is when i started talking about the project that i'm supposed to be showing um so what is injective so injective is a application specific blockchain that's a lot more ethereum-centric it's mainly built for uh d5 trading derivatives and web3 apps are focused on uh the overall decentralized finance ecosystem and focusing on leveraging you know the order book infrastructure that's native to injective so this is kind of like going back a few years back then when injection kind of first started there was kind of like a consensus checklist for the requirements in order to build a robust order book model and so first of all it requires instant finality just because um uh generally you know in the event of a four it's extremely hard to reconcile past trades and uh the experience uh especially for probabilistic uh uh finality creates this very very big problem around market making especially for order based models because it's not really it's not only a state of the trade that you're persisting you're also persisting the order book itself which might cause kind of like a retroactive crossing uh if the finality is probabilistic fast consensus um just because you know it's order book id and date it changes quickly um you don't want to update it uh uh too slow and obviously account model instead of utxo model and ideally a huge plus for this would be a account sub-account model which allows for permissioning uh for you know trading for deposits withdrawals kind of similar to centralized exchange and kind of similar for how institutional users on top of these centralized exchanges generally interact and it's also created this entire ecosystem especially this d5 spin of it where essentially some account holder or balance holder can delegate some of the permissions to other users such as you know like a professional trader or like a professional manager to manage their balance with uh with only you know certain trading permissions rather than the deposit and withdrawal so they can't exactly rug you and a modularized architecture that's future proof because we all know we've been waiting for e2 for a while and so ideally you know like it can be a plug and play it doesn't compromise you know uh every single module within the chain itself and on top of that it can basically remove plug and play it just allows for a lot more flexibility rather than some consensus level or some sort of uh additional changes that might uh kind of create this entire avalanche of uh dependencies that are broken and generally would love to have a path of scalability because technically speaking blockchains don't scale but it should allow for the option of scalability via layer 2 via you know horizontal scaling via ibc and a nice bonus would be environmentally friendly and so that's kind of how injective ended up adopting cosmos you know getting its own spin on it towards building this chain so one of the most key modules within injective is the exchange module it's a very efficient and chain level enchanting order book so it has this consensus level frequent batch auction order matching that very much designed around the constraints and features of blockchain itself because obviously you know during the gossiping process um the transaction ordering is completely unknown or it's it's probabilistic in nature so it creates this you know entire race of mbv and other type of extractable values and other type of non-determinism that kind of brings some concern for a lot of users that are specifically focused on exchange and definitely you know especially nowadays we started seeing a lot of med issues so it obviously becomes kind of a concern over time but the way frequent batch auction works is that it kind of removes that ordering variable away from the matching process so that front running is impossible there's no incentive for manipulating the ordering and so that's that's a lot more of a blockchain-centric design for order book based model or a c-lot model and there's a generalized derivative module that supports you know any type of futures trading derivatives it can be extensible and modified in a lot of different like extremely flexible uh applications and we actually recently realized that it's completely possible to utilize the time expiry future for number one options prediction markets and so forth and these are all just possibilities are extremely easy to deploy and plug and play and more importantly is a persistent and manipulatable order book state so basically the order book data is always exposed on chain and you know every block has this uh new order book state that obviously takes in the matching and the input from the previous block and so this allows this uh extremely dynamic and extremely real-time liquidity representation for every single block that allows d5 developers to get a sense of the current uh liquidity representation of a certain market and allows you know application to take advantage of a lot more dynamic liquidity uh data and actually build you know more interesting applications on top of it and of course a lot of these order placements and also position management and also uh just in general you know for like derivative it can all be exported and manipulated by uh for example a smart contract and so forth and there's instant finality thanks to cosmos sdk and selective delay is this feature where cancellation is prioritized before matching so that um basically no orders are being sniped and another huge user experience problem that we noticed when we were first building out the protocol is the fee delegation issue which basically being on a new chain being on lsu solution there's often times where like you required a native token and that's kind of degrade degradation for the user experience because you can't really get it to even make the first trade so basically for any type of relay there's an incentive mechanism for the user to not pay any fee or not even noticing that there's a gas fee and so forth and uh give away the trading fee around currently the default is 40 but obviously modifiable by governance um and basically provided to relayers to front the gas fee for the user so that it's kind of like out of sight out of my situation yeah so what does it mean so there's this entire you know uh kind of like base layer infrastructure and from a user perspective it means nothing unless they can't use it or they can't interact with it so currently there are around five exchange already building on top of uh injective as kind of this this relayer that are providing this custom and bespoke user experience targeting you know specific sectors of the market and so you know some of them when the complete dex experience um basically having that swap page having that very interesting like order book display format and some of them just went the complete uh uh centralized exchange type of user experience where you know people deposit in the trading accounts and people can just make trades place limit orders and so forth so it has this very very interesting kind of interpretation of this arching state and utilized towards different applications and it's you know fast or gas fees for a general user obviously unlimited markets because it's permissionless and it has a chain agnostic stance in general so from the protocol layer the most important part here is that while injective has that bridge layer that supports any type of arbitrary erc20 with ibc plus more it can also support any type of chain without actually worrying about any type of mismatch and so forth and it's uh obviously as a blockchain it's supposed to be decentralized secure and borderless yeah and i just mentioned about the injective bridge and so um one of the most uh interesting thing you know building with the cosmos ecosystem is that we got to contribute uh towards you know a lot of different projects back in the day that were so uh very much in the brainstorming phase and one of them was the peggy bridge and peggy bridge was back then uh it had an orchestrator that was uh ready go and we kind of took it from there and created like our take of this uh injective bridge and so the injector bridge works by uh backing uh essentially acting the validators act as a signer on top of the ethereum contract and approving any type of uh watching and approving any type of deposits and transfers between ethereum and injective so the slashing in a consensus directly ties the value valder's responsibility for managing this bridge and we actually went through a very very long type of canary type phase to ensure the contract security on top of uh ethereum and to basically make sure that there's nothing that goes wrong there's no hacks and so forth there's no you know bridging compromise as we've noticed recently and on top of that there's a fast confirmation because again the approval and confirmation process works on the injective layer rather than the ethereum layer so therefore the deposit and withdrawal doesn't have to go through a seven-day process it's directly tied with the security of the injective chain consensus itself and something that we're working on that's very very exciting actually is enabling our arbitrary data transfer and arbitrary data transfer you can understand it as basically opening up a lot more possibility for composability uh within you know d5 to injective uh transactions first of all if you attach these several arbitrary data within a deposit transaction you can create these atomic transactions to uh two injectives that will be automatically executed and interpreted or it could be a fully atomic transaction where it deposits from ethereum executes a you know interacts with the exchange module makes some transactions and then comes back so the possibility here is really immense and one of the key focus at the injective labs team is to be able to build basically this type of like suite of tools that allows uh this type of interpretation and execution of arbitrary data transfer and i'll get to that later another thing that's really cool is the oracle component and obviously this is to support a derivative module so basically it's a very much of a future pool uh a future proof oracle module for the overall injective ecosystem so it powers injected derivatives and it currently has a pre-generalized support first of all it supports any type of arbitrary centralized oracle it also supports band oracle and chain link ocr and um one thing that injective labsum is currently working on is the d5 price fees and submitting you know more generalized data that's not only used for a derivative module and that's something that's very much exciting to look forward to so so far you know injective chain is still a very very new ecosystem but there's already quite a few like interesting milestones that are being hit um i believe this data is a little bit out of date so there's four billion in cumulative trading volume on top of injector pro which is one of the exchanges um there's seven million blocks produced since june of the canary launch um 21 million plus on-chain transactions since uh november which is a canonical which is kind of like the uh secure version a secure chain that the community agreed on and so far i believe there's around 1.5 million worth of inj burned which is uh 0.2 percent of the total supply give or take um so it's you know overall uh given you know like the burn process it kind of uh returns the value of the protocol back to the uh ecosystem participants and so far there's five exchange stabs i think there's two more that's coming up one that's actually announced today that's pretty exciting um and obviously with the v2 uh bridge we actually got we just saw a lot more traction with the redesign actually it's a quite simple redesign ui experience and basically it tells the user exactly like you know what the status of the transfer is and what's the eta whether something's wrong with it and that actually just exploded the uh interest and i think that's actually very very exciting because we never thought that uh basically just a slightly better ux will cause such a immense change within kind of like the user behavior and just in general you know with ibc and so forth um there's integration with cosmos terror osmosis and a lot more and it's one of the largest utilization of the ibc because injective and banned kind of uh feeds oracle data between each other and so ben kind of uh feeds you know like the most the latest uh price feeds you know from their cosmosim contract and submits it uh through injective oracle module and so that actually brings uh extremely heavy like ibc usage just because it's arbitrary data transfer rather than token transfer and i think you know like this data is also outdated it's probably around double that by now yeah so there's obviously a lot more exciting development for uh the injective ecosystem uh because obviously injective it's still a very very new uh community so obviously one of the most exciting thing that injector is working on uh is the cosmos and smart contracts and the reason uh why evm comes a little bit later i'll get by i'll get to that a little bit later um so basically the the reason why cosmos smart contract is so important for the injector chain is that it can be plugged in as a module that kind of sits within the injected uh core stack uh independently almost and yet it can interact very intimately with the injection chain core modules in a very cosmos native way so that this allows the manipulation of order data positions and also create a lot more possibilities that's simply not possible on injective before so overall you know at dnd injector is still an application uh specific uh or like an ecosystem specific chain so for the cosmos and smart contract it's mainly going to be about d5 applications that utilize the order book infrastructure so it uh it kind of encourages an ecosystem of decentralized applications on injective focusing on obviously defy trading you know prediction markets and other cool you know d5 wizard stuff and with the help of uh insuffin instant finality and also mev resistance i always get that wrong for some reason um so basically it creates a much safer environment for d5 builders and the possibility is just very much immense yeah and so basically the path for injective to reach the evm compatibility and adding that evm layer is actually a lot more interesting because it's going to utilize the shared security model of cosmos that's under works and utilize the injected validators to back and secure a kind of like a child chain of evm layer so that the block time are a lot more flexible compared to the main e3 injector chain so it's no longer constrained by that one second block time constraint and there's a very very intimate uh internal bridge that was actually worked on way back in the day by the injective labs team to be re-implemented once the share security model is out yeah so due to time constraints um i'll probably just make it very very quick for the rest of us um so injective is extremely special because it allows for data availability for expressive and discrete liquidity and it has this uh composability possibility that was never done before for like central limit order books and so obviously you know you guys can already imagine all the other possible things you can do on top of it amen with no il launching arbitrage bots you know mm strategies and basically you know like billion dollar hedge funds or a billion dollar prop shops uh strategies are being exposed on-chain and accessible to everyone and obviously that's very exciting and for injective as a chain itself it's going to be become like the liquidity aggregation and it's going to create this entire ecosystem a robust and deterministic low-cost order execution environment for d5 applications and hopefully you know one day the best slippage as well and yeah the possibility is simply endless yeah and uh yeah start now and this is the link for kind of interacting to overall injector chain and it's a great starting ground for end time developers or users and that's pretty much my talk

Automatic transcript — names and jargon may be misspelled.