Will your Oracle hug you or rug you?

EthPrague 2024 · 1 Jun 2024 · 30:23

Paweł Zaremba examines oracles as critical blockchain infrastructure and asks how much of the recent wave of new oracle types and solutions is actually useful. Taking a look under the hood of oracle technology at EthPrague 2024, he sets out where the catches lie and what anyone relying on an oracle needs to know to stay safe.

Speakers

Topics

From EthPrague 2024, hosted by ETHPrague.

Holešovice Market

Transcript

[Music] we are living The Best For Last right because that's how it works so uh before I start I wanted to say I am I feel very inspired by it prag and what's happening here uh this is really an amazing uh event and as I am inspired I would like to return the favor and Inspire some of you maybe uh you'll see what I'm talking about later uh and also I would like to give a big round of applause to the crew and organizers of e prag which is a very

very good and they are uh doing like hard work here so Bravo for the organizers and the crew the guys that have to stay all day and listen to all of the talks anyway let's get back oh I really like this big screen anyway let's get back to the presentation so oracles uh the question about oracles is will they be a problem for you or not will they uh be a reason for you to uh end up losing all of your funds or not and what we first need to uh answer what

are oracles so so oracles take all of the gossip in the world so take data from uh the real world or exchanges or any other uh data sources and then they turn that gossip because it's not verified so it is Gossip they turn that gossip into fact so uh reliable information that is uh accessible that is uh verified and that you can use to do something on chain if it's an information about the weather it really does not probably make sense to put it on chain Because unless you're using

that that information to do something on chain it's actually useless but of course the the best use case we have are uh oracles for prices prices of assets or uh real world real world assets or digital assets whatever you want and the important thing is when you are using an Oracle and what is also interesting everyone is at some point using an oracle because the blockchain is blind blockchain doesn't see anything beyond itself so we need some kind of way to put the data from the uh real

physical world into the blockchain and this is what oracles do but you need to know your oracles or be wrecked like if you don't you do your due diligence and you do not analyze how the oracles work what are the tradeoffs that this kind of uh this system like this Oracle provider is using then you can be another story on wck uh and you will lose a lot of funds so uh I am Pavo I am an engineer at Chronicle and also I co-founded uh e War conference hackaton and we closely collaborate with e pra so that's why I

know how hard it is to organize a conference that's why I really upload the the organizers and the crew for doing this next or not green button yo the presentation stuck or is it need some help yo excuse me I need some help the presentation is stuck yeah [Music] so since we have this crowd here maybe I'll uh use this to uh

support o Echo uh uh yeah let's wait a moment present yeah no that's the last slide give me the first one nope uh let's go back oh Jesus okay I'll do it myself no worries this happens I know it's been a long day so uh oracles bring external data uh and this external data make it

available to Smart contracts during transaction execution why am I emphasizing during transaction and data available because it to me an oracle is something that has the same guarantees as the blockchain that you are using so if you are on ethereum your Oracle needs to also be on ethereum because otherwise you are losing some of the guarantees the security assumptions of this actual blockchain oracles part of the Oracle system uh are the validators that collect the data sign the data and purist the data on

chain uh oracles have their properties there are multiple of them and actually when you are integrating an oracle so when you are a protocol that uses an oracle like maker is using the oracles that we are building uh and we have never had a problem and this uh this act this project actually spun out of maker so if it's good for maker it is really good for anyone else but there are properties that anyone using those oracles needs to take into account and needs to verify if this Oracle provider takes into account those

properties so one of the properties for oracus is credibility how was the data acquired where did the data come from is the source like exchanges are those exchanges actually reliable do you know for a fact not as gossip that this exchange posts actual data and also what is the volume of transactions on that exchange and what's the liquidity because if there's an exchange that has very low liquidity that means it's really easy to manipulate this price and uh also when we are talking

about credibility how do do we preserve the Integrity of the collected data uh that's something you need to take into account and of course in most cases oracles the Oracle systems take the data and then they do a signature on them that's why they sign the data and send it but uh you need to also verify how this process works and most of it happens of chain so when you are integrating a smart contract which is an a you also need to take a look at how the data is getting is being prepared so also another aspect of oracus is

accuracy how many independent sources were queried because if you have an uh Oracle price for something and there is only one data source for that that this original data source then it really is not a very reliable source because you can easily bribe for example this exchange or this data source to manipulate the price and you are wrecked another aspect how was this data modeled so did we take or did the oracles uh Oracle system take the data and just give it to you or did it do some

calculations because sometimes a price for a very extraordinary asset may not be access accessible uh on the exchange then you need to calculate it you need to go from this uh from from asset a to asset B and then to asset C it's easy to calculate but then how do you do you know the model uh and even if you apply a model and even you have multiple sources is the model created in a way that it is protected against a single data source being faulty so all of this is very important availability data

