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

Loading player…

Chronicle Workshop - ETHGlobal Brussels 2024

ETHGlobalWed, Oct 9, 2024, 12:00 AM

Join Bianca Buzea from Chronicle Protocol, for a workshop to learn how to integrate the future of Oracle data feeds for crypto asset prices, yield rates, and RWAs from the team that built the first Oracle on Ethereum and continues to power MakerDAO, Spark, Morpho, and more. This workshop took place during ETHGlobal Brussels, a 3-day hackathon held in Brussels, Belgium from July 12 to 14, 2024. ETHGlobal Brussels brought together the most skilled web3 developers, designers and product builders from all around the globe for a weekend-long adventure to advance the Ethereum ecosystem! ---------------- Follow us: x.com/ethglobal Website: https://ethglobal.com Email us at: hello@ethglobal.com

Transcript

[Music] welcome to the chronical Workshop I hope you enjoyed the small break we had before uh today we will talk about scalable decentralized and cost efficient oracles before that I want you to picture the following scenario imagine you are a Craftsman and you want to build a boat you want to build the most amazing boat out there and you're spending months and months uh crafting your boat finally after all this hard work you're ready to test out your boat but you soon realize that there is no water close to you you cannot test your boat your boat is pretty much useless when it comes to uh decentralized applications that use uh data data from The Real World we have pretty much the same scenario if we cannot provide this data to those decentralized applications use cases such as um stable coins decentralized exchanges decentralized insurance and many more other need this data in order to function properly and here is where Oracle comes into play uh oracles are the bridge that allows the smart contracts from different decentralized applications to access real world data a few words about myself uh my name is Bianca buza I'm recently joined the chronical team as Lal you can see uh my socials out there you can also find me at the booth uh in front throughout the weekend so I'm more than happy to support you with your projects on today's agenda uh we already saw uh the problem we are trying to solve we want to see how we can bring this real word data onto the blockchain now we're going to look uh why Chronicles specifically and then we're going to have a short application we're going to see how we can get the eat uh USD price feed on chain and then we're GNA build a small D apps we're GNA have a token vendor a smart contract where basically you can pay it and in exchange you're going to uh get a specific token a token that uh we built before now a few words about uh Chronicle we are the Oracle that has been powering maker since 2017 last year in Autumn I was span out of maker under the branding of Chronicle and now we are open uh to the community so come build with us in terms of uh TVs or total value secured uh we currently secure over uh six billion uh of Assets Now chronical uh oracles cribe uh it's an extremely gas efficient Oracle uh using aggregated schnor signatures schnor signatures have existed for a while uh they they were starting in 1991 uh they even are integrated into Bitcoin however this is the first time when snor signatures are used in the context of uh web free oracles now what sets us apart uh is that Chronicle offers uh decentralized verifiable and scalable uh oracles and we're going to take this one by one and see uh exactly what I mean by this first off decentralized feeds uh feeds are also called uh validators or as you can see our validators are reputable players in Thea in the space which means that they have a stake with their own reputation to make sure uh that the data they provide is accurate chronical oracles are also uh verifiable uh we have end to end uh verifiable data and let me show you a brief uh demo of what I mean by that uh so here is the is our website chronical labs. org and you can go to launch uh dashboard and let's say for example I'm going to take the no USD uh you can select select on the timeline a specific uh date you're you're interested I'm just going to take a random one and you can see uh in here the different uh validators that I was uh talking about for each of these validators uh let's let's say um defi saver I can see uh wait I can one second I press the wrong thingy okay yeah you can see in here this is the right page you can see in here all all the different uh validators and for each of these validators uh you can see uh the actual uh data sources so let's say I'm taking the gitcoin validator you can see all the G all the data sources that have been used and as you can observe it's a mix of onchain and offchain uh data sources with very good liquidity another cool stuff uh you can do you can verify cryptographically in your browser that the data uh hasn't uh been uh manipulated so if I go here at uh verify I can see that uh the signature is the same however if I modify even slightly let's say I delete a zero over here we're going to see that the the signatures uh do not match anymore okay back to my back to my presentation in terms of uh scalability because of the optimistic schnore signature that I was mentioning before uh we are able to achieve gas cost of over 60% on l1s and 68 on l2s and this is pretty awesome because it allows for the first time when it comes to web free oracles to decouple gas cost from the number of validators as you might know oracles are expensive so if you are an oracle provider you pretty much have two choices up until now either you increase your prices which makes you less competitive in the ecosystem or the alternative you reduce the number of validators or the number of updates which results in St data and potential threats on security and decentralization so that's why it's really important to be able to make those gas reduction actually within the protocol such that you can still have this Rich ecosystem of validators and actual decentralization now now why we're here it's a hackathon we're offering uh 10K uh in bounties spread across uh free tracks the first one is the defi track here pretty much any sort of defi integration uh qualifies so if you want to integrate our chronical oracles for use cases such as borrowing and uh lending the apps decentralized exchanges liquidity mining prediction markets table coins Etc next track is the Innovation track uh here we're looking for Innovative projects and The Innovation can stem either uh from the utility of the project or the idea itself and please feel free here to scan uh the QR code if you scan that QR code I'm going to wait a moment for for people to get a chance I'm going to walk you through the the page that will uh pop up uh when you scan that QR code we got it okay one one more moment so when you scan that Q code it's going to take you to this uh Bounty page you can see here for each of the bounties you can see the overview of the bounties with all the details uh both for the submission both both some ideas for uh the projects uh you can see here the GitHub repository um that we're going to work on uh today some more information of how to use the C uh the chronical oracles resources very important here for resources we have a scaffold Oracle reader uh built on scaffold e to so those of you are familiar with Austin's Griffiths uh scaffold it to uh we are using that uh to leverage for our Oracle and very important here you have uh the different addresses for our oracles on different uh networks so you can check out the different networks some of these uh chains are also offering bounties so maybe something to uh consider and finally uh how to get help all right back to back to the presentation yeah finally the the last track and probably my favorite because it's something I think Innovative that I I haven't I don't think I've seen before Global uh it's a small education track so uh for those of you that um I see here an issue for those of you that uh might not have enough time uh to build uh fully fledged project but still want to contribute and to ship something uh there is a small old P pull price it's uh 600 um USD dollars spread across two tracks I I still know that the numbers are a bit messed up um but yeah if you want to build a tutorial with uh chronical oracles this is your track to go now how do I use uh chronical oracles first step is to actually get access so our oracles are uh read uh protected which means that you need to be authorized in order to read from them the authorization process is called a kiss it's very whimsical I know and the good news is that on testet you can self kiss you can authorize yourself uh after you authorize yourself uh you are good to go you can start using the data to power your D app one thing to mention here very important is that you need to get authorized for uh each Oracle that you want to use so if uh let's say you want to use it USD and it BTC you will need to do authorization for each of these two okay and now finally the the fun part here is the GitHub repo that we will work with today for our uh Project Feel free to uh to scan it I'll work a moment I I'll wait a moment for people to to scan it you got it nice so first step we're going to tra create our own uh token I was using here the ERC uh 20 token and I was using the Open zipling Access Control in order to uh manage roles we have two roles the default admin Ro in order to create roles and then the Minter roles in order to enable uh minting so the address who has the Minter role can mint uh tokens then in terms of the meting functionality itself it restricts the token minting to accounts uh with uh the Min role and yeah it's pretty much the the classical erc20 uh nothing fancy uh here I put um the name of the token uh the ticker feel free to to choose to customize it for yours if you follow along uh and I think we're good to go to the Token vendor so the token vendor basically will be the smart contracts where we're going to send our eat and in exchange we will get this token that we just created so for the token vendor we're going to start by creating these four uh variables over here the first one is the chronicle this is uh the price feed is of type I Chronicle this is the interface for chronical uh oracles then we have the self keer is of type uh iself kisser this is the interface that uh manages uh authorization for the different uh oracles and then we have minor and owner then in the Constructor uh we're going to deal with the different uh instantiations first one is the Minter we're going to pass the address of our token that we just uh created the erc20 uh token I put here some uh comments you will see see that this is hardcoded for uh sepolia Network however if you using a different network you can just take uh the address uh from here you can just uh find the address uh from here corresponding to the uh to the network that uh you're using so yeah here we uh initialize the self keisser and then oops and then uh in terms of uh the chronicle we pass the uh address of the eusd we're going to use for this example uh it USD and then we're going to self kiss ourselves as I was mentioning earlier in order to be able to read from this Oracle next step is the read function uh itself uh we're going to uh read from this Chronicle that we did in the previous step and then we have the token amount uh function in the token amount function we basically calculate uh the price uh keeping in mind that uh we deal with uh 18 decimal places Precision if used uh other Oracles in the past maybe you've seen that they have like different decimal places in our case it's 18 decimal places for all our uh oracles also something important to keep in mind here uh we're handling everything in integer mat so solidity doesn't have uh decimal so it's important to for example do stuff like uh multiplication before division in order to uh maintain Precision finally we have uh the receive function this allows us uh to basically send it and in exchange uh get our uh token which is getting uh Minter we only have a modifier only owner to allow uh only uh the owner and then the withdraw function at the end we want after we collect all these eer we want uh to be able uh to uh withdraw it uh this is it in terms of uh the workshop I'm going to show you a demo of this uh token vendor example uh this is again the the QR code but I think you already uh scanning so I'm going to go and do the demo I have here already the the two contracts deployed the the erc20 token and the token vendor so the idea is now that I'm going to send some eat from my EA my externally own account to this uh token vendor address and in exchange I should get the token that I uh created so let's see that in AC ction let's send let's say 0.1 sepolia e and after it gets minted we should be able to uh see it on ether scan seola okay it's confirmed let's view it on uh e scan seola so you can see that uh I received some Bianca token if you remember in the rc20 I put it Bianca token name um of my ERC uh 20 34 uh seconds ago yeah it's it's it's a pretty easy uh example yet powerful to kind of demonstrate you the different functionality how you can read from the uh Oracle and uh how you can uh then U integrate this into your uh D app for the hackaton uh okay I'm going to put this are there any questions sorry a bit louder please um yes so as I was uh saying uh because we don't have decimals on solid so we need to to deal with integer ma it's called in in solidity and if you're doing first the multiplication it allows you to maintain Precision when you're doing the division so usually in real life math it doesn't really matter if you're doing multiplication or division but here in order to maintain the Precision of the decimals it actually has uh an influence it's it's 10 to the power of 18 it's 10 to the power of 18 yeah yeah no worries any more questions all right [Music]

Automatic transcript — names and jargon may be misspelled.