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

Loading player…

Aave 🛠 Hacking with Aave v3 - Miguel Martinez

ETHGlobalSun, Oct 9, 2022, 12:00 AM

Join Miguel Martinez of Aave for a workshop titled "Hacking with Aave v3". ETHGlobal hosted ETHMexico in Mexico City 🇲🇽 - our first IRL hackathon in LATAM in over four years. This year hackers had the chance to build the future of web3 with a chance to win over $150k+ in prizes from teams like WalletConnect, dYdX, AAVE Grants DAO, as well as experience talks from guest like Vitalik Buterin and Aya Miyaguchi! Thank you to the 580+ attendees from 27 countries who joined us for this unforgettable weekend of learning and hacking. For Mexico, 65% of hackers were from LATAM, and 46% were new to web3! Thank you for being a part of it! ❤️ After ETHMexico, we are heading straight into a full month of learning & building 🏗 Get ready for ETHOnline, our largest online event of the year! --------------------------------------------------- Follow us: https://twitter.com/ETHGlobal​ Check us out: https://ethglobal.co​m Email us at: hello@ethglobal.com

Transcript

foreign [Applause] [Music] thanks for coming first of all I want to give a huge shout out to the organizer of the event this is really cool thanks for having me here this is a real pleasure I'm Miguel Martinez solidity developer at other companies um yeah I've been involved in the development of the third iteration of the other protocol that was released a half a year ago and this is why I'm here today for I'm going to give a great overview of the new features that the of the version 3 of the protocol as well as giving you some really cool ideas to be on top of them also I'm going to go through some of the developer resources that are available for you guys to create a stunning things as soon as possible for the herathum so yeah let's start for those that don't know whatever is or however works this is a quick 101 about the protocol the users can come to the protocol with some crypto assets and Supply them in order to earn some interest on it they can also use them as collateral to borrow crypto assets so they will take out over collateralized loans since they since these positions are over collateralized the value of the collateral should be always higher than the value of the assets that they borrow so users need to keep a maintain their positions and if they don't do it there is a third actor in place called Liquidator that has the ability to pay someone's debt and claim some of the collateral at a discounted price the interest that the suppliers are earning is based on the interest that the borrowers are paying for their loans and this the interest rate of the loans are calculated algorithmically so this is what why the other protocol is called an algorithmic lending Market yeah there is around 12 billion dollars of total value lock in all the net all the markets of the other protocol in the protocol we have the concept of Market which is each deployment of the protocol on a specific Network so the previous iteration of the area protocol the version 2 has a worse Deploy on multiple networks like ethereum polygon and Avalanche but the third version was deployed on some other networks like optimism arbitrum Harmony and also Phantom there is also some other let's say peculiar markets like for example the real world assets one forward by centrifuge and also the permission at markets are Arc which also is also powered by fireblocks Shiba bank and securitized among others a little bit of alpha here there is more markets coming soon so you're gonna getting to know just take a look to the governor's Forum there is a lot of discussion there is really brings uh groundbreaking new features on top of the foundational elements of the IB protocol like for example a tokens a stable rate instant liquidity credit delegation and so on and so forth and there is three main areas of innovation Capital efficiency risk and security and also decentralization so let's dig it into the capital efficiency the first one the big one is portals portals is in my opinion one of the most interesting ones in terms of ux and also multi nature since it gives the the opportunity to the users to bridge assets from between chains in a simplest way so well the previous iterations of the protocol were deployed on multiple networks with minimum TBL the users have no way to move assets from one network to another in an easy way they had to withdraw the assets from the market of the On the Origin chain and then Bridge these assets and finally Supply the assets again in the destination Market with portals users don't have to bridge their Assets in their own they don't need to unwind their positions and they can Bridge the eight tokens that are with a tokens is what is called the the assets that are provided to the to the protocol they can reach the a tokens from one network to another in a seamless way without losing a penny of a dollar on interest all in one transaction so portals is not a bridge solution to be clear portal is portals is a set of contracts that are that contains all the logic needed for supplying Assets in other Fair manner by special entities which are called ports a port is just any kind of entity that is while listed by the community by the governments as a authorized bridge that is able to move assets between chains so let's say that I usually wants to bridge a tokens from ethereum to arbit room this port will take the eight tokens from the user on ethereum and will mint in an instant way freshly new a tokens on behalf of the user in the destination chain in this case arbitrun now the port should we draw the a tokens from the origin Chain Bridge down the line from ethereum to arbitrun and finally backed the underlying tokens that backed the a tokens that were minted previously in arbitrary in this way the process the protocol is completely solvent and backed at the end of the process as you can see this feature will bring about a brand new wave of use cases on top of the on top of the protocol because it allows to uh Bridge Assets in a seamless way and we will see for sure protocols for cross chain borrowing or things like that yeah this is efficiency mode this allows to increase the capital the collateral efficiency of the protocol providing higher collateral factors to the users this is possible when the user is supplying or burrowing assets that belongs to the same group of assets also known as categories what is a category that's that's the question a category is just a group of assets that shares the same nature or characteristics we need to categorize the Assets in groups because there is a variety of asset listed in the protocol that has different characteristics nature or even price volatility so grouping the assets that have the same price correlation allows the protocol to minimize the risk as well as provide higher collateral factors to the users so in this example in this diagram you will see three categories you have the stable concategory also one for if derivatives and also another one for BTC this is just an example we could have different categories in the future and needs to be decided by the community for sure um talking about the stable against category here we have the usdt die usdc in some markers there is even the the Euro pairs here and in this case dye is giving 75 percent of total Factor while usdc is given 80 percent of collateral Factor so that means that the user when they use die or use the C as collateral they can take out 75 or 8 80 die out of their 100 die or usdc but if the user joins the stable remote category he can enjoy a maximized volume power and he will be able to you got up to 9 97 percent of collateral factors so the user can borrow up to 97 die from uh using their uh 100 Dias collateral in this case yeah so this particularly interesting for use cases like high leverage tokenized position or even high leverage farming positions and this this also allows to have Diversified Diversified risk management position since now the usual can choose in which category wanna play yeah in terms of risk on security there is a bunch of new things that the governance can enact to keep the protocol a lot safer the first two is Supply and borrow cups these two are pretty easy to understand there are limits that can be placed on individual tokens on the supply or the borrow or the borrowing side so the user can only Supply or borrow up to a certain amount this is very useful for mitigating attacks like Oracle manipulation or infinite minting in these cases the attacker tries to check the system in some way Supply an a large amount of collateral in order to drain the liquidity so with these caps the protocol can now limit this kind of attacks these two measures come Hand by hand together with the isolation mode but isolation mode is more interested when assets are getting listed in the protocol when an asset is listed as isolated you can only use these assets as collateral by itself you will only be able to borrow stable coins against it also the isolated asset has a depth ceiling so the user can only borrow up to a certain amount of stable coins using these isolated assets as you can see Assets in isolated mode in isolation mode allows the protocol to isolate their risk and special to a certain assets and this is pretty powerful because it allows the community to list Assets in a more secure way so Network assets can get listed in the protocol with maybe more conservative Rich parameters to start out with and basically prove themselves as a viable candidate candidate to get completely listed as collateral in the future so I can imagine assets being listed as uh in isolation mode first then going with some Supply and borrow caps and at the end none of this measures are all yeah the centralization the third version of the protocol comes with more fine-grained permissioning and roll system that gives more flexibility to the protocol so first we have the risk admins these are entities that are well listed by the protocol and the governance that has the ability to update the risk parameters of the listed tokens or assets of the protocol we've had without the needs of an Unchained boat so things like collateral factors equation thresholds or even interest rates are the things that can be updated by this but this role um these entities could be maybe contributors of the avidile like for example Gauntlet which is a contributor that has been pushing risk updates regularly for a long time or even some kind of automated agent that pushes updates on the risk parameters given some metrics of the assets this is maybe the case of the chain links proof of Reserve technology it is something that has been has been discussed in the community Forum the chain link proofs of Russia's research technology allows to Monitor and keep track of the shares of the asset of those assets that requires some level of over collateralization or things like that so things like stable coins or Bridge assets so if the invariant doesn't hold if these assets are not over collateralized anymore there could be an automated agent that keeps track of this event and updates if they reach the risk parameters accordingly or even past post the their Sheriff of the protocol also lifting up means this is just another entity of the system that has the ability to list any assets in the protocol a part of the let's say canonical or regular way of listening assets and also the isolation mode we could have new innovative ways of listing new assets for example we could have a permission listing or listing new assets based on a certain amount of tokens that are stated stacked in the in the protocol just a way to backstop the the in case of a short call event for example so this could bring new interesting strategies to list new Assets in the protocol yeah of course there is a bunch of more new features that came together with uh with the version 3 of the protocol there is the introduction of the permit on all the functions of all the main functions and user facing functions of the protocol this is a way to save gas basically so the users don't need to approve before the actual action they wanna they wanna perform also the repayment with a tokens pretty useful in the case the user uh Supply and borrow the same asset so they don't need to flash loan and swap or swap with collateral and things like that this is also pretty relevant these days because it allows to mitigate the risk of having assets or under Alliance being blocked in the contracts because now with the this feature of repayment with a tokens there is no need to retrieve the underlying assets of the pool from the pool we could have secondary markets around the a tokens so if some entity locks the underlying tokens of the that is there are that the pool is holding nowadays is not gonna be an issue anymore there is also a simplified platform function this comes with a 20 gas reduction uh pretty useful in case you want to take a class loan of only one single asset also another entity called our flash borrowers free relevant for those uh for those protocols that are using other flat loans in a day-to-day basis and also uh a new a new set of smart contracts that allows having multiple rewards at the same time uh for the users so now any everything can provide incentives so the users can get more rewards using some kind of Assets in the protocol and yeah let's dig it now into the resources that you have available in case you're gonna build stunning things on top of it so just a bit of context the pull contract is the main point of interaction in the other protocol it contains all the crucial and key functions there is some pretty simple functions like Supply borrow withdrawal webpay and things like that and there is also secondary functions like for example liquidate plus loan enabling a mode enabling an asset as collateral among others so if you want to interact with the other protocol you should take a look to this contract and start talking with it basically if you are writing smart contracts I encourage you to take a look to these two npm packages the other core B3 and also the other periphery V3 if you want to talk with the pull contract you should use the the core packets and you're gonna interact with the rewards with the treasury contracts with UI adapters you should do usages the periphery one there is also this QR code that links to the registry of npm package there is a lot of interesting package packages there just take a look there is one for the Ave token also another one for the cross chain governance adapters and yeah there is also a very helpful and Powerful packets uh which is a JavaScript SDK so it contains a lot of contract helpers that allows you to interact with with the protocol we have the need of loading the contrast FBI and all that work this also a really powerful tool which is called Ave sandbox with this cool you can take any production Market be sure V3 and create a fork of it inside of a heartman heart node you can also first shot all the listed assets so you can create complex positions and you can even connect the interface of the other protocol with this environment and just try yourself how does it feel from the UI perspective so please take a look if you want to create something really quick during these days now you're gonna if you are more interested in that data and the data and you want to fetch the live data so what is currently going on in the other protocol right now you can use the this couple of contracts these are Concepts that can be used as data providers they aggregate all their relevant information in this case we have the UI UI pool data provider that contains all the relevant information for the pool and also for getting to know what is the state of the user of a usual position inside the pool and also the UI incentives data provider that provides all the information regarding the incentives so what's the distribution of the incentives what are their addresses the apy and things like that there is also another package that allows you to format all data so you can apply the correct decimals to each thing and I think it's also pretty useful and helpful and then there is also the if you want to take and retrieve the historical data this is just the soup graphs that are available and and yeah you can just fetch the usual transaction history or historical rates or even the balances of a user of or of the pool at a specific blockade and yeah that's pretty much all guys these are the prices for the hackathon please be creative there is a ton of things that you can create I already give I gave some ideas of cool things that you can create like for example High leverage positions Diversified risk management also automatic agents for listening assets or for all that in dating risk parameters also protocols for cross chain borrowing for sure so let's make your imagination fly a part of the things that you can build on top of B3 there is always a lot of things that you can create uh for example on the governance side or just as an integrator in the governance side there is a real need of tools applications and event dashboards not only to enhance the governance process but also to increase the participation of the governance which is also always a really good good theme for the protocol and of course there is a lot of room for to innovate in the case you are an integrator because you can create a fixed term uh lending a fixture lending protocol or also under collateralized lending protocol or everything that comes to your mind interval in terms of supplying or borrowing crypto assets if these ideas are not enough you can take a look to these Pages there is a call for hackers here also there is some interesting Brokers for proposal on the other Grand style side and for sure the developer docs are pretty helpful for all these and that's pretty much all guys it's a real pleasure thanks for coming and if you have any question or you want to talk with us uh what's going on in the cryptocosystem of what's going on on the other companies or the other protocol just reach a shout I will be around next to the lens Boot and the other boat thanks a lot

Automatic transcript — names and jargon may be misspelled.