How to build next-generation DeFi Apps on Injective by Eric Chen
Ethereum Denver·Mon, Oct 9, 2023, 12:00 AM
This talk will focus on scaling Ethereum developer infrastructure that can be easily used to create DeFi applications, further boost user experience and improve efficiency to enable wider adoption of Ethereum. Injective has firsthand experience in building Ethereum developer scaling solutions and enabling new value transfer into Ethereum from new ecosystems such as Cosmos. Developers can leverage Injective's decentralized plug-and-play infrastructures to build innovative applications. The talk will aim to show how to use new cross-chain infrastructure to build dApps, how to leverage different DeFi primitives to create dApps, and how to bring more value and users to Ethereum. Injective is an open, interoperable layer-one blockchain for building powerful DeFi applications. Injective uniquely provides plug-and-play financial infrastructure primitives, such as a high-performance on-chain decentralized exchange infrastructure, decentralized bridges, oracles, and a composable smart contract layer with CosmWasm. Injective's network is highly interoperable, with over 10 prominent layer-one blockchains such as Solana, Polygon, Polkadot, and much more, becoming the primary gateway for developers to create cross-chain dApps. In addition, the developer environment on Ethereum is becoming increasingly accessible due to new tooling available so the talk will shed light into some of these developer tools and how easy it is now to build around the Ethereum ecosystem using a robust set of languages such as Solidity, Go, Rust, and much more. The talk will also delve into the technical upgrades coming up within the crypto ecosystem that developers can leverage to build their own dApps and enable more seamless cross-chain transfers with Etheruem across both the L1 and L2 ecosystems.
Transcript
all right good morning everyone seems like uh you know it's a light crowd today uh at least you know I wouldn't show up at 9am um so this is Eric Chen co-founder and CEO of injective labs uh we're the core contributor to injective uh the blockchain bill for finance and today I'm gonna do like a quick overview of injective and how we're focused on building you know like the new HFA connected uh Financial stack yeah so coming from personal experience and also like I'm sure most of developers have uh have faced similar issues you know when you're building within a monolithic environment whether that be um ethereum evm uh whether that be you know Solana whether that be um you know the the newer and cooler like movie M um it's generally you know uh built and um kind of optimized around a more generalized uh context so this means that whenever you build some uh evm like that whenever um you know what you're structuring the gas economy whenever you're making any type of opco considerations you're always going to be kind of making as broad of a coverage as possible which basically creates kind of like this uh you know awkward equilibrium for each uh specific vertical because every single sector or every single vertical they have different types of like economic considerations they have different types of like computational requirement or you know storage requirements and obviously you know one of the biggest problem currently within D5 is Mev um you know some people might argue it's a feature some people might argue that you know it's a detrimental to the best possible user experience or the uh the most Fair experience for D5 but you know it's certainly a highly debated topic and um you know this is kind of an unavoidable topic for any type of uh you know uh generic or like monolithic later ones on top of that you know certainly it's a very very high gas cost given the interactive nature of a lot of the D5 applications and D5 infrastructures you're going to be consistently running into issues of gas costs because within like a traditional centralized World um orders gets uh you know within like an order book order gets updated you know uh quite quite a few million times every second so the computational resource required to simulate like a more traditional Financial Market in the financial infrastructure is certainly you know practically impossible within like uh decentralized and um basically a peer-to-peer setting on top of that you know D5 keeps getting hacked every uh every other day and that's you know kind of like the norm these days um that is mainly due to you know perhaps lack of understanding within you know how evm works or within how um you know the general best practices when you're building facility contracts or whatever you know language you guys prefer um and then on top of that um it's just a giant Honeypot due to the transparency which is a huge obviously Pro for uh you know defy but it often causes issues with um you know kind of Highly parametizing and quantifying to exploit value and really motivating a lot of the um you know Bad actors to kind of uh take advantage of opportunities now it's certainly a good thing because it kind of demonstrates uh the censorship resistant nature and the permissionless nature of defy contracts but it's definitely not the best uh you know uh developer experience stability is another issue um basically we're kind of framing this within the context of scalability um generally within a monolithic environment most of the services especially for eve2 it's been highly stable but at the same time if you're trying to seek for more scalable environments to build your application to deploy your application it starts to become quite a bit of a significant problem for a lot of D5 applications given that you know a lot of the scalability solutions and a lot of the layer 2 Solutions are you know very much of a nascent space and as we've seen there's been historical uh halts reorgs downtime Etc across most of the you know a major scaling Focus Solutions whether that be like another faster L1 or whether that be like L2 Solutions and another thing about uh you know the the last thing is certainly oh wow it turns out there's a bunch of slides I can go to school one by one um so scalability is certainly you know one of the biggest issues within you know D5 because of the highly interactive and uh you know computational uh intensive nature of uh uh you know D5 contracts and most of the you know protocol designs and certainly there are a lot of you know existing work around how to optimize for gas how to you know create a lot of uh uh I would say you know like very neat little tricks to make sure that you know it's as not interactive as possible it's um you know as gas efficient as possible but especially as we see you know um more adoption more usage within the monolithic environment let's say you know like ethereum during the really really hot times or when people are really really passionate about nfts the gas economy kind of spills over to the other D5 applications and makes the cost uh for using or kind of the economics of a lot of D5 protocols and viable um well or it's a certain uh you know certain level of gatekeep Because if you think about it unisaw V3 represents every single LP position as a you know uh practically speaking as an nft this means that you know you're every time you're creating um like a liquidity distribute Fusion within a market or you're you know just updating trying to prevent yourself from being uh adversely selected you're basically trying to Mint and burn mint and burn like hundreds of entities and that is certainly not you know like a viable and you know some people might ask like okay why not like going through like arbitrum why not going through like optimism um and that's because you know like it's really like uh um kind of buying time for like a you know consistent issue as adoption grows um within the evm context you know like gas economy um uh the overall you know optimization is generally considered in a monolithic context so a lot of D5 applications will basically have you know uh kind of like a cap scalability uh and you know kind of a limited uh pathway for them to kind of really truly expand without having to face a significant sacrificing composibility uh Integrations and a lot of the um other security related issues as well yeah so so injective is basically um kind of like the solution or one of the kind of tentative uh possibility uh where developers can look to to kind of work around a lot of these problems with defy you know certainly there's no perfect fix uh for a lot of the pre-existing issues that's because of you know consensus design centralization issues and more importantly you know um the the fundamental underlying cap theorem but you know injective as a blockchain as a infrastructure that's highly optimized for financial applications uh can basically bridge that Gap and present like a pathway forward where there are just so much more possibility for horizontal scaling and so much possibility for a lot of the optimization where you know the entire ecosystem is vertically or focused on a certain vertical so injective as a blockchain is built on top of Cosmos SDK and it has a lot of you know native and out of the box integration for ethereum like I mentioned before a lot of developers on you know uh day one or one whenever they're considering building uh on top of ethereum building a slowly smart contract kind of like how the injective labs team started off thinking about you know trying to build like a application on top of ethereum um the the biggest downside uh for moving off of that environment is you know the lack of co-location with uh where the primary flows are the lack of composability uh you know the issue with the bridging infrastructure um you know like uh so so many problems just just in general but injective certainly presents a solution to try to resolve that because when we were trying to build uh you know back in 2018 or 2019 a fully decentralized and on-chain or trustless order book infrastructure we ran into the exact same set of issues we ran into you know a lot of problem and it kind of like pivoted the direction of what we want to build towards um for us it's really about like we're imagining a lot of other developers are probably going to face the same set of limitations building default applications um you know face the same set of problems and we basically decided to build that infrastructure ourselves and one of some of the highlights about injective is that it's a very very fast it has currently you know a one second block time thanks to a cosmos SDK and some optimizations done on top of it it's highly interoperable by IBC and also an internal Bridge module within the injected blockchain itself which allows for bridging of assets uh through uh you know the value well the bridge will be secure by the validator themselves with economic bonding and that bridge that bridge module is also you know a highly uh well added at this point and highly secure and it also allows for arbitrary passing of data where a lot of developers can also build different types of composable uh measures and also different types of Integrations and a lot of really creative ways so you're retaining that composability uh at the you know like con of you know losing out on the atomicity and for a lot of scaling Solutions you obviously cannot uh have atomicity and one of the cool parts that you know um injective done something very special uh uh you know uh within kind of like the cosmos SDK stack I decided to go with the ethereum key derivation which basically allows for any type of ethereum user utilize eip712 to sign messages to be able to send transaction directly to injective chain without even having to realize it they switch chains or they do this and that and that is kind of like the core of the infrastructure itself is to you know really truly empower the application applications and the developers building on top of it um at the end of the day you know for a blockchain that's focused on a certain vertical the base layer is kind of designed to be the best possible environment and will evolve uh consistently to you know try to maintain the being the best possible environment for D5 Developers so on top of that um you know certainly the bridging infrastructure and a lot of like the bridging solution has grown you know exponentially since injective blockchain launched last year and there has been you know consistently a lot of Integrations that are ongoing I think most recently you know Wormhole deployed on top of injective to bridge over a lot of assets I think Solana for a first time to the cosmos ecosystem and on top of that you know with the axillar and IPC native integration it kind of allows injective to practically connect to uh arbitrarily connect to any type of new and hot projects out there with a lot of the very neat composibility features and one of the things that are very that's very special for injective like I mentioned before if you're building within a virtual machine environment the gas economy and a lot of the uh considerations for it becomes very very difficult for uh D5 modules and you know D5 use cases and so one of the most important part about injective as a blockchain is that there are core modules and core infrastructures that kind of allows developers to leverage and allow users to kind of go through this uh how do I put it like a lighter or like a more optimized path towards performing a lot of you know chain native interactions so one of the most important module within uh you know that's type that set of what three modules is in the exchange module so that basically allows for an Mev resistant exchange module that completely resolves front running issues via frequent batch auction um and this basically allows you know uh during the entire uh during that like block production period uh of roughly one second um there are no possible way for anyone to front run like a certain order or to really censor it per se and because you know frequent batch auction completely alleviates that and kind of prevents any type of uh sandwich attack issues um there's also on-changing derivatives mechanism since you know maintaining margin pruning positions pruning order books liquidating positions is certainly a very very computationally expensive task within uh you know any type of virtual virtual machine environment um it it now becomes basically kind of this native module which has you know very much bare bone logic that allows for developers to leverage that and to allow users to access those services at a very very kind of uh low cost and as a matter of fact one of the coolest things about uh injective exchange module is that the users might uh does not even need to pay for gas when they're interacting with anything uh with relating to the exchange module and that's because you know one of the main consideration for uh D5 developers building applications on top of injective is that acquiring token for gas is certainly one of the biggest issue and We've ran into it consistently within you know a lot of L2 Solutions and any type of L1 solution onboarding and it really wants uh you know uh applications that are building on top of injective to really just face the users kind of head on in the most intimate way possible and let the user kind of just forget that you know they're really being powered by injective in the back uh in the back end and basically this allows you know applications to decouple from kind of like this uh uh kind of close ecosystem of a certain like blockchain or L1 but rather empowered Ms like application developers where user can just kind of uh coming from whatever ecosystem or whatever like multi-chain World they can just interface with this application directly without having to go through a mental barrier of onboarding to a new uh uh L1 and obviously you know just utilize good due to the kind of restraint uh restricted nature of a lot of these modules you basically need to have a VM layer and that's um that's basically you know kind of like a small contract environment um and for injective's case it utilizes cosmolism which is a rust-based you know wasm environment um and this basically allows for any type of a new protocols to be built a new mechanism to leverage the native chain modules and to kind of build really really cool stuff and really really cool features that are not uh that has never been seen before within kind of like General D5 ecosystems and also any type of uh um applications within the multi-ching world So currently you know like there are quite a few dexes built on top of injective uh there are they each have their own like really really cool features uh for example Helix is a you know Premiere one aka the boring one because it's built by injective Labs Cordy allows for um kind of like interaction with exchanges without having to actually sign the message via like obviously uh granting process which allows you to delegate permission for a certain restricted action like placing limit order book to a certain address that can just automatically perform that action for you without having to go through your Ledger and those are time expiry so it you know guarantees security as well um there's also dexterium wavefully which is doing cool things but I'm running low on time oh nice I got a minute yeah and like I mentioned before so the cosmopolism is really where all the cool stuff gets to happen within the injective ecosystem this is where developers really get to flex the muscles uh build a lot of really cool smart contracts uh build you know very interesting uh Primitives and there are just so much so many cool things about like Cosmos and that and I unfortunately don't have the time to get to but I would love you know a lot of people to check it out on the injective website um because there's also going to be an upcoming hackathon on Power by the injective ecosystem it's a you know leverage the cosmom layer and a lot of uh and build a lot of the really cool applications or go through a certain track to build you know very very specific tools Etc um and you know currently there are quite a few projects there are that has already deployed on top of injective utilizing the cosmosm layer whitewell is a great example Ash report uh you know being one of the first kind of like new deployments uh by ass report to injective and yeah and recently you know um the injective ecosystem has grown uh very much exponentially there has been a lot of uh you know Venture groups and also ecosystem initiatives and also hackathons are you know uh starting or you know that has launched to be able to support a lot of Builders and developers that wants to build truly cutting-edge and you know Innovative defy applications because within kind of this infrastructure or within this injective uh environment if you interact with the modules extremely well this allows you to build a lot of really bleeding edge and really Innovative applications that really you know would have been tossed out as impossible within like let's say like an ethereum uh environment or evm environment or any type of other environments thanks for listening
Automatic transcript — names and jargon may be misspelled.