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

Loading player…

Aave Grants DAO 🛠 Introduction to GHO: Payments Workshop

ETHGlobalMon, Oct 9, 2023, 12:00 AM

Join Miguel Martinez and Jess Glover from Aave Grants DAO for a workshop titled "Introduction to GHO: Payments Workshop". Thank you to everyone who joined our first in-person appearance in 2023! We are incredibly grateful for the support and contributions of all the hackers, tech mentors, judges, partners, and volunteers who made the ETHGlobal Tokyo event such a huge success. Without your dedication and expertise, this event would not have been possible. We would also like to extend a special thank you to the attendees who traveled from over 59 countries to participate in the event. Your presence and involvement made it a truly international weekend, and we are thrilled to have had such a diverse group of participants. With over 1070 hackers it was a pleasure walking into Toranomon Hills and seeing such a talented pool of individuals. With over 22 workshops, 9 talks, and over $375,000 USD in prizes we hope you enjoyed the weekend full of hacking, meeting all our incredible partners and learning from enthusiasts of the space. We are proud to have welcomed over 35% of attendees who were new to Web3. We hope this event sparked your interest in the world of blockchain and provided you with valuable insights and knowledge. We cannot express enough gratitude to everyone who contributed to the success of ETHGlobal Tokyo. We are already looking forward to the next event and hope to see you all there! 🎉🚀 ----------------- Follow us: https://twitter.com/ETHGlobal​ Check us out: https://ethglobal.co​m Email us at: hello@ethglobal.com

Transcript

