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

Loading player…

ETHWarsaw 2023: Niklas Kunkel, Chronicle - Verification is the ultimate form of trust

ETH WarsawWed, Oct 9, 2024, 12:00 AM

Presentation - A talk by Niklas Kunkel from Chronicle. This presentation delves into the Chronicle Protocol and how it works. Follow us for more updates: https://twitter.com/ETHWarsaw

Transcript

hi my name is uh Nicholas kungl and I'm the founder of Chronicle and today I'm going to be telling you about um topic very near and dear to my heart called Don't Trust verify um kind of giving you an introduction to Chronicle and what we're all about and uh how everything works kind of under the hood so uh you've probably never heard of Chronicle um but you may know us by another name so we actually used to be part of the maker team uh I personally was part of the founding team of maker back in 2017 and at the time you know the ecosystem was fairly undeveloped and uh we had to kind of build a lot of stuff from scratch that kind of just didn't exist at the time so uh we actually built the first decentralized exchange on ethereum uh so some of you may remember ether Delta uh we actually preceded that by almost 8 months um and also a little known fact is at maker we developed the first oracles on ethereum so uh we've actually been live since June of 2017 on ethereum mainnet in conjunction with um in conjunction with Sai which was the kind of pre cursor to uh the stable coin die that uh you probably all know and love and so you know we've been live for six years now you know uh never been hacked never gone down or gone offline and so this actually makes us one of the like longest like continuous running protocols like not just on ethereum but actually like in all of crypto like we uh back in June we just hit 6 years and and we're quite proud of that so what have we been doing well up until recently uh We've effectively just been the Oracle for maker Dow since its Inception right and through the ups and the Downs right during the bull market at one point we were securing almost $20 billion uh currently there's about um $6 billion of tvl in maker Dow and uh we secure all of those assets and that actually makes us the second largest Oracle provider in terms of assets secured uh behind chain link so um in order to tell you like what makes Chronicle so compelling and what makes Chronicle different from other Oracle protocols um we kind of have to look at the Oracle landscape a little bit and identify uh the problem space so um for many of you the way that that you've come to view an oracle is probably very similar to this um there's a smart contract somewhere and it just has an asset pair and this price and you're like great that's that's an oracle right um but this is actually really broken um because you have no kind of understanding of like where did this data come from right uh how do you know this data is correct um where was the data sourced from how was it transformed what guarantees do you have that this data will continue to be there right we we spent as an ecosystem we spent on the order of hundreds of millions if not billions of dollars developing blockchains right that are decentralized and transparent and then we spend you know another order of magnitude of money right on building uh you know applications on top of those blockchains that are decentral and transparent yet for some reason on the infrastructure front we just kind of are content to just have everything be this blackbox and now kind of is we have this opportunity to kind of go back and do things the right way so what else do we have um here is what an oracle update looks like on ether scan and you may notice that it is extremely expensive um oracles have one of the highest kind of uh transaction frequencies in terms of how much block space they they occupy out of uh compared to most apps outside of maybe something like dex's or or Perpetual protocols um just because they update so frequently um and you know this is even more kind of potent in times when gas prices are high right so gas prices tend to be are quite low relatively at the moment right I think right now we're at around oscillating between 20 and 30 gay you know occasionally we'll hit like 200 gay or something um but if you remember even just like a year and a half or two years ago I mean there were points where we hit 7,000 gay right so imagine trying to uh manage you know the uh kind of update costs you know for an oracle when you know your costs can just multiply you know from like a 20 Gay to like a 7,000 gay right um and so current Oracle kind of uh uh solutions they don't scale um they really don't and so we end up coming up with these kind of like Band-Aid fixes for um kind of uh TR trying to cover up this this flaw on the engineering side right so one solution that you know we frequently see across many uh Oracle protocols is that you just start updating less frequently when gas prices are very high right um sure you'll spend less gas you know and by proxy less money but uh you know degrading Oracle performance to save on Oracle costs is not really a viable tradeoff right um similarly uh you may hear some Oracle talk about you know pull oracles right and you know that this is great right well great for who um someone still has to do the Oracle update and with pull oracles you're just kind of kicking the bag and passing the buck to the end user and you know the end user may not notice now when gas prices are low that you know every transaction they do on the protocol right has an oracle update bundled in uh but when gas prices start to rise again um which they inevitably will um it's just going to be more and more painful right for users to to have to be responsible right for for pushing these these Oracle updates right and so uh what you really need is like an actual engineering solution here not a uh you know product marketing type of solution so um what we've been working on at Chronicle is called project scribe um and we're we're almost ready to unveil it to the world and we kind of had several kind of uh properties of scribe and so if you take nothing away from this talk today except you know uh one sentence I want you to take away that Chronicle is a decentralized Oracle protocol that is one verifiable and two scalable and we'll go a little bit into each one of those areas so let's talk about decentralization um most Oracle protocols use validators right some call them by some other name right node operators uh nodes um in in chronical lingo we call these feeds um and so we we've built up kind of this ecosystem of of feeds of Highly reputable participants in kind of the crypto community and we really you know this is a core kind of part of the protocol right uh when you think of like you know an oracle protocol what you're trusting is not necessarily the Oracle protocol itself but this sample size of you know feeds of validators of node operators behind the protocol and you know while some Oracle Protocols are very you know forthcoming with these are validators other just ignore the question completely because uh it's not a happy answer um so a Chronicle we've kind of assembled this this network of Highly reputable uh feeds and you know as a user of an application right that uses a chronical Oracle you know what what trust assumptions are you making well you know as a user you may already be using metamask every day right and so you're implicitly using infura you may hold some D in your wallet right you may have an Argent uh Mobile Wallet on your phone uh you may have a nosis safe right to store all of your assets right and you may swap on you know matcha so you're already implicitly trusting uh many of the same protocols and applications right that are validators for chronicle and so and you're not trusting any one of them individually right you're trusting the consensus between all of them right and so as more and more kind of uh highly reputable feeds kind of come online that are essentially staking their reputation the Oracle just gets more and more secure over time so uh here for example is a list of the feeds Right In Action I actually took this screenshot last night uh so this is a pretty accurate rendition of what you'd see if you take a look at our dashboard um right and so you can see like every you know second uh all of these feeds are just you know constantly pushing you know and attesting to different price updates for uh a bunch of different asset pairs that we support so um I want to talk about verifiability and this is an extremely important property uh of Chronicle that I think is quite unique compared to other Oracle protocols because I think it's going to help us break out of this like broken Paradigm of oracles and and hopefully infrastructure in general in crypto being this this black box and so how do you define verifiability well I like defining verifiability as transparency plus legibility now what do I mean by that well most crypto you know protocols will say well we're on a blockchain we're transparent um but transparency isn't really useful without legibility if uh the only one that can interpret an application right is some kind of senior solidity developer or you know some kind of professional nansen analy list right uh We've really lost the plot right because we're we're not you know we're not really exhibiting uh don't trust verify uh we're just kind of trusting everyone else right to do to do the due diligence and so a big Focus for us right is how do we design the Oracle protocol around being endtoend verifiable and that means that everything you see on chain right from this canonical Oracle value can be traced all the way back back to the source data and every transformation of that data is uh can can be Illustrated in a very uh easy to understand way so uh I want to kind of walk you through our dashboard to show like because I think you know show don't tell is uh is way more illustrative of this concept so here we have uh an eth USD Oracle right and uh you'll notice right the price is uh 1662 72 this was I think taken I believe like a week ago so for any update that the Oracle is done you can see the exact feed uh kind of price attestations for that update right so right here we have you know Argent and defy saer and maker Dow and either scan and zerx and a few other feeds where we haven't quite mapped their name to uh to their address yet um and so now you can kind of see that oh well that 1662 72 value that we talked about earlier right is uh you know we got to this value right because this feed was the shelling Point kind of consensus among you know 13 different Feats but you know how do we know you know it's great fine this feed attested to that piece of data I I get why the Oracle says the price it's says based off all the different validator responses but why did this validator why did this speed you know come up with that price and you can see that too and so here you can see that well you know Argent came up with their 1662 70 price you know because they queried eth BTC from binance they queried eth USD from coinbase from bitstamp from Kraken from Gemini and then they got the BTC USD price from a bunch of places to convert the binance price right to a uh a USD kind of quote price right and so you can see the exact raw data that the feed used when composing you know its own price at the station and so the best part is that this is actually all cryptographically verifiable so uh the feed can't lie and you actually you don't have to trust you know the dashboard to not just show you a Rosy picture of of the data because you can actually do the same cryptography uh that the smart contract does but locally in your browser so uh next uh Argent right there's this really nice verify button right and uh if you click on this this nice little verify model will pop up and you'll see that this attestation includes right a value right the data value so that's in this case that's the price right which piece of data that's e USD right a timestamp and the corresponding signature and if you click verify you'll run the verification uh to decrypt uh the message right and verify Yep this feed actually signed this exact price at the station if you were to change if you were to change say the time stamp by 1 second so on the right hand side we reduce the time stamp by 1 second uh and you tried to verify it right now you see that there's an error right uh this feed did not sign that message that message has been tempered with you know uh something is going on so um the last kind of property I want to talk about is scalability so um you know I I kind of alluded to heavily at the beginning of the presentation right that costs are an enormous um Factor right now among kind of Oracle protocols and among their sustainability going forward so uh what we've come up with to kind of address this chall is what we call an optimistic schnore uh algorithm and what we found is that compared to uh our previous algorithm which was already uh very competitive with kind of current Oracle uh implementation gas kind of rates uh we discovered about a 66% gas Improvement uh which is you know incredible and uh you know we we think there's like a little bit of room left for improvement but uh we're really getting getting near kind of the limit of of what is possible so um before I get into the implementation itself I wanted to talk a little bit about what our goals were with this implementation so one we wanted to have a single implementation across all blockchains uh so you know we we don't want to say uh on Layer Two or on an optimistic rollup have one implementation the ZK rollup have another implementation on E layer one have another implementation and on you know uh polygon have have a different you know implementation uh one that's uh you know incredibly resource intensive to manage and two it's incredibly insecure when you're trying to focus you know uh you know locking down you know uh all of these different implementations and you know porting features across all of them uh in blockchains that have completely different kind of characteristics two we wanted to decouple the Oracle update gas costs from the number of feeds so another kind of trick that a lot of Oracle protocols use is say like well you know if we used a lot of validators the Oracle update would get too expensive so we're just not going to tell anyone and just use very few validators um I don't know what you all think but that's also not a very viable solution so we we wanted to you know decouple this and ensure that you know uh there wasn't linear increase in gas costs anymore as you increase the number of validators and third of course right we wanted to minimize the gas cost right for updating this Oracle so um some of the obstacles we ran into right um L1 very different properties from L2 compute is very expensive on L1 call data is very cheap on L2 the exact opposite problem compute is cheap and call data is expensive so how do you go about creating an implementation for both um and the Second Challenge is well evm compatible chains actually doesn't mean that you know they have evm equivalents and just because there is a very nice pre-compile on ethereum that you can use or that is going to be in some future hard Fork you have very few guarantees that you know your very nice precompile will ever exist or you know may exist in the future on on some other chain so effectively that means you need a roll your own you cannot rely on pre- compiles so um I've been told I have one minute so I'm just going to kind of speed through this really quick but if you uh I'd suggest you take a picture of this slide what we're doing is uh essentially validators will create a aggregated schnor signature right so instead of X feeds creating X signatures they're now just creating a single aggregated signature unfortunately that single aggregated signature is still very expensive to verify and so what we do and what makes us optimistic is that we have a single feed uh sign on top of the schnor signature and then a relay right will just push the schnor signature the single kind of attestation to the schnor signature and the price and time stamp on chain um what this does is the Oracle will just verify the single signature attesting to that the schnor signature is correct right and so that's what makes this optimistic and so now we start this kind of challenge period during this challenge period anyone can just call this challenge function and all it will do is actually just spend the gas verifying the U the the Oracle theore signature and if it's successful uh the Challenger right gets to claim the eth so um we kind of saw like a 66% gas Improvement here right so from 138,000 gas down to 66k and uh I'm very excited to tell you all that we are launching uh next month on September 13th and uh you know very excited to uh talk to all of you and uh get Chronicle integrated into your protocols so um please get in touch with us uh we're hiring for a devil role right now as well as a technical product manager manager uh project manager uh so you can reach out to us um at hello Chronicle lab.org uh check out our website um check out our Discord and follow us on Twitter thank you

Automatic transcript — names and jargon may be misspelled.