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

Loading player…

Building the next generation of DeFi - Albert Chon | Injective Labs

ETH Belgrade CommunitySat, Oct 7, 2023, 12:00 AM

Transcript

[Applause] hello everyone thanks for coming my name is Albert Chan I'm the co-founder and CTO of injective labs injective labs is one of the core contributors to injective which is a layer one blockchain and today I'll be talking about injective and building the next generation of defy so objective on a high level is a blockchain built for finance our focus is on powering the next generation of D5 applications and providing a lot of powerful Advanced defy infrastructure for Builders first I'll talk about a little bit about the injective ecosystem injective is one of the fastest growing ecosystems in all of Cosmos we have numerous projects in the cosmos ecosystem in the general crypto ecosystem building with us or partnered with us and yeah lots of opportunity before I talk a bit about injective I'll first introduce the concept and mainly the power of self-sovereign interoperable application specific blockchains so I know this is eth Belgrade it's mainly an ethereum focused conference so some of these terms may be not that familiar to you but the general idea is that you know if you have your own blockchain with its own validator set there's many different kinds of applications that are much more powerful to build rather than you know just being a Dap in a written in this lady contract on ethereum so what are some of the benefits of building your application in this way the biggest one is performance and the first benefit you get out of the box is that your application code can run natively so you have native code versus virtual machine bytecode which is of course interpreted on a virtual machine and is less performant there are also many constraints into building you know your contract in a virtual machine namely you are restricted by all the constraints of the evm as an example so many of you guys may be familiar you know your contracts have to be less than 24 kilobytes in order to be deployed meaning you have to structure these in an awkward way you also just have limitations in what you can do you know whether it's just having a smaller set of op codes to work with or having to learn all of the idiosyncrasies of the evm or write your code and assembly just to get you know a little bit of more gas optimization and if you think more broadly about how the Next Generation and the most Advanced Financial tools and products will be built it's a very clumsy way to have to do this you want to have you know the full feature set of a modern programming language for example like golang and there are many benefits to doing this and one of the biggest ones performance wise for injective is parallel execution um so because your code runs natively and your only requirement is essentially to make sure that your code eventually is representing a finite deterministic State machine so you can use things like parallelism go routines channels all your favorite you know programming constructs and data structures to to design your application and it's a much more flexible way than you know being constrained by let's say a mapping of bytes 32 to a struct and then not being evil even able to iterate through the keys like you might have to do in solidity so generally developers I think and coming from the ethereum development ecosystem myself they waste a ton of time in having to be in such a constrained environment another big benefit of building on an application specific chain is the control you get over consensus one of the biggest benefits here for us are one second block times so injective is one of the fastest blockchains in the world today as well as instant finality and instant finality is a benefit that cannot be underscored enough on ethereum right now you must wait you know 64 blocks or two epochs for finality about 12 minutes and other chains like polygon you might have you know occasionally 160 blocks of a reorg so if you think about Advanced Financial applications let's say in exchange lending Market making that's simply a no-go right you cannot think that you know you you place a trade only to find out minutes later after the markets move that actually you haven't so instant finality and fast finality are incredible powerfully important principles the next point is flexibility so because you're you have full control over your state machine you can do many things that you other otherwise wouldn't even compared to other smart contract platforms an example of which is that if injective has ethereum compatible accounts this means you can use your favorite wallet like metamask trezor Etc Ledger and just have a work out of the box you don't even have to switch to network you can just work whereas suppose even if you were to build on Solana you were constrained by what Solana will will allow you to right you have to use their Phantom wallets your users will have to then switch wallets if they decide to bridge over it's just a generally bad experience one other very powerful um primitive that injective offers um is the ability to execute code in the beginning and the end of each block so for those of you who are coming from ethereum you know State transitions occur through transactions which are of course signed by users and then broadcasts to network and ultimately maybe some state in your smart contractual change let's say you know your balance however on injective and other Cosmos chains you have the ability to execute code in the beginning of the end of each block and this is a very powerful capability where you can do things like for example injective uses for order matching or orders that come in in as transactions get queued up and then our match then at the end of the block and we use this also in some very interesting ways which I'll talk about in the next slide and finally the last point is application control over consensus particularly with ABC plus plus so for those of you who haven't heard about the ABCI the ABCI stands for the application blockchain interface and the plus plus denotes like the next iteration of ABC plus of ABCI and there are a few things that you can do that I'll highlight one of them is an app defined mempool or an app specific mempool so of course mempools generally are you know a set of pending transactions essentially that nodes have but they aren't exposed to the application like for example your smart contract on ethereum can't you know look at the mempool right it's just not up to you to to to peek into however with ABCI plus plus you have the ability to for example Define your own validity rules or if you want to reorganize transactions within that block you can and protocols can use this in interesting and Powerful ways um one example I'll give you is prioritizing Oracle transactions of course we know oracles are very important um and you know there's a lot of different attacks like front running that can occur your application your your blockchain can decide hey I see these Oracle transactions come in I want to put them at the front of the block so that all transactions afterwards will use you know the latest Oracle prices you know you simply can't do that on on ethereum which is why you have things like flashbots and Mev and of course you know many vulnerabilities or think that way um that weight loss that you have to account for another benefit of ABC Plus or feature that it offers you is the ability for validators to perform work or consensus to perform work so that your network doesn't have to one example of this is suppose you want to have your validators themselves be the oracles or suppose you want to encrypt your transaction using threshold photography and have your validators decrypt them with multi-party computation so you can have private transactions you can make your validators do work as a part of consensus to actually do this whereas you know you you otherwise wouldn't and the final piece is on interoperability so injective supports IBC it's an IPC compatible chain and IVC or the inter blockchain communication standard is a you know one of the most battle tested standards for not only token bridging but all sorts of arbitrary data arbitrary arbitrary message passing and it's a very secure way to allow blockchains to interoperate and this isn't specific to some to just you know chains like injective or chains and Cosmos actually this is already being used by polka dot and other chains that can support this Lifeline proof system and the final piece is on modular design so as a you know blockchain Community we we can not have to reinvent the wheel especially in the Castle's ecosystem and reuse code and agree more easily agree on a set of Standards to design applications around so I'll talk a little bit more about some of the key Primitives on injective and some of the D5 infrastructure that injective offers for Developers the biggest one is the on-chain limit order book and limit order Book Exchange so injective has a fully decentralized on-chain exchange order book based exchange for spot perps expiry Futures and also binary options and this is um yeah the matching engine is on chain everything is on chain it's one of the most advanced and most highly performant taxes in the world today also bridging obviously IBC as I mentioned is one such bridge but injective also supports a variety of bridges including our own native ethereum bridge where you can you know in just five minutes deposit tokens into a smart contract have them appear on objective and be used in in your application as well as support for many other bridging protocols like axillar Wormhole and such oracles so many D5 protocols rely on oracles and Oracles of course have a wide a wide range of security and Trust assumptions and injective takes a unopinionated view and tries to support as many oracles as possible ranging from pith to band and even coming soon chain link as well as the coinbase Oracle and other custom provided oracles that you yourself can choose to provide next is injective smart contract platform which is offered by cosmosum or webassembly essentially on Cosmos and this is one of the most advanced smart Contracting Platforms in the industry today you can write your code in any language the most popular one is rust have it deployed on injective and not only interact interoperate with other contracts on on the Chain but also with the the native modules or native functionality provided so you can do things like let's say enter into a 10x long BTC per position pair it with let's say a 2X short each position wrap it in your smart contract and offer it as a structured product if you still wanted to it's highly interoperable and yeah the the developer experience since you're writing your contracts in let's say a rust or a general high level programming language it's it's very easy to do and finally one of the most interesting pieces that interactive offers is the ability for automated smart contract execution now this is um maybe a little unfamiliar for you guys since we created it but the general idea is that you as a developer have the ability to have your smart contract be executed by the chain itself even up to every single block so of course you prepay your gas and and such for this but now this opens up a whole new field of possibilities um and and reduces a lot of the other like complexities that you would have to otherwise include so on the ethereum side you may be you may be familiar with things like keepers which are essentially Bots that run functionality that any smart contract or a smart contract allows anyone to call and if the problem has always been how do you incentivize these Keepers or these off-chain actors to to you know actually execute this you know be be the White Knight and the answer is of course you have to pay them in some way maybe it's you get some you know liquidation bonus or some other mechanism and that's essentially kind of like database loss to the protocol and now you no longer have this if your application could automatically run like that logic automatically run let's say whatever bookkeeping or risk management things that it would have to do and just to illustrate a good example of this um we we try to reimagine automated Market making so on the left side you see the constant product amm formula x times y equals K that everyone knows and loves you know one one great innovation of crypto by uni Swap and we all know the the common pitfalls of this right namely impermanent loss most LPS lose money by you know providing into an LP pool and that's generally because you are shorting volatility right you make money through transaction fees or trading fees as you arrive as your I think it traded against the pool and you know of course crypto is very very volatile and you know that's that's usually not a good thing to not a good view to express so we had the idea of what if he could had um high frequency trading or a high frequency automated Market maker on a limit order book and and that might at first seem to be you know like uh colliding Concepts like an automated Market maker on a limit order book but actually it's not um if you consider the automated parts to be the fact that this Market making strategy can be you know on the Chain itself and executed even up to every single block right then you can have a dynamic strategy that will take in real-time data from the chain let's say Oracle prices volatility the the order flow that you get in real time and respond and Market make appropriately and the result is you can have a dramatically more Capital efficient and also um yeah Dynamic strategy that you know can make money next point is interoperability so interoperability is at our core we interoperate with ethereum with arbitrum with polygon and many many chains in the world out there so for the end user you have a very seamless experience where you can simply you know deposit your tokens happen to show up minutes later and be fully interoperable you know of course as mentioned you can use you can still use metamask you can still use your favorite wallet and provide generally a really good user and developer experience yeah um finally I'll talk a little bit about the ecosystem Venture group so injective has a 150 million dollar Venture group for Builders and projects to come all the way from the idea phase to launch phase and Beyond um as I mentioned injective is one of the fastest growing ecosystems so definitely if you're interested in defy and building the next generation of Finance um come meet us come talk to us we'll also be having a happy hour tomorrow at the hackathon venue from 2 to 5 PM if you want free food free drinks come by and and and come meet us all right thanks for listening you can follow us on Twitter at injective and yeah [Applause]

Automatic transcript — names and jargon may be misspelled.