foreign [Music] and hey guys I am Miguel Martinez thanks for coming I'm contract developer at other companies we have been involved in the development of goal and yeah we are here for that yeah um so today we're going to be talking about go um a decentralized multicultural stable coordinator to the ra protocol um we're going to be looking at an overview how it works and then my girl's going to like go into some live coding happy I'm sorry it's just innocent um so yeah firstly to look at how why we built go um we should touch on stable coins so stable coins are so important to the E5 ecosystem um they offer a fast efficient and borderless way to transfer a stable value on the blockchain so um currently despite the demand there is still a lack of decentralized stable coins so this moves along to what is go so go is a decentralized multi-class or stablecoin transferred and native to the Army protocol it's very wordy so um what does this mean um go does not have a single point of control so go with uh controlled by the Army governance and the protocol community um so go leverages the existing Army governance framework to provide transparency and verifiability so it means that everything is on chain you can see the changes that happen so this can be with interest rates and facilitators and more so the Multicultural side of things um we normally well typically assets can be sorry mentoring stable coins can buy a single asset backed faults so uh go and said is backed by various types of Supply classroom assets so this creates flexibility for a user so it means that a user can just mint based on their entire um portfolio um and go as native to the Army protocol it um one building it was clear that there was a lot of functionality in the existing system so things like liquidations and supplying so it kind of works very well like just fitting natively as a new asset um so how does go work go is an erc20 token designed to maintain a stable rate Peg to the US dollar so this is you can sell Supply collateral you can borrow though and then repay go debt so yeah as you can see from the diagram this is what happens in the protocol so um some instability mechanisms that happen with go uh the the RV price call will always value the one go at the equivalent value of one USD so sorry is this one this is um and then flash minting this is this provides the same functionality as the current flashlight mechanism in the RO protocol and is very important as it helps facilitate Arbitrage which is a very important stability mechanism foreign so go also introduces the concept of facilitators um so facilities is a protocol or an entity that can trust us the mint and bar and go tokens um are we governance and the community must approve facilitators so this is linked to the decentralization as I mentioned before and they set the limits for example the upper limit of go that can be minted um and it has been proposed to the other community that when glow is launched on the ethereum mean that that uh the rav3 ethereum pool and a flashman's facilitator will be the first facilitator sort of yeah so regarding Integrations so the question is how do you integrate or how to interact with the other protocol and go well there is a plenty of things there are plenty of ways sorry to interact with that if you are a smart contract developer you can make use of all the MBM packets available and there are both there are two or three for the other protocol and itself but there is also one for go you can install it in your repository it doesn't matter if you are using a hardware Foundry and you can install it and you will got the benefit of all the contracts there in case you are a building a front end you can use all the MDM packets available as well there is a JavaScript SDK that that is very useful and it comes with very handy functions to interact with the protocol also with uh with go you can submit transactions also fetch uh make use of answers to fetch data and it's also pretty useful when you need to transfer transform or manage units of the of the assets and in case of the data analytics and you wanna fetch all the data not only saved in live data but you are also interested on historical data you can use a subgraph there is one for Abe and also one for go so there is uh also very useful so here we have uh some simple examples of how you can use the JavaScript SDK to interact with go and also with the other protocol so as just mentioned the other protocol works as a facilitator within the uh go token which means that facilitator will be able to Mint goal and in order to do that users needs to provide some collateral to the to the to the protocol and after that they will be able to Mint War mint go from there so they will effectively borrowing go against the collateral so the first thing that they need to do is First Supply some collateral to his position so their position sorry so in this case we are making use of the the deposit function of the JavaScript SDK we need to pass all the parameters needed like for example the address of the user the address of the reserve that we're gonna deposit into the protocol in this case we can say that we are supplying a die also the amount and also the on behalf of the on behalf of is a particular let's say a special variable that allows that allowed us to set the the the user that is gonna be benefit from the from the action so in case you are interacting in your own behalf you need to pass their your own address so once we and once we deposit some assets uh we can just borrow some gold and in a similar way we just need to pass the appropriate parameters there like the others of the user the on the health of also the address of the goal reserve and it's important to note as well that the interest rate model interest rate mode should be viable also the interest rate of God is going to be fixed and controlled by the other governance implementation wise the gold Reserve is using a variable web token so we need to set there the variable rate mode and yeah in case you need to replace some of the Dead you always can call the replay function that allows you to increase your health Factor by repaying some of paying back some of your soldier that in a similar way you just need to pass the appropriate parameters there and it will work so this uh it's very useful is you need to integrate and go and you are building your front end for that but in case you wanna make it work from the contract side you also you will need to write a solidity wiper code so that's what I'm going to do now I'm going to try to do a little live demonstration of how you can build a little code to interact with the other protocol and go so yeah let's try it out congresswitz nice I take it thanks hey hey okay so um yeah I created this repository which is called the ghostly working Gore shop I will post the the link in the Discord channel so you guys can have access to it in this Workshop we are going through all the steps to [Music] um learn how to write a small contract as sorry the smart contract interact with the ghost stable coin and also the other protocol so and we're gonna use our Foundry project so if we run this First Command we will sculpt all the the project where um we are gonna set up all the [Music] um configuration needed and also um we all have also the project directories there what I'm going to do here is just to I'm going to create a test file um I'm gonna create a test per use case we are going through two use cases here the first one is gonna be a minting go based on the collateral that the usual deposited in the other protocol and the second one will be becoming a facilitator so you can mean go to a friend or someone else so and yeah I took the liberty to set up the project already so we can save a little bit of time so it will follow the steps uh here that I'll explain the getting started you will get reached to a point where you will have this solidity contract with two functions sorry is that so as I said there's gonna be two test cases one for becoming a facilitator and another one for mintingo so before the test cases um I made some configurations and some initializations uh here in the contract first I initialize uh some contracts that we will need and the die token the go token and also the pool contract for those that don't know the pull contract is the main point of introduction in the other protocol um so yeah this contract contains all the current logic and user facing functions so if you need to perform some any kind of action in the protocol you will need to directly call to this uh to this to this contract I also initialized uh a Neo eoa account I collect we right and I also top up that account with some die and doing that here we will run this test in a fork Network so we are going to use the deployment of go in the goblin Network so we are here specifying that we are using that Network and also specifying the block height and there is one only last thing that we are gonna do before the test we are getting uh taking the control of the gold token so more on this later but this will allow us to allow us to perform some special entities that are usually controlled by the other governance so yeah first we are gonna mean some go so as I said before the user needs to provide some collateral in order to meet the goal and and effectively effectively borrowing off from from the other pool so what we need to do here is uh call The Supply function of the pool and gonna check the the function in the pool interface so we can see what are the parameters that are needed to to be passed so we need to pass the asset the amount of and the referral code let's do that so pull dot Supply we are supplying dye right let's Supply 100 tokens with adding decimals and yeah the on behalf of we are acting on our own behalf and the referral code will be zero it doesn't matter at all before supplying we always need to approve the transaction so approve the funds so the other poll is able to pull funds from our account right so let's do that as well die dot approve approve and we are approving the address of the pool and we are proving 100 die tokens nice and now it's time to mention go yeah let's go so we will borrow from the pool let's find the function so we need to provide the asset the amount and the in the interest rate mode the asset is gonna be well the amount let's borrow or mint Tango tokens the interest rate mode is going to be variable so two in this case the referral code 0 and we are acting on our own behalf again and at this point we will have we will hold 10 go tokens and yeah we can just send this go Dockers to our friend so the others of our friend can be this one for example um since go is just a regular esc20 we can make use of the regular functions obviously 20 tokens that we all know so let's transfer let's transfer one to our friend yes and then build pockets nice let's try it out so we are gonna run this test boom is working it passed yeah nice so uh yeah let's do the other one so this is just a way to highlight how easy is to interact with the with the token and the other protocol is a cc as uh taking the contracts the functions the parameters that needs to be passed and there is plenty of documentation in there in the contracts as well and also in the developer docs so yeah it's just a matter to uh carefully review the parameters and how you are interacting the Second Use case is a little bit different different in this case we are not maybe interacting as a user we are more like uh some kind of entity so we are becoming a facilitator and we are going to meet a go as I said before we took control of the gold token to add a new facilitator into the system but is usually the avidal in charge of this kind of actions so the other governance is going to decide in the future who is going to become a facilitator the first facilitators are the Ave protocol and also there is going to be a flash meter module but yeah and I'm sure there are more facilitators will arise in the near future and there is actually some discussions in the governor's foreign around that so we are becoming a facilitator ourselves so let's call the affiliator function here oops yeah so we need to pass here the other side of the facilitator so the address that is gonna be allowed to uh mint go and here we need to pass the facilitator extract config facilitator here we need to pass the market capacity which is the credit line that if not this facility the facilitator will have let's say that we want to be able to Mint and one million gold Dockers why not the market level at the moment is going to be zero the level represents the amount of gold tokens that have been minted already and we need to provide also a label is Tokyo hmm um yeah so at this point we are already a facilitator in the system and we will we will be able to Mint uh go to our friend again so our friend can be this one so go document friend and I don't mind can be 10 code tokens or whatever let's try it out oh it's working nice so as you can see it's very easy to start out with with just a simple Foundry scaffold and some uh set up some initializations in the in the project and so on so hopefully you guys can find this helpful so you can quickly create your own um application installed dashboards and projects in general for the hack this hackathon are also in a in the future so that's pretty much all guys and we are looking forward to see how you and what you guys are building in this hackathon but as you come up with and we are around and there is a boost for Avion lens and feel free to come to talk with us to see what is going on on the other protocol the other companies or just to chat about the referend news of the crypto ecosystem thanks for coming okay we also have um every like a lot of ideas on the youth Global page um so have a look at there we're really interested in payments and account abstraction um but yeah thank you very much for coming and yeah please come and get some swag and yeah let's go foreign

Automatic transcript — names and jargon may be misspelled.