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

Loading player…

On Oracles with Joey Krug

ETHGlobalFri, Oct 9, 2020, 12:00 AM

On Oracles with Joey Krug from Augur

Transcript

so we're going to go over what an Oracle is history of Oracle's kind of current approaches and where I see the space going so there's a bunch of different definitions for what Oracle is people talk about like these machines where you can kind of get on the order of one results some arbitrary computation Warren Buffett the matrix it's none of these it's been redefined just like crypto has so an Oracle in this space basically means something that can get data off chain and get the result and submit it on chain and so why are they useful well these for lots of things you have various financial markets things like dy/dx compound maker prediction markets all these interesting dphi use cases you know I'd say 95% of them using Oracle in some way there's a few various things that actually don't acquire an Oracle but a lot of things in the space do require them the typical use for things like margin calls or trading liquidations so like if you have a CDP and maker and you know your your value of e starts to drop you'll get liquidated what triggers that is an Oracle and so in the beginning really the first thing that was ever launched in this space was this project called reality keys and the way it worked was basically the sky and then Edgar he published a website where he would sign messages and he basically signed messages that had results from any website it was basically a completely trusted third-party style system problems with this they can be bribed they can be hacked they can be forced to do something it can be coerced and it has kind of all the classic problems any any traditional trusted third party has in 2014 Vitalik published this idea called shelling coin and the idea was well what if you ask about people who question and the example will kind of stick with is how many inches of rain fell in a certain location on a certain date and you could even say you know like according to the National Weather Service or something and his idea was whoever submits a value between the 25th and 75th percentile negitoro board he called us reward shells and that's why that's the name shelling coin there's a few problems with it though by default there's no sort of staking mechanism built in so there's no way to kind of prevent civil attacks and with this design the richest acre is basically determined the truth and successfully lying cost an attack or nothing there's no threat to an attacker so it's a reward base and there's no slashing conditions I later in 2014 Paul stork published this proposal called truth coin and same question but basically said what if you use principle component analysis to have people report report on a bunch of different things a bunch of different events and try to bifurcate people who are telling the truth and the people who are dishonest the idea being that people who are telling the truth are relatively consistent and people who are dishonest are inconsistent and then there was also the staking mechanism added where you're dishonest or you are against the consensus you lose stake if you're with it you would gain stake from people who are dishonest and by default people kind of reported on everything and so this is problem kind of inherent to this system which basically this problem is like it doesn't really scale so you have to report every single question ever proposed doesn't scale the solution he proposed was well why don't we allow people to create branches they're kind of subject specific the problem with that is it bifurcates the security model so he had you know a hundred million dollars in stake in the original universe and you guys decided to split it up by like sports politics finance eath finance whatever then you fire hated the security model by however many categories you have until your system is less secure there's other issues - like principle component analysis is actually kind of complicated to do on chain it's also not like the most effective way in simulations to even just English between the people who are with consensus and against it it also has this other problem called the P plus epsilon attack this is an attack for talaq published I think in 2015 or something around there and the idea is that you can basically creatively we don't have too much time I'm not gonna get in too much but you can creatively bribe people and the only way to really get around this attack is if you allow the system to fork or to split into different universes so you can envision a market that's like how many inches of rain fell and a bunch of people say 14 inches and a bunch of people say 15 inches well if the disagreement gets so high eventually just split into one universe where people say fourteen and one universe where people say 50 current approaches will kind of walk through some of the current approaches to the Oracle problem today I actually don't think I have a slide on the unit swap one so to go over that first the idea with Yuna soif is basically you look at the time weighted average price of whatever asset you're trying to measure on Yuna swap over time and that's pretty secure but the downside is you need to do it over a pretty long time period she made for the unit swap time weighted average price over the past minute very insecure over the past week probably pretty secure over the past day nobody really knows so it's hard to kind of figure these things out the next idea is somebody proposed what's called subjective lock recei so you ask the question will it rain in San Francisco and there's no explicit Oracle after it happens it's basically just two universes one says yes it rained and one says no it didn't and the idea is that you now have like two tokens two universes every single event and so it's a nice idea in theory but it would be a mess to deal with in practice and it lacks finality so every time you wanted to use this system you kind of need to trace the treaty and figure out where you're going to end up at the bottom of it you also have systems like TLS Notary Oracle eyes chain link etc where you basically either use some sort of M event trusted Oracle's or you provide a proof the problem with with TLS notary is smart contracts actually can't really verify the thing you want them to verify so the way it works is you go to a website get a piece of data and TLS notary says okay I saw that site I got that piece of data and I formed proof that I did see the site and get a piece of data but then when you submit that on chain the smart contract actually can't verify all of that all it can verify is that you're claiming that you have a proof but it can't actually verify the proof itself there's a new design called TLS in which basically solves this problem but both these solutions have a severe trade-off the first one is that TLS notary only works for like TLS 1.1 or less and uses basically known to be unsecure basically broken hash functions so it's not really secure TLS n is this other solution on top of it it works for newer versions of TLS but the downside there is that well basically you have to run a custom web server so you have to convince whatever site you're getting the result from to run a custom server it's really just like an open source software library there's some random person wrote and hasn't maintained in over a year so it's not gonna happen I know it's not it's like a it's like something that somebody published its academic paper and then an open source library on github TLS notary wasn't TLS in was like TLS n was like we saw TLS notary it has these problems and it'd be great if you could verify the priests on chain so that one was motivated by by blockchain actually I had a slide on that we just went over it there's another idea somebody came out with recently called deco or geek oh I don't know how they pronounce it but it basically lets you verify the proofs on chain similar to TLS in but doesn't doesn't basically require that you run a custom web server and so it's very interesting there's still a lot of open questions there but it's an interesting theory to look at trusted hardware is another solution the downside is you basically have to trust Intel and their entire supply chain but it allows you to provide a proof using Intel SGX that you've got some data and basically attested to the fact that you got that data and on chain it's very simple you can basically verify this using a simple signature verification it's also the beauty contest approach this is basically where you basically just take a bunch of capital on multiple sides and kind of repeatedly challenge things so the idea is that you have a market it's like will it rain an SF or not and somebody says it did but it actually didn't you dispute it and this continues back and forth until one side just has so much stake on it that it basically just resolves and nobody continues to dispute it the problem with this is it it has the P plus epsilon attack problem and there's not really a penalty to being dishonest if you have enough stake chlorosis we'll skip that for now because it's kind of a side topic auger is kind of like an improvement to the beauty contest approach basically adds the concept of forking into these different universes to get around the P plus epsilon problem you get penalized if you report incorrectly or basically more accurately against the consensus if you report with the consensus you get transaction fees and stake from people who get it and it doesn't require reporting on on everything and the reason is it switches to a disputing based process so instead of reporting on every event users instead just dispute ones that they think are incorrect that's a diagram of how it works basically in ography - which is going to launch in january this beauty on scan happen pretty quickly so people couldn't dispute back and forth multiple times if it gets up to a sufficient threshold of disputes there's kind of like a week cool off period this would be like hundreds of thousands of dollars are at risk and disputes it eventually if it continues to get disputed it Forks into these parallel universes and the idea is that users and traders and participants would decide which university I want to end up in and migrate their rep over to that universe so it's not like a regular fork you don't get the assets in in both sides you have to pick one skip facts are running low on time so one thing that's important here is like you have instead of incentive compatible pricing for Oracle's so early on when we were working on auger we thought okay well simplest way to think about it is the value of stake the Oracles are putting at risk should be greater than the value of assets of securing in in practicing there's a reason there's for a few reasons why that should actually be a few times higher and you know things like the parasite problem people can use your Oracle and you can you not aware they're even using it and there's a few other like kind of like math reasons for why it ends up actually being a few times higher even outside of the parasite problem but it's not too lengthy to describe here it'd take like 15 minutes but if you're curious the augur white paper basically goes over this in one of the appendix sections but the punchline the core idea here is that Oracle should be compensated appropriately such that the stake used for Oracle's is worth it and that they're actually worth participating in it's worth participating in the dispute process and they're actually paid you know enough fees to make it worth it if you don't compensate them your system is insecure and so the last piece is sort of like where the Oracle space is going so we actually just got a paper accepted into an academic journal that goes over formalizing the augur Oracle framework into kind of a more generalized framework that we've been working on that for a long time and then next is like you know swap price feeds with you know swop v2 you'll be able to use those I think that's very interesting and the last piece is sort of like fast economically secure Oracle's and so this is kind of just an idea I've been playing around at a very high level to the idea would be like you would start with the logger model you would make dispute windows much faster you basically make everything a lot faster and you would switch everything to using bots so augur is mostly human based but in this model you would use BOTS that would basically fetch the results and report them the problem is you have this problem called the inconsistent source which is this idea where somebody can basically say get the result from you know my website calm and to half the people they say the answer is 42 the other half they say the answer is 47 and people are going to lose money in a state-based system if you use that it's like one way to get around that is to have like governments which I don't not particularly a fan of but one ways to have governance on what sources you can use another way to do it is to basically switch the four key model up and instead make it so that you get steak in kind of all the universes when the fork happens and then you can choose which one you want to sell off and this basically kind of solves the problem of what happens if somebody makes an inconsistent source and I lose money because you want it it's kind of an element of the old subjective accuracy idea but it would only take place when disputes got very contentious it's not kind of the idea this is very recent haven't really thought through any of the implications of it it's just kind of idea throwing out there for how you could potentially speed up Oracle's because the final thing I say is for auger it's very slow Oracle like it's pretty secure it does actually get external data into aetherium and it does that securely but it's slow it's not fast and so figuring out how to make it fast involves making various compromises in trade-offs and that's why someone even we're talking about the fast Oracle problem because I think it's actually harder than the slow one so thanks I don't know if we have time for like one or two questions but anybody has any just like one this slide or or just in general yeah so the earlier one is like I say the arguments against it are like well it shouldn't be a problem because like people will just continue to speak things and they'll figure out a way to dispute it and it in practice nobody's going to bribe the Oracle the P plus epsilon problem isn't a real problem in practice that would be kind of like the argument against it and that might actually be true but it also might only be true because you have the threat of forking it's like Agra for instance is never for but it may be because the threat exists and the threat alone is sufficient but if you didn't have it like I don't think it actually became theoretically secure whether that matters in practice or not it's hard to say like Bitcoin itself is not gaming theoretically secure but it still works and and mostly works [Applause]

Automatic transcript — names and jargon may be misspelled.