Aave 🛠️ How to build DeFi applications with Aave & GHO
ETHGlobal·Wed, Oct 9, 2024, 12:00 AM
Join us for an Aave workshop! From November 17-19 2023, ETHGlobal welcomed developers from around the globe to take part in shaping the future of Ethereum at ETHGlobal Istanbul. Over $600,000 USD in prizes were given away at the prestige Istanbul Congress Center... thanks for an amazing weekend hackers! ----------------- Follow us: https://x.com/ETHGlobal?s=20 Check us out: https://ethglobal.com/ Email us at: hello@ethglobal.com
Transcript
[Music] so my name is Andrew Schmidt also go by defi sparten just about everywhere and I am a full stack developer and also developer relations engineer um at avara formerly known as a companies uh rebranding yesterday so the first question that I'd L of like to pose to set off this entire presentation is why do we actually use distributed ledgers why are we not at an Amazon web services comper just building these super scalable databases and it's because the databases that we're trying to build with are the foundation of agreements agreements with these properties that they're open neutral self- custodial and verifiable and now if you take a look at decentralized Finance why are we trying to build these applications on these networks when we could be making them 10,000 times more scalable and it's because we're trying to fulfill these certain agreements with the same property of the networks that they're built upon so forming Financial or custodial agreements which are open neutral self custodial meaning you own the assets which you actually have in your wallet and verifiable meaning you actually have traceability and transparency about every single step in the process and so with that in mind let's look at two specific things for this presentation the OB protocol and the go stablecoin so a high level overview of the a protocol there's mainly three actors within the system you have buyers who are addresses which are providing liquidity um receiving a tokenized representation of these assets and then they are earning yields uh and also can be used as collateral and where this yield actually comes from is entirely traceable on chain it comes from borrowers who are drawing this liquidity uh based off of parameters which are set by the a governance and are also based on the collateralization so every position within the AIT protocol is over collateralized uh it uh requires that that in order to borrow a certain amount it must fulfill the collateralization parameters set by governance and also that the Oracle uh price for both the supply asset and the borrow asset fulfill these requirements and then the third actor in this verifiable system is the Liquidator and this means that there is sort of this gap between when a position is Under collateralized and Over collateralized um where the user is under the minimum collateralization requirement and somebody is able to come into this system and repay their position and then seize a portion of their collateral uh plus a premium and this incentivized this means that there is always an incentive to liquidate a position uh when it's in this window between being un uh still over collateralized but under the minimum collateralization that uh governance has provided and then we have go so go is a stable coin native to the a protocol and we'll see exactly what that means on the next slide uh but the high level overview is that it's governed by the a DA so all deterministics about its Supply about its usage utilization are all based on decisions made by the a DA and the first thing uh that you really need to know about go is that the a protocol is not just uh built into go it really is the central thesis of go uh that the a Dao and the a protocol are the primary facilitator of go so how does I mentioned the word facilitator a couple times what does this actually look like um so go at the top here if you actually go to Ether scan and look at the Go token contract uh it's actually a pretty simple contract and it has this uh model called buckets where uh an address can be designated as a bucket um and it has two different fields the capacity and the level the capacity is a parameter set by a governance which decides how much go is this address able to Mint and then the level is how much go this this uh facilitator has minted already um so at the launch of go it initially has two facilitators the a facilitator and the Flashman facilitator these were both approved by a governments given a certain amount of go that both of them are able to Mint and we'll dive into exactly how the a facilitator is able to Mint go the next slide and we also have these sort of theoretical facilitators with the peg fa Peg Peg stability facilitator and basically any other type of uh minting model that can be facilitated on chain uh so how exactly does go interact with the a protocol I said that it was sort of native to the protocol but what does this actually mean as a developer as an integrator um so this is a function which you might be familiar with this is the standard borrow function of a uh whenever you would like to borrow a token from the a protocol uh this pool contract is the sort of the central hub for all a interactions and you're specifying the parameters that you would like to use for this borrow transaction and the the thing about minting go is that it happens seamlessly within the protocol so if I would like to Mint go it actually happens through this exact same borrow function the only difference is that I'm now passing the go address and whereas in the left box if I wanted to borrow wrapped ethereum this is borrowing assets which other people have supplied to the protocol in their over collateralized positions whereas when I'm borrowing go I'm not actually borrowing somebody else's liquidity I'm actually creating this liquidity uh by using the peg ability facilitator I'm underlying this call it's calling mint and actually issuing the go token um and this creates some really interesting Dynamics and and possibilities for what go is able to do and sort of the the basis of this is how the rate mechanics work so to First cover how kind of the base of a protocol handles rates uh most assets follow the same sort of trajectory where the the rate which is paid to suppliers and to Borrowers is determined programmatically um it's it's a function of a couple different parameters uh the main ones which are set by the a DA uh are to basically Define this curve uh the minimum interest rate the optimal rate and sort of the slope at which it increases um and then based off this utilization ratio which is the percentage of the asset which is currently borrowed uh it moves the interest rate up and down to either incentivize liquidity incentivize repayments um and this is sort of the central mechanism by which a it regulates kind of the rates of the market uh but go operates a little bit differently because it does not have the concept of a total amount supplied it can only be borrowed within the protocol at least through the a facilitator so it works a little bit differently um because it's minted the borrow rate is directly determined by a governance and there's also this additional parameters uh for the discount mechanism uh so the borrow rate there's a base borrow rate and then there's also a discounted borrow rate and kind of the way that these parameters work is that the a governance decides essentially what is the minimum uh minimum rate uh that is able to be borrowed at and then based off of that it sets how many go are able to be borrowed at a discount so for example with these parameters uh essentially it says that for every one stake Dava you have you are able to borrow 100 go at this discounted rate um as I mentioned multiple times these parameters are all determined uh on chain through Community governance so they're voted on on proposals which are then executed as code and then reflect these parameters for all users of go simultaneously and there's also a helpful calculator if you ever wanted to see exactly what these parameters look like at different uh different rates different amounts and now let's talk about the go stability mechanisms uh this is very very hot topic both within the OB community and also the defi community at large about regulating stable coins in on the context of stability and I'll kind of break this into two separate things you really have the collateralization stability and then the price stability so when it comes to collateralization the a protocol takes a a pretty Firm Stance on this which is that within the a protocol the go price is fixed at 1 USD now this does not mean that the price of the go token is fixed to 1usd what this means is that anytime you would like to create a new go borrow position to repay or to liquidate a go position it does it with the basis that the go token is valued at 1 USD how this works in practice is this effectively sets a collateral floor for go which means that even if the go price on an open market May fluctuate that within the a a protocol it must always have at least one USD of collateral backing and it sort of does this through the system of oracles so every Supply asset and every borrow asset has an oracle within the protocol and essentially by by fixing this price to one USD within the go Oracle it says that relative to every other asset that I'm supplying is collateral I must have one USD based on the Oracle of collateral as it compared to go um so this leads the question how does this translate to the actual open market price of go and this really happens um kind of outside of the Dow framework through the minting and Redemption essentially why are people minting go why are people uh repaying or withdrawing go and it happens for a couple different reasons you have sort of interest rate management these factors which um if I'm paying a higher or lower interest rate you know both within the protocol or compared to some other place that might incentivize me to borrow moreo or repay go and then you have this exchange liquidity which is really kind of the core issue of uh go Redemption which is that if I have one go inside of my wallet I need to actually be able to do something with it and that's really really core thesis of this presentation is how to provide these applications which are actually able to utilize go uh for an actual real world purpose or a defi purpose and there's also this Peg stability facilitator um which is essentially a facilitator module which would allow onetoone minting and Redemption against certain assets uh but this does kind of operate under the assumption that you need go within sort of a certain price range to make this feasible uh in order to maintain that you have the proper liquidity of all of the other assets within the the facilitator um so it works very well to keep the price of go pegged above a certain value um it will take a lot of maturity to actually get a solid collateral base to make sure that it has that onetoone redeemability uh but there are definitely optimistic and very uh Innovative thinking inside of the governance Forum about how to address these different problems with coordination and I will get to actually how to build these tii applications and really like if you're building a hackathon project I think one of the most important things is to try to embrace the values of the distributed ledgers which these things are built upon building these verifiable self- custodial applications uh which actually maintain these properties and the second is actually improving the experience layer there's kind of a tendency of hackathons uh to try to invent New Primitives and there's definitely a place for Innovation and redefining you know what DIY can be uh but there's also a very very huge opportunity in just improving the experience of current defi um and I really like this kind of uh framing it that you're trying to address a cold start problem with a hackathon project essentially the success of a new project can really be defined by how many users are you actually able to get a stable and engaged user base in the shortest amount of time so how are you able to build this Atomic Network and really I think the way that you sort of achieve this is by focusing on this experience layer what can I build which actually provides a tangible benefit to somebody today and we'll look at the a prizes uh in a second to see exactly how to do that so the highlights of kind of this link tree uh for how to integrate the a protocol is that uh we have this really really nice a address book which lets you embed basically all of the addresses within your contracts and the most most important contract to be familiar with is this pool. soulle this is where basic all of the core functionality happens um there's obviously a lot of periphery contracts for logic and tokenization but when it comes to actually interacting with the protocol um all of it happens through this one Central entry point uh and then there's also this Ava utilities uh it's a JavaScript SDK for fetching data formatting data building transactions it just makes your life a lot easier uh than having to manually import abis and do all of this work um and then we also have a lot of other uh Great Links to documentation and resources um side of that link tree and specifically for this hackathon we have two prize tracks best go stable coin integration and best AOW tooling so for best go stable coin integration really the key purpose of this is to increase the adoption and understanding of go so this is very open-ended but some ideas for you know things within the Dow that have been uh you know hot topics for go are different payment use cases things which will actually generate organic demand for go um currently know most of the utility of go is using it for other defi applications um you know other liquidity protocols um supplying to uh decentralized exchanges and there's definitely a lot of room for Innovation here with different locking mechanisms different types of U supplying go to different types of smart contracts um and this will definitely uh get even further increased once go is hopefully it launched on other networks uh we're able to do more complex things but even with go being only on eth Main net there is still a lot of room to innovate in this regard um and then the second is AOW tooling uh which is contributing new functionality this could also be integrating into an existing piece of of smart contract code um analytics visualizations or any type of creative application which benefits the AOW ecosystem um and really I want to put the emphasis here on creativity because so much of defi today is a lot of recycling it's a lot of focusing on the yield and not not focusing on the underlying uh you know what is actually happening inside of the system and any creative way to interface with this or highlight the different mechanisms that make defi unique um that make it something that's worth building upon um that's really the type of applications um which the AL da is looking to highlight and yeah so I'll just put this back up here again at the end but yeah that's the end of the presentation [Applause]
Automatic transcript — names and jargon may be misspelled.