availability is the data on the same chain will so that means actually this question is actually means will the data be available to you in an emergency let's say there is a market crash and you have uh some position somewhere in a in a protocol when you want to exit you always need an oracle uh to tell you what's the price so you so the system knows how much to give you back but if for example a system or a a protocol is using pool oracles this is a new fancy thing that happened pool oracles or like uh Oracle streams or whatever then this data is not in for po

pool oracles the data is not on the same chain that means that this third party that is providing you with the data can be gone and and usually everything's fine when everything is fine but when there is an emergency where is the when there's a market crash or something it is very likely that the third party will be gone or will be not respon responsive enough to get all of the users to uh the the required information the required data so pool Oracles in my opinion are not nice let's be sle uh and also this third

party that gives you data for po Arles what is it who is it what's behind that and then how is it integrated how is the data integrated into the protocol all of that you need to check for yourself because no one no one will give you Insurance uh protection for you integrating something that is fundamentally flawed in this area cost also I I think I have a beef with po oracles because pool oracles are oracles where the data is not yet on chain the user that wants to do a

withdrawal or exchange it takes they take the data uh the Oracle message and they are paying for putting it on chain that means that pool oracles are taxing I know that's a bad word in crypto pool oracles are taxing users to to pay for the transaction of uh updating an Oracle and whoever integrated a pool Oracle in their system can say oh our oracles are very cheap to update yes cheap for who the user pays for that another aspect for cost how does it scale so for

example we usually use uh like all of the systems usually use some kind of multi so you have multiple uh prices signed by multiple validators and then if you have a multic of two out of five that is not very secure because you can bribe to entities and then all of your money is gone like millions of dollar dollars can be gone but for a for an up Oracle update when there is only there are only two signatures required the price is not that high but when you scale the security you automatically

scale uh the price so if you have multiple if you have like seven on or or 11 or 13 signatures required and 13 signatures needed to be verified during a oracal update that makes the transaction super expensive and it's also fine when the gas price is low but when the gas price is getting higher you are getting ragged even if you're not getting actually ragged uh so about cost there's also another thing you need to think about when we say that an oracle system secures that's called TVs total value

secured Oracle system secures billion dollars okay how much does it cost to scam the protocol out of this billion dollars if for some reason it is cheaper to manipulate the Oracle than the game that you can have out of doing that then it actually is just a cost of operation and then if you have a billion protected but by A system that can be manipulated with $100,000 then it actually is fine or even if it's 10 million 10 million you spend $10 million to manipulate something that will give

you a billion dollars then actually it's still worth it so you need to watch out for that as well everyone using oracles they need to closely look at what's the proportion of manipulation to the value secured and also the Val total value secured is something that also needs to be verified because what does it actually mean what's behind the number that uh Oracle providers give you when saying total value secured all of that needs to be checked without that you are just asking for trouble so next thing

transparency it's a parameter it's a trade-off maybe you are the trade-off is that you the system is not transparent but you have some other way to to be sure that the system is fair true and working properly but the usually the biggest question is who are the validators who are the data providers who are the PE the entities that collect the data sign it and send it to to to the Oracle what is their reputation because usually when you have a transparent system and you know who the validators are what they are staking those validators they are staking the reputation if you don't know who the

projects or entities are who are providing the data or the they are just unknown Rando projects that just popped up it doesn't really make sense to consider them reliable and they have if they have zero reputation to stake then how like doesn't really make sense to use that kind of Oracle but when you have projects reputable projects that support and uh operate within the system and then you can know that if they do something wrong or something will like a bug will break the oracle then you know that those reputable projects will also lose

some reputation so it is in their best interest to look at what they are actually running consensus so how do we determine what is the truth usually for prices we are using and all of the systems are using a medium a median is uh the middle value in a set of values and the good thing about this this median is that we are not no none of the prices that is not chosen actually affects the price that is chosen in that is in the middle because it's not an average that we

combine all of them and divide by the number of them no it's a median so it's just just a choice of the value that is in the middle then if if there is one two or three oracles that are lying like way outside of the spectrum that is something acceptable it's just going to be ignored so you need to look about uh look at how the consensus uh is achieved and you also need to look about how many how many uh participants are required to achieve consensus and of course usually the best way uh and the best practice for now is uh just more part

participants than half so 51% attack might be possible but it's quite unlikely permissions that's super important you when we have an oracle that is a contract it has parameters so it says those parameters say how many uh messages you needs how many signatures you need and uh and who can actually be the sign of of a message to be able to update the Oracle so when you have those parameters you need to look at who can change them because in a normal day you have like

the 13 required signatures but then someone does something or someone gets hacked or something and they change the parameter to one so you just need one act actor and the Oracle is broken and there is uh a lot of money probably lost another aspect the changing parameter is wan thing but updating the oracus typically the best practice is to allow anyone that gets their hands of on the required number of signatures to just permissionless update because we don't need to check who is making the

transaction we just need to make sure that the data is verifiable and when we have digital signatures then we send the data to a Smart contract and the data is still the data Integrity is protected you have verified data but anyone can do it so if for example someone like the the system that is responsible for updating the Oracle is broken as long as anyone else in the public space can have access to those messages uh the update can be done and the system can still work and the funds can still be protected

so what happens when there's a red alert so when there's a problem when there's a hack we need to think about that before it actually happens so one like of the parameters or properties of an oracle that needs to be analyzed is what's the probability and what is the impact of a problem of a hack let's say uh you have a system you design something and it there's a a not not really a back door but if you find a design flaw in the whole idea of an oracle uh that

makes the probability how How likely is it to happen that uh I don't know 13 independent actors collaborate to steal all of the money if you know that and if you analyze that you can you can create a parameter to to to know how good is this Oracle and then even if they collude if they if someone if this hack happens we need to think about the impact is this impact I saw related to only a single protocol or does it break the whole

blockchain all of that needs to be taken into account when thinking about oracles if you want to use a system as a user as a normal person if you want to use a system that uses some kind of Oracle it is really best for you personally to try and check is the Oracle good quality or not if you are a project that requires some kind of information that gets uh and gets it from an oracle you also even like that's even more important for you to analyze take all of the Oracle providers you see analyze it according to some of those parameters

all all of them like look at them and compare them like without that you are just asking for trouble so the main outtake of all of this do not trust we are saying that crypto is a trustless system yeah it's trustless that you don't need to trust a person you just need to trust the cryptography the technology and I'm sure everyone can find someone that understands it enough to uh and you trust that person uh and then they they can verify if that's uh this system is actually uh done correctly so it is a lie that this the blockchains

are trustless but or my over over statement let's say but you need to trust someone you need to trust either this person that verifies or you need to trust your knowledge or you need to trust in cryptography but that's as long as this trust is way way way way uh away like taken away from from the actual system like the further the better so never trust what anyone says verify for yourself or verify somehow in in a way that you feel comfortable

with oh yeah so independent verification verification Matrix and tooling as a public good uh I'm sure you have heard of L2 beat which is a project that is right now a public good it is being funded by grants and they are analyzing layer twos they're analyzing them and they created a a verification framework to look at all of the l2s and mostly call them on their if they are saying that they are very

decentralized L2 bit checks that uh and we need something similar for oracus we need an L2 L2 beat for oracus and as you may see it is not yet found because what's very important about this kind of system is it needs to be independent uh it cannot be a website or a project or a company that takes paid advertising that takes investor money because then the incentive for this kind of project or company is to do what what the money payers say money money givers

say sugar that is or whatever sugar mummies the important part of such an analyzing framework is that it needs to be totally independent I would like to build something like that but I can't not in good conscience do it because I am working and I'm building oracles which in my opinion are the best they they actually follow all the best practices and they are they would look really really good on a chart with all of those parameters that I was talking about but I cannot do it because I want to it to be independent so I cannot do it but you can do it like I'm sure there are plenty of you that are totally capable of

creating a framework of anal of analyzing and verifying what the Oracle providers say are they decentralized or is it only them that or do they only say that they are decentralized is the data available when there's going to be a problem and all of all of the parameters they need to they need to actually come to you and talk to you and answer all your questions but the main thing you need to do it I'm talking to the community of Builders and uh other people that want to be uh in crypto that we need oracles that are independently

verified and we need to do it it needs to be a public good and we just need to do it yeah so I'm talking from the position of chronical Labs uh this is our contact info our Twitter account and website and you can see more of what we are doing over there uh and we will be very very happy to help you build a framework but we need to be it needs to be independent uh also I'd like to plug the It woro event which is happening in September if you go to this website you can see more info about that but uh my main message is uh about Chronicles that

we need someone I do hope that you get inspired how did that get here I guess you can see that I'm a fan of Star Trek uh so I do hope you guys or someone some of you got inspired into building an independent system independent framework for verifying what Oracle providers say thank you [Applause] thank you pav very much do we have any questions from the field for pavl there is a question okay we'll give you a microphone so even those watching from home can hear

you please thank you this is not a question but more like a comment we had uh today the first presentation of the day from your colleague from Phillip from the Redstone and it was quite interesting to hear from his point of view that the pool method is more convenient and the com my comment is that I would like to you know have a panel between both of you just to to yeah to have a space for both of you to discuss that I'm thinking this could be part of the framework of verification if

of oracles uh we could make like discuss how uh convenience is worth the risk because pool oracles are convenient of course they are convenient but the question is for whom are they convenient they are convenient for the Oracle providers who do not need to pay for the infrastructure and pay for the transactions to update the Oracle so I do understand the argument I understand the whole idea but I wholeheartedly think that pool oracles are just asking for

trouble thank you thank you thank you very much I see there is probably no more questions so thank you very much to from cornic collabs Pavo zaremba thank you thank you [Applause]