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

Loading player…

ETHWarsaw 2023: Merkleplant, Chronicle - Workshop

ETH WarsawMon, Oct 7, 2024, 12:00 AM

Workshop - A workshop by Merkleplant from Chronicle. This workshop focuses on oracles and how to use Chronicle. Follow us for more updates: twitter.com/ethwarsaw

Transcript

um okay so let's start yeah we are Chronicle and this is the Oracle Workshop so how do you guys can use our oracles um first a little bit about me so I'm Pascal Pascal or also Merkel plant um you may know me from this white guy nft thing and otherwise everything mer plan related with my uh profile so if you want to reach out after this um Workshop don't hesitate to write me on Twitter or email or something like this and yeah then the question is who who are we because probably you didn't hear the name Chronicle so often but actually we are along since a very long time because yeah actually since 2017 we are the first uh ever Oracle on etherum and the longest running Oracle um why do you probably not know about us so well because uh up until now we had the very sexy name of makad Oracle core unit so we are the exclusive Oracle for Makow we have just very few selective other customers but maker is like um the main part and yeah yet because this is going to change in um around three weeks on uh permission l in New York we are going to launch um for public availability and this is why we want to make sure that as many people as possible uh know how to read our orits and also kind of know how we work um here's some keywords about things that we pay a lot of attention about while we designed our new Oracle version uh which we just released round about 3 weeks ago um the first one is verifiability so I mean ORS in the end is always something with trust but uh you should verify it as much as possible and we have the property that um in the end someone at some point in time needs to fetch data from some Source price data like coinbase C something like this then there's this big black hole of you select the price there's some consensus finding and in the end something is pushed on chain um what differentiates us from other or providers is in our case it's actually not a black hole every signature that's created inside of this peer-to-peer Network every step that's um happening every computation is cryptographically verifiable and not just for like the um highly technical people who know how to yeah listen to the P2P Network um you can actually do this on our website which is launching currently um we also Community powered what does this mean so um you need to have in our kids you need to have this set of valid datas or feeds has different terms are there um floating around and in our case our feeds our validators are systems are entities that are heavily invested in the ecosystem so for example um who are our feelds for example we have EA scan on board we have dydx Zer osis uh theosis D maker do so all protocols who stake their reputation and if they would act maliciously they would not use any like there's no um they would not lose any stake which like any monetary stake which may not be worth as much as the malicious attack could be worse for them but they actually risk their main business like if we prove and we could prove if ether scan acts maliciously in our Oracle system they use basically being the Monopoly on blog Explorers so this is and what we think a lot more powerful um and yeah a lot more powerful system of validators than just companies who just being a validator for this one Oracle system and if you're going to fire them next month and they know this well that's all their incentive like just blew away for being honest and we also pretty decentralized like if you know about makad Meadow is generally at least in the public opinion like always said to be one of the more decentralized projects the longest running Dow and we are part of maker do since the very beginning otherwise maker do would not be possible um a nice feature that we have is also that our back end is totally blockchain agnostic so actually this price data that is being fetched somewhere calculated um and then signed all the feeds do not know that this data in the end lends on ethereum um there's nothing etherum specific about this data and nothing specific about in the code um the only thing that we need to do on chain is basically verify the signatures and uh we can do this on any blockchain we currently only have evm contracts for this but um it's not so much work to like launch on non evm blockchains and we are also cost efficient what does this mean um yeah okay what what does this mean everyone knows what this means but one problem that our kids have is um that we basically need to update the price a lot of times like we need to update it frequently uh as often as possible and there are basically um two different ways how you can do it you can do it via a push model or you can do it via a pull model push model means someone else is pushing the data for you on the chain in our case like us or this ether scan dydx entities um or you can make the user do it which in the end means okay you shift all the cost that you actually have that your business actually have lifted to the uh shifted towards the user of course it always takes times for Deans and crypto to notice that but next time when gas will be 7K they will notice if there are transaction suddenly increased in price a lot because they are the like badasses who have to update the Oracle and we are very cost efficient which um just to name some numbers if you're deep enough in the technology so our Oracle to update it cost 60k gas 20K gas is any etherum transaction we have to WR two storage slots this has to do every Oracle has to do this there's no way around um this in itself costs 40 gas K gas so there's really we nearly hit the theoretical minimum of being as cost efficient as possible with just 60k gas and at the same time everything cryptographically verified um by our so-call schnore signatures and now a small overview about our like whole system how does it work so on the left side here we have the sources this is what we call ssus it's a coinbase Ken it may also be onchain like Unis swap balancer curve um and this is basically where the price is created right because they are Traders and uh this is where the price is coming from and then we have our pt-p network of feeds this are like yeah the entities that you trust anyway already like in fer you probably use metam mask so you trust in fer already quite a lot you probably have a gnosis safe so you trust gnosis already quite a lot I bet if you do a new transaction the first thing you do is go to to Esa scan and check exactly what does the transaction do so you trust Isa scan already a lot in our feed Network there are not so many new entities that you don't trust already anyway so our like increase of trust that you need to have to use us is pretty low compared to like many other competitors and what does happen here so everyone fetches prices from a lot of different exchanges and otherwise like aggregators or whatever they'll all exchange the prices continuously everything cryptographically verified you can verify this yourself you can listen to the P2P Network the whole time and one distinguished future uh feature between us and other providers is also um everyone can push the price on chain it's not us who does the pushing the price on chain you just need to listen to the PTP Network at some point or basically continuously uh you get price data that's uh that all the feeds found a consensus on that this is the right price and signed it properly and you can be the one who pushed it on chain of of course you don't have to but you could be and this is a very powerful feature and if you think about uh me problems front runability problems or something if you want to have an oracle update exactly at the moment you want to just listen to our to P2P Network take a private man pool where you have some deterministic transaction ordering and put the transaction exactly where you want and this is also where we see that we are totally um smart like chain agnostic because everything that's happening here on the smart contract level is just verify the signature verify this form enough feeds and we update the price um okay but in the end you not so much here yeah question perfect okay just to repeat this for the recording the question was who pushes the data on chain and um that's a quite interesting question so we are Chronicle the Oracle core unit we actually don't run any of the software we are just software producers open source software producers all of the software is run by different ones different entities and um it's basically incentivized to push the data by whoever uses the data and this is for example at the moment it's mostly maker but also defi saver users part of our a so they are incentivized to push the data and they also do it and this was proven that they do it like at the highest gas spikes that we saw since 2017 um and we can further incentivize this if we want to um by having like some more me incentivization which is built into the SM contract already just not activated um but of course we could also run them ourselves and um if you want to make really sure if you're a big protocol and you want to make really sure that your uh price frequency is the frequency that you want and you don't want to trust us to post the price in that frequency if you're big enough it's worth yourself to do this because all your customers are depending on it so um yeah currently mostly meal uh in the future we will in incentivized it further um yeah but as I said you're not really here to um know so much about the beend stuff I guess you're mostly smart contract Engineers more or less or enthusiasts um and you want to use our hour codes okay this is a little bit small um first of all you can scan this QR code I hope that works otherwise down here is the link um this is our interface you see it's not very long it's basically as simple as possible to make it as hard as possible for users to well do any anything ranky with it um can you kind of see what's written here or should I try to increase it I try to increase it ah okay it does not work to increase it okay so what do we have here we have one function called W the v um this is basically just the Oracle identifier if you want to have a BTC price in USD the the V function will return you btcusd it's the AET uh then we have the weed function um you may be wondering what that does um it reads the Oracle it returns to an unsigned integer that's the price we always use 18 decimals this is a constant that we have used since ever um it's a default Precision on ethereum so it returns you the weed function returns you the current price but you have a problem there um what if for any kind of reason our Oracle does have an invalid price at the moment or cannot really provide a price what if this function reverts and don't be fooled like every function can revert um at the very least because of out of gas issues um so we always provide functions that cannot revert as soon as you give them enough ease and this is so-called the try functions we have here TR read function it returns to Boolean whether the current value data is valued and otherwise the value um but maybe you already work with some oracles and you noticed okay like they promise to always update the Oracle every I don't know every hour or something like this but you do not trust them of course you want to do this yourself you want to do a threshold check so you can also of course get the age that's a weed with age function um and you can check did we update the Oracle in time timely enough or is the price fresh enough or not and otherwise you well what then your exception handling is a difficult problem but um yeah you can do the special check yourself just as a matter of fact we also support the uh chain link interface mostly so the latest round data function which returns this round ID and uh age and um uh the value as an integer um we have this for compatibility uh reasons but um we went with this interface because it's battle proven since 2017 and um actually most of the data that's returned by latest round if you ever integrated with a chain link data how much of the data you actually use use it any one of you ever checked the round ID um I for sure did not that often um just some naming conventions that we use this is kind of important for if you just want to check out on ether scan whether you're on the white contract or not um all our orits are always deployed to the same address independent of the version for the uh nerds of you we use create 3 uh as Factory for that um and we have yeah as naming scheme we have the chronicle uncore base underscore quote so for example to get an eusd uh you go to the chronicle uncore eore USD Oracle and yeah base quote asset pair I guess everyone knows this here but if not so base quote means um if I pay with this thing like if I want to have one of these things how much do I need to pay in this one so e USD means how much USD do I need to pay to get exactly one e um all of that is always verified on ether scan so you can easily check whether you're on the right contract this is of course a manually check for the um programming check you use the V function um then there's a questions whether the oracles are actually free for all like should everyone always access this Oracle or do we have some kind of permission like some kind of white list for this and um a lot of orid providers work with like they all have white lists but most of them have them deactivated at the moment because they kind of like there's this idea of putting them into your garden and as soon as they start to raise prices you're suddenly logged in already you cannot change the uh your provider so quickly anymore so um they basically um you basically have an asymmetric price future uh for yourself um we do not do this we directly have a white list we cannot disable this white list we will always have uh this white list for the foreseeable future because we want to make transparent payments we are by far the cheapest ones to update our kits from all we know um so we have competitive pricing even if we do it Semitic directly and um for this we got the now so-called self kisser contract that I provided that you will need to run a function on to WR list yourself on the Oracle um soon and uh yeah why why is it called self kisser because we have really great um customer relationships the first thing we do if you become a new customer of us is we give you a kiss this is being the we add you to the white list um if if you don't like us anymore and go then we so-call dis you because uh we dwid list you from the Oracle so if you want to Now scan this QR code or go to this link in between there um then you will find the repo for that there's a description and how you can just kiss yourself on any Oracle that we currently have running but there will also be the last slide um will link to some like every every data again and um yeah so this allows you to give to get access to our arids and you should be ready to go for the um hackaton starting tomorrow or Saturday and build some stuff and yeah now I had some links and you probably didn't all manage to uh get them quickly enough up and running so um here's a link to an heck MD file up here is also the link and there's more uh information about how to do now everything even for if you're not that experience like how to create a new wallet how to get seoa e what is an RPC node how to get connected to the seoa network seoa network is the current ethereum test net and um from then on you should be ready to hack and if we check out this heck MD um I just want to quickly go through some stuff so everything we do is Foundry based um this is because it gives you a lot more nice features like fuzzing testing differential testing and stuff like this we want everything of our staging currently on sepolia or this is where the Heaton is going to happen so you will need some ease for that in fer and iomy provide some faucets you get half an e there without signing up or anything at least in fer you don't need to sign up um you need to generally have a connection to an RPC node there's this great website called chain list.org where you have a lot of um IPC noes where you can connect to in case you don't have an Icom account and I would suggest to create a new wallet for this hecaton because you probably don't want to have this linked to your normal stuff so if you want to create a new wallet you can go with cast which is one of the tools from Foundry and just create a new wallet and throw it away after the hackaton don't load any stuff up there um what our kids do we currently support this is a little bit long so yeah most of the stuff that you probably want to have all the usual BTC USD basically all the uh defi stuff we even support some uh treasury builds like real world asset if you uh if you have idea how we can use treasury Builds on chain in a more suitable way um an interesting one is also of course we have like w s so this Leo Stak e maybe as a nice idea you can do some arbitraging between like the Ws value that's currently provided in our case and uh the wheel value that it should have uh following Leos uh Oracle how do you now get the access um yeah you basically just have to go to the self kisser repository um one one line of command one line of uh like Forge script have an RPC node set um to get the iconical interface mostly you just need the weed function but um it's under this link here and uh you can also otherwise Forge install it and if you want to have some more background information about how we build this constant priced Oracle um or generally What's um what kind of new cryptography we use which was so far totally unused on ethereum here are some links about it so an e magician post um the dogs of course all of this new Oracle is called scrip and my Twitter thread for the launch like um how we did it and what what what this actually means because it solves some moral hazards also that other Oracle providers have um and I would say I just go back to this slide and you can try to um scan the QR code get to the hackmd site and from there on I would say you try to kiss yourself now on whatever orle you may want to use and um I yeah be here ready for questions and if you have any problems just raise your hands yeah ah yeah okay so weeting the question for the recording how do the uh feeds reach consensus so we have a um set of feeds which are currently something like 22 and um 13 of them so more than 50% always otherwise you get this 50% attack problematic so more than 50% of them need to find consensus on one specific price and they do it this way that all of them fetch prices continuously from a lot of sources locally on their environment they take the median of all of this so if you have like 10 different prices you take the med median this makes sure that the most prices need to be wrong to influence your end result and then they sign this medium price it's again goes in the P2P Network and um other feeds check okay what is this medium price do I get to the same result if I take the same price data is it uh in sync with what I have and then uh they either say yes or no hopefully they say yes and um from there all of the feeds sign again this data via a so-called snor multi signature um and this data then that's it like nothing is being done with it in the P2P Network it's just flying around but everyone who listens to the peer-to-peer Network which were the relays um they can take this finished price data like price and time stamp data with a signature and push it to any chain they want like um you don't even need to like if you think you have some application arbitrum and um you want to update the price there you don't need to update it on ethereum or other things like you updated it exactly where you want and um this is the kind of beauty of the open uh P2P Network and open relay system everyone like you don't have to trust us to do it everyone can do it themselves so yeah basically 50% consensus median and again median yeah like if we use a Unis swap curve or like so you say yeah like like you when you uh like when when you now want to build something which integrates an oracle like a landing Market uh then you need to read the price from our smart contracts uh whenever you need it like for example if someone wants to liquidate someone um but we like we as kronica we don't read any price like we use Unis Swap and this price Creator so to say um and from there we read the data but otherwise no data is being from Smart contracts any more any more questions or is someone like having problems to install Foundry get Thea e or kiss themselves trust me it makes sense to kiss themselves it's a great thing um or I generally want to like has problems with something otherwise I'm also around the next days um or you can reach me on the other profiles uh if you have any questions during the until Sunday okay or is someone maybe interested in the more uh cryptography stuff like how we build the smart contract what's kind of the um interesting side effects of this and what resolves some moral hazs that other big Oracle providers have in regards to increasing price costs and someone here crypto aen yeah great uh it's this this QR code here or this long uh like uh but can you scan the could do you manage that yeah they should send you directly to the all information page okay otherwise maybe an interesting problems that Oracle providers generally have as long as they don't offload the cost for the Oracle update to the users so if you update the Oracle yourself um you have one specific problem and this is uh you want to have all the data always signed um but on eum we basically only have ecdsa signatures ecdsa signatures are not multi signatures this means if you have now 10 signers and you want to increase your security to 20 signers boom you suddenly have to instead of verify 10 ecdsa signatures suddenly have to verify 20 signatures your call data load also increased by 20 time 65 bytes so in the end the more security guarantees Oracle provider tries to give the higher the cost to update the orle and this is kind of a moral hazard because um of course you want to provide more uh more security but this also means you increase your cost and you need to offload this cost to your users and this makes you less competitive um we solved this via using schnor signatures which is uh if anyone is on from you on bitcoin maybe some people still are something uh Bitcoin user schnor signatures um they're heavily tested they are like from the '90s already it's uh actually cryptographically proven that they are secure which you can do with very very few cryptographic schemes um and you can Implement them on the ethereum if you are like if if if you can optimize it enough and this means you can have one signature always the same amount of bites but it can be signed by 10 signers by 100 signers by 5,000 signers no one cares and this gives a really great property to our or kids and will like freeze us from a really big moral hazard that we have if we want to increase the amount of sinus that that we have it does not increase in any way our cost the cost to update the Oracle stays the same so um if we yeah if we get more feeds we will still have the same cost to update the Oracle and we don't need to offload any further costs to the users to you guys um because it stays constant yeah is noted you are waiting for toy yes yes and no so um so yeah exactly we have the schnor signature and the problem nowadays if you want to build one smart contract and you only want to build one smart contract for all the chains you don't want to end up with different versions is you have this distinction of call data cost for the gas and one time cost cost for the gas on Layer Two And basically all wups the one time like that doesn't matter at all if you have just 65 bytes of call data load it's already 95% of the cost basically does not matter what you do doing one time so uh on layer twos on wollups where we have cheap onetime gas we verify the schnor signature that's no problem uh why is it by the way why is it a problem like what's what's the step to verify schnor signature is uh it's still just one signature so it should be like one easy schnore recover or something like this um the problem is that you need to do this so-called key aggregation like you need to do a lot of elliptic curve additions um and this increases in linear in one time again and this is why we do not do this on layer one on layer one we still have the constant call data size but we do not verify the Snore data directly on layer one we um the schnor data is again signed by ecdsa so we just sign that some feed said this schnore data is correct this we do this is constant and then we have have a really nice uh Outsourcing uh like found a nice Outsourcing solution again and this is me so if there's one like Community that's really really good in simulating transactions and making sure to know what transactions do before they get executed it's m guys M people and uh this is a community where we um which we contacted and to which we have uh like relations in that way that we um so you push this snor data on chain we will pil that was signed by one feed and me Searcher before this transaction is included they have already simulated it a million times and made sure simulated it offchain made sure that the uh schnor signature is valid but okay they they did this but why should they do this well the thing is we uh put a few e in all of our aits and as soon as you manage to um find uh signature that's actually invalid you can challenge it that's permissionless again like on the whole contract we never have any kind of message. sender check every function is every Always callable by everyone except the Whit list functions um so this makes basically by utilizing the M Community we make sure that um a big part of the people who are known for making the quickest transactions uh challenge this uh this optimistic poke this optimistic price update before it gets basically uh included in the block you can imagine this way like as soon as we get an uh this optimistic schnore data on chain it's simulated by the MV Searchers and if they figure out it's invalid they will pay quite some money to be included in the same block so you don't have like practically you will not have a problem that um there is at any point an invalid invalid price data outside of just a single block and then we also have of course a typical challenge period like uh we we're still figuring out like what time you should use there uh probably something like 10 to 20 50 minutes it depends on how much frequent data you need like real world assets basically is enough to push the data once per day or once per week other data you may want to push a lot more often so this is a very important future there and maybe like generally as a uh way of thought try to Outsource as much as possible from your protocol try to do as little as possible use me just pay them a little bit of ease make sure they can um they can verify why should you verify yourself let other people verify you and pay them for that um take as little responsibility as possible this also helps a lot like with the regulatory problems that we currently all have especially if you want to be a da um yeah but great questions someone more any ideas or any questions or would like to know something does anyone have any problems with doing anything is anyone trying at least um to kiss themselves or um read our oracles or understand the interface get some seoa e otherwise try to remember my face and come to me in the next days when you try it again yeah creating test for creating what test test Wes um so we're talking about like solidity based tests like Foundry style or hard ah yeah yeah exactly so how do you how should you write solidity tests you mean to test your solidity yeah this is something different and yet the total same thing um so a metamask you just basically create it via a GUI like graphical user interface it's directly stored in this browser uh storage and stuff and here you can with this new you can um create it directly on the command line it prints you out the address and the private key and this is just a lot nicer um if you if you want to use it in scripting or if you want to share the private key which you may want to do on heatons but otherwise please no um and it also creates like a real private key if you use metamask I think you always still get seed phrases right which is like an encoded private key uh because you have this phes in the end a private key is just a number um and cast new gives you this number metam mask I think still not true about it it still gives you seat phrase I think yeah yeah cast is this is part of this one here so get Foundry Dosh it's a very famous nowadays um solidity development environment or since new time also for Kyo um and it comes with a few tool it so one of them is Forge which is to test solidity code compile it deploy it um the other one is cast cast is kind of the Swift knife for everything evm ated um and then there's NV like a local node which is really great if you want to test stuff like run a local node it spins up in half a second you can Fox the state from current main net yeah and you even get a weel like a we evaluate print Loop so like a terminal where you can input solidity and just quickly check out okay what's the hash of this thing or whatever so everyone managed to answer all the questions and everyone who's trying managed to install everything and bu some stuff yeah it's uh in this sheet as well um a ah the kisser add it arrives in the dog in a second it should be now in the dark if you update perfect so anyone already any ideas for what to build on the hackathon not yet okay yeah um so generally everything I'm going to say about it is probably pretty opinionated but um bear with that so one nice thing about if you're generally a developer is to stay always in the same mindset which most of the time means stay in the same programming language don't switch between programming languages so much and this is one of the features of uh Foundry that you can write your tests in solidity um then of course while doing it in solidity you get the whole solidity types directly out of the box in hard head or like uh JavaScript typescript you have a lot of times this um you need to cast something which is a little bit weird doing JavaScript because it does not have this kind of types normally in solidity you get all the type system directly out of the box it also provides a lot more like features for testing for example you can in like two seconds write a fast test you just write a test function that takes an input and this input will be randomized so it runs basically the test 256 Times by default and every time with a different input um this is very powerful because if you um test it manually via writing like 10 unit test with different inputs um You probably test like 01 Type U in 256 Max and maybe minus one but do you test maybe exactly the middle one which um has this so you have yeah fuzzing test you have also easy access to ffi for in function interface so you can call um other programs which are not written in solidity and get the result into your solidity code this is very useful for example we use this a lot for scrip um we basically wrote the whole back end like the schnor signature Creation in solidity and when the back end team started to develop it as well we could just um call the backend code uh to say hey produce me a schnor signature we used our solidity code and tested whether it produces the same output this is called differential testing or differential fuzzing um that's also a powerful feature you have Fork tests like you can write a test which directly Forks main net or optimism main net or test net also at specific blocks and then you can prank being an address so if you for example want to uh play around with what would be if there's now 10 billion uh by pressure on Unis SW in this specific pool for usdc you can Fork the current state prank being some uh Unis usdc Wall Whale or um the usdc Mina even mint like 10 billion of usdc execute the trade and you'll know exactly what happens in that case um yeah this are one of the nice test you also have invariant testing so invariant test invariance is generally like try to come up with as many invariance when you write your code um so invariance is like mathematical properties that should always be true most famous example Dy is the Unis XY x * yals K that's an invariant whenever you call Unis this invariant is two except in between State transitions um and you can test this easily via Foundry in that just say testore invariant and uh then it tries it with even more like it's basically again randomized testing it gives you random inputs but it keeps the state so it basically calls Unis swap like 1 million transactions with 1 million time random trades and checks okay does every time when we finish the execution of this Unis swop trade this invariant was it correct or not um yeah then there are like this arguments of course it's written in was and blazingly fast and stuff but I mean with via IR we have compilation times that suck anyway so um so I'm going to check when I'm out of this room how many kisses we got so um if someone managed or going to try continue for you missed the best parts we're now at the arwork Le silent part of the presentation should I start again yeah oh I'm happy to do that let's see how much time we have left okay a fast one so welcome to the Oracle Workshop we are Chronicle um redefining your pictures access to verifiable data uh first a little bit to my person I'm Pascal also mer plant basically Google mer plant you will find the contexts and uh don't hesitate to reach out if you got any questions or something uh who are we we are the first uh the longest living Oracle on ethereum because we launch with madal in 2017 before being chronic we had the very sexy name of meadow Oracle core unit but soon we're going to launch publicly so um yeah we spined off of meadow and we're going to be a normal public arip provider our keywords are basically verifiable so everything that happens from someone fetches data from coinbase or Kon or any kind of source provider up to data lens on chain everything in between is verifi like is cryptographically signed and you can check it yourself either technically via listening to the P2P Network or via our website where you can do the ecdsa signature verification we are Community powered so we don't actually R any of the infrastructure that we write ourself which is sometimes a little bit disappointing because you write all the code but you never get to execute it but other people are doing this and these other people are heavily invested entities in our uh whole eum ecosystem uh which you basically more or less trust anyway already like for example we got the infu and you probably use metam so you trust in fer more or less already uh you hopefully have some kind of gnosis save gnosis is one of our feeds so you have some trust in them already maybe you trade via zerx aggregator or on dydx they're also part of our feed so um these are all entities that uh do not have a financial stake in not being malicious not a direct but more of a reputation stake like if we would prove that dydx like does some in our Oracle system they would use far more than just being kicked off like they would use all the reputation of being a a reasonable Community like a reasonable entity in our community uh gitcoin is another example we are pretty decentralized generally like Mead da is um longest running Dow and everything we currently are possible like we don't have any multistick we only have maker governance they are the only ones um who can update anything in our ARS um we are blockchain agnostic so what we do onchain is just one simple one simple uh signature verification check otherwise um the back end does not even know the data lands in the end onum for them it could also land just in SQL database from blackw or um on Solana so um this gives us quite some flexibility and we are cost efficient like um we don't offload the price via pull our kits to users we update the price our sales or we make sure that the price will be updated and um we have constant price for the cost for the price update so if we add more signers to this to our price data like let's say it's signed by 10 different people say this price is correct and um then we want to increase it and say no wait we want to increase the security we want 20 signers to have this uh to sign this price it does not affect our cost to update the Oracle normally in everything blockchain sated blockchain related you most of the time nearly have linear increase of cost in our case it's everything um constant small overview we got here the sources like all the different things where prices created like coinbase Ken Unis swap curve balancer um we also have real world assets like Treasury and for Meadow so this would be then like there we fetch data from blackw for example um and this data is fetched by everyone who's our feet so like yeah all of this guys and they exchange the data continuously um signed and you can check every single signature from that um they take the median from the data they send this around this median value is again signed by everyone and as soon as you get this data this one signed price of a median of um which is signed by everyone then you can pick up this data from the P2P Network which is open like you can literally do this and uh push it onchain and it doesn't matter on which blockchain you push it it does not matter on which chain like it's just a signature and the price and as long as we have some elliptic curve um possibility to execute on a chain we can we can verify the signature um yeah and this relay is currently mostly won by maker and other of the feeds of the feed soft uh feed entities our interface is uh pretty simple because we try to make it as hard as possible for our customers to them like to shoot themselves in the food um it's called iconical very uh yeah intuitive um we have basically the function weed it returns to an unsigned integer value it uses 18 decimal everything uses 18 decimal we on ethereum like 18 decim is the normal position so you read the data you get the price that's basically it problem is sometimes like um every Oracle can revert uh function can always revert so we also and sometimes this is actually because if you use this TR catch uh mechanic from um solidity it's kind of it makes the code quite ugly so we also provide uh functions which are not which are not able to revert as long as you give them enough gas and they are always prefixed with a try so we have like the TR read function and it returns you Bool uh and the value and this pool tells you whether you can trust this value or not or whether we think you can trust this value and maybe you don't think okay just because we say we trust this value you trust this value because you want to have a price frequency like you want to have the time stamp from the value and you don't trust any value if it's older than 10 minutes no matter what and so we also have functions weed with age and the corresponding TR readed with ag that also Returns the age so the time stamp of the value and if um yeah you don't trust any value that's um older than some specific uh threshold then you can revert or do something else um so we give you the possibility yeah to check it yourself and we also provide uh chain link compatibility so this latest wound data function that's um the usual one um we make sure we return in some cases like for the round ID for example a constant and um some values we need to adjust because orle like chain link does not return unsigned integer they return integer so you have some overflow problematic maybe uh we make sure in that implementation that we have um that all of this data is either correctly like for like converted or um we revert directly and we make sure that if you hopefully follow the chain link tutorial and how to make sure that your data is correct like the threshold check the round ID check stuff like this that all of these checks will always pass so if you have now a very well smart contract that does all the chain link checks it will check with our like it will work with our ORS as well yeah naming convention is actually not let's so we have a naming convention Chronicle underscore base asset uncore quote asset which means if you have any kind of Oracle if you use our Oracle it will look something like this as the name uh Bas and quote asset so the asset pair basically means how much do I need to pay in this thing to get one of the things it's the price of e in USD um interesting side effect why do we have this underscore one here because we use uh deterministic address deployment via create three and there we always need to have a specific salt if you like there we always need to have a specific salt and um this underscore one just makes sure that we can deploy more than one time a qule uncore eastcore USD it's just a counter um this gives some nice features so that like this create three um functionality that you can create different contracts with different bite code to the same address which is not possible via create because there you are only depending on the nons and also not possible via create 2 because there you're depending on the bite code and if you just change a single line of your bite code you cannot use create two anymore so we use the combination of both of them called create three h no no no no no no so uh metamorphic contracts no we H we don't use metamorphic contracts for everyone who does not know this are contracts that can self destruct themselves so basically delete themselves and then uh you can redeploy anywhere to the same address so this is is like the ultimate workability contract um and it's going to be deprecated soon so um it would not be future proof anymore and um we also don't use any proxy so this is not behind any proxy this is the real contract we don't use any proxies uh we could provide it for you as a customer if you really want to for some whatever reasons but we believe in immutability like maker always did um makad does not have a single prox like does not use proxies we don't use proxies um this is just about the factory where do we deploy contracts because one common uh security issue as simple and stupid as it sounds is you copy paste the wrong address and send it to a different chain and suddenly your money is gone even like um winter mute one of the biggest market makers got hacked like this recently that they um deployed a gnosis safe on Main ner had one address they deployed a gnosis safe on optimism they got another address someone sent the money used the main net address but send it on optimism and a lot of money was gone um we don't want to run into this problem so this is is why we make sure that we um like the whole address is only derived from this string here um if we want to have if we want to deploy to the same address we just have to use this same string it does not matter who's the set like we have the factory so this needs to be at the same address but um otherwise it does not matter what the bite code is what the contract is it does not matter what nons we have the only thing that matters is this uh string which will be translated into a by 32 into a salt yeah exactly so we will have for every contract always the same address on different chains and this is like not so much use for whatever reason this create 3 because it uh like you you you can say you can do this while create 2 too and this is true if you do all the deployments on all the same chains at the same time but if we now Deploy on avalan etherum optimism all of those chains and in two years a new opt new uh rollup comes out also evm compatible um up up until then we maybe have changed like our or cont we may have updated it or whatever this means the bite code changes this means the address will be different no matter what um so to be like it's easy to deploy everything to the same address if you do it in one moment it's hard to make it future proof so that in 10 years you can still deploy to the same address uh highly recommend checking out creates 3 it's uh soady and soulmate repository or in our case like we have a two it's called Greenhouse that's our Factory like we planned the contracts in our Greenhouse um and it was initially created by zerox this uh Dex aggregator um which is also one of our feeds perfect good what time do we have yeah I think it's fine to finish 5 minutes earlier even though I hate to break you into the but thank you very much

Automatic transcript — names and jargon may be misspelled.