DAPPCON 2019:Crowd-Sourced Oracles, Parasites and Forkonomics - Edmund Edgar (Realitio)
DappCon 2019 · August 2019 · 27:40
Edmund Edgar of Realitio discusses crowd-sourced oracles at DappCon 2019, examining the parasites and forkonomics that can emerge around decentralized dispute resolution. He covers how Realitio uses economic incentives and Ethereum's dispute mechanisms to answer real-world questions on-chain, a core building block for DeFi and prediction markets.
Speakers
Topics
From DappCon 2019, hosted by Dappcon Berlin.
Transcript
okay so today I want to kind of take this talk a couple of ways firstly I want to talk about the thing that we built reality oh and then secondly talk about kind of the Oracle problem more generally and some some sort of some general problems related to Oracle's that a lot of projects in the space run into and then finally make kind of a bold proposal for something we call for comics which is the next thing we really want to kind of get moving so as you hope we built reality keys back in 2013 that was yeah the first smart contract Oracle anywhere and that was before he theorem with a thing and
we learned a bunch of things one was that doing smart contracts with Bitcoin is extremely painful but another was that we'd assumed that a lot of the kind of data that people wanted would be stuff that you could pull from websites and from web api's and that when we thought that the Oracle problem was basically a question of how do we bridge the gap between some trusted websites and a blockchain but what we found in practice is that a lot of those whip those web api is even if you trust them turned out to be not exactly what you need for that for the contracts that you're trying to settle so let me say just a little bit more in case anybody isn't familiar with it what the Oracle problem is so if you want to make a a
contract the your blockchain can do all kinds of amazing things for you in terms of managing assets managing for example if this happens in this case we should give these assets to this person in this other case which give it to this other person but to do that it needs to know some information in all the most interesting cases about the real world right so if you want to a bet on who won this game at some point when you come to settle that bet you need to know who won the game if I want to insure my office against burning down then at some point I need to know did my office burn down we've seen we've had all these I'm a SEOs people have been doing that have taken the form of just dumping huge amounts of money on teams and then
hoping that the teams then deliver well there's to deliver it would be a lot better if we could do that milestone at a time if they don't hit the milestones the money goes back to the funders but to do that you need to know if they actually hit the milestone so that's the the kind of problem that that we need to solve and the approach that we've been taking is that we want to since we're working on a serum which is Lego money we want to break this up into small parts so some of the other projects in the space for example augur is designed as kind of a vertically integrated prediction market our project so they have trading facilities they have creating market facilities and they have a decentralized
oracle but we like the idea of breaking all this stuff apart so that anybody can make a consumer contract that's the contract that is actually going to pull the data then we can use our our part reality o which is designed to get you answers fast and cheap and then finally a reality our intern uses what we call an arbitrator contract which I'll talk about in a second which kind of a backstop and that backstop also we wanted to make kind of pluggable and to be able to use different different models so for reality oh this is kind of what we were trying to do anything your contract needs to know if it's widely known if the public kind of know the answer to it we want to be able to
handle that kind of question we want to do it as fast as is humanly possible we wanted to be cheap for the typical case and inevitably when you're dealing with truth about the world inevitably there are some things that are expensive sometimes something's contentious sometimes you need to you know to have a have a complicated complicated discussion about the right answer but we want those expensive parts to be funded by idiots and Liars and we want to incentivize honest and you know accurate providers of data to use the system obviously we want we want the gas to be as low as possible I always feel kind of icky if I have a function that uses more than 100,000 gas and so we've got nothing in our system
using more than a hundred thousand gas typically and just to make it as simple as possible for for consumers for contractor using the system we want block chamber rock chain only so no swarm no ipfs just a contract call the data live see an event logs are in contract storage finally we don't want to have to use funny tokens so reality Oh works just with ether you don't need some reality Oh token we we know probably your users have got ether they need you to pay for gas so we want to do the whole thing in ether and we have handsome consumers of asked us to support other tokens which we have done for them but you don't need to do that so this is what we built is it's going to adapt front end so you can put in any
question you like and it's all based on this kind of economic game you put in any question you like when you put in that question if you want to you can put up a reward so this is money tha that is going to be taken by whoever gives the final correct answer and then when you and then anybody who wants to can answer that question but when they answer it they've got to post a bond and posting a bond then sets a clock ticking if nobody challenges that then that's your final answer but if you see an answer that's wrong you can go and challenge it but when you challenge it you you're going to double the bond so if it's a contentious issue the bond is going to keep on doubling and doubling doubling until somebody gives up now you're probably listen to
this and thinking okay if somebody shows up with just a huge pile of money then they're going to be able to give the the final answer to everything which would be bad but what we then do is we have an arbitrator a backstop and this is a pluggable contract I'll tell you in a second the kind of ways we can do this anybody can pay a fee to request arbitration and it's typically going to be quite a heavy fee and when they pay that fee automatically Abakan create a contract sends a message that freezes the question and waits till they report so this costs a lot of money but the idea is that an honest person shouldn't have to end up being out of pocket because if you see somebody's put the wrong answer in you can just keep on
escalating the bond so even if the arbitration fee is let's say ten thousand dollars you can just keep escalating until the other guy who's put up a bond above ten thousand dollars and then you can pay the fee and then get a result in your favor and make a profit so what this allows us to do is it make allows us to make the arbitration process are very expensive very slow use funny tokens if you want to and these will make it much easier to do arbitration so let me talk a little bit about the approaches that you can use you can use trusted third parties now obviously that's not really what we're about when we originally built this this was before rum or Guren
Clairol's and ships and we weren't sure if anyone would even really get anything working to do this in a decentralized way and right now it looks like augerin and Clare also broke working pretty well it seems like the decentralized approach is a very promising so you may not want to use for us to third parties but I think there are some special situations it's really even situations where you may want to actually pay somebody to go and gather information so if there's a dispute about my office whether my office burned down maybe you want to actually send somebody to go and find out whether my office burned down actually check and look at my office and see if it burnt down so then we've got Claro Claro some Aden integrations they've made an arbitrator contract so you'll send the feed to claire ross and
so this is kind of an for people not familiar with it it's a decentralized court system it's not usually gonna be it's going to be not going to be fast or inexpensive it's going to be kind of expensive and potentially slow and involves a lot of humans playing a kind of shelling game to it to agree on something but in this case it doesn't matter it don't have to be fast it just has to as it has to be good so they built this this arbitrator contract so you can use Clairol's as the arbitrator the vast majority of cases will just settle with reality Oh with our escalation game but in these exceptional cases where somebody escalates and pays the fee we go to Clara's um then there's a really exciting thing that some nosis guys are working on there's a project that's just
been been funded so we're going to have this thing working with gnosis at both ends so so we'll have some consumer contracts working with gnosis so that your gnosis markets your conditional tokens can use reality oh as a as a source of data and then at the other end no sis have their Dowell the DX down and the DX down is responsible for upgrading contracts in in in the things that it controls so in some cases you already have kind of a trust relationship with that dowel so that so you can then also use the down to to resolve these contentious issues again it's it's quite an expensive thing it involves a lot of
humans to talk to each other and and vote and and work out what the right answer is but that doesn't matter because it hardly ever has to happen um you can use or go now which so we built a connector that would send things to order for disputes and some of the developers are all got kind of cross with us for reasons which are some good reasons which I'll explain you may wonder why why go through reality oh why not just use orga directly and the reason is the augur is really is really designed to work with they're kind of vertically integrated system it's not really designed as a general-purpose oracle for other contracts to call so right now one of the one of the the projects that's using reality a lot called we trust originally they built
the thing to use or is their source of truth and they found it was just too expensive and too slow and too cumbersome to use for that particular purpose it's just not what Walker was designed for um and and finally I'm going to talk in a little bit about for comics this is our ground plan for a new kind of money and this is a way to resolve some of some of the problems that all of these projects face so I'm going to go into specifics a little bit and then I'll kind of broaden out and talk about more sort of game theoretical problems to do with Oracle's so how you'd actually you use the things so the simplest way is like this you go to the dap and you use the dap to put in a question when you put in that question you get a question ID you can then set
up your contract to use that question ID so you might say if the question if the answer to the question ID ABC is true then alice gets the money if it's false then bob gets the money so that's pretty simple you can then just call it like this get final answer parsing the question ID and it'll give you about 32 back with the answer or it'll revert if the so isn't available if the thing isn't finalized or whatever um if you want to answer the question with your contract you can do it like this so it's just this very simple function call returns the question either you just mentioned so we call ask question we passed in a template ID which I won't go into the content of the question the arbitrator
that you think is okay and the timeout period so remember we have that challenge timeout after you put in an answer how long do you have until we consider that the final answer so you know typically you'd use something like a day for that or a week but in in some contexts you might have a lot of people online all at the same time and you might want to actually run it really fast and you know 5 or 10 or 50 minutes are challenged periods um sometimes you don't actually know when a question is going to resolve so if I want to look at whether my office has burned down then maybe it didn't burn the app down yesterday and it didn't burn today but maybe it'll burn down burn down tomorrow and I don't want to just set a really long deadline for this right if I've got
an insurance thing set up I don't want to have to wait till say the end of the year to check if it's burned down and check if I get a payout I want to immediately prove to the system or prove to the the insurance contract that my office has burned down and then use that to immediately get my payout um so what we can do there is that the insurance contract instead of looking for a specific question ID would look at the content of the kind of question that answers the the issue it's interested in so we pass in there the content of the question how's the office burnt down the oil traitorix it accepts the minimum challenge period it thinks is okay and the minimum bond that has to be staked against that answer to
prove that it's good and so if my office has burned down I can then go into reality Oh create this question let the world see it give the world that that day to challenge it if they don't think it's burned down and then take that question ID pass it to the insurance contract and get my payout I'll skip through the formatting questions stuff because that's all kind of in our in our documentation it's maybe more detail than you need right now I should say a little bit about things that won't work so we need the blockchain to be available this is something that anything that relies on challenges tends to have this problem a lot of layer two systems also that if somebody puts in the wrong answer you need to be able to get your correct answer in to challenge it and we've tried to just make the gas
cost as low as possible on correcting bad answers so that you even if you're fighting against a blizzard of spam or something you can still get your answer in but there is no guarantee that the blockchain will always be available and that you can always get your transaction at a reasonable cost so there is a potential problem there it doesn't work well with very ambiguous answers with questions with a lot of potential answers so the way that you correct a bad answer is by putting in a good answer but if there are three different options that might all be right and you're not confident that any of those are good then you may not be prepared to to fix bad information kind of trixie questions you know questions referring
to some URL that's in the control of somebody we've seen a bit of this on augur the repeat people putting in you know differently deliberately misleading questions and this is potentially a problem for the system and finally the arm the arbitrator has to work so let me talk about the I would try to work in okay so anything that relies on economic security so pretty much anything that's relying on token holder voting and also kind of things that are that are relying on you know the cost of of mining has this same issue that there's a certain economic cost to breaking the system or
to acting to act maliciously with the system and you have to hope that the cost to doing something malicious is higher than the cost of a higher than than the benefit that you can get from doing that right so if you're dealing so the simplest case is a lot of token control systems can be 51% attacked so if you buy out more than half of the tokens in the system based on some kind of token boating then you can make that system do whatever you want and say whatever you want so if somebody's put up a bet if there's money at stake that is higher than the amount it cost to attack the system then you should probably kind of
assume that somebody's going to do that so so this is kind of a fundamental problem oh yeah also with proof-of-work systems and if the system is badly designed then it may be worse than that but at least the best case generally is the you know you're a 51% attack and can do you damage so there are a couple of approaches to this one is just to say well let's hope it doesn't happen and that's kind of what he theorem does right I mean there's always money at stake in in defy applications right now and it's quite plausible that it may be profitable to do a substantial roll back of the chain and to do a 51% attack and and make some money like that so I think
it is actually a kind of a not insane solution to just say well let's hope that doesn't happen let's just hope that the amount of money at stake the cost of attacking the thing is less than the benefit of attacking the thing and it won't get killed or get try to actually manage this security call the security load the security burden um so what orga do is it actually keeps track of how much money is staked on bets inside the auger system and if you try to stake too much money in augur compared to the value of all the orga tokens then augur will raise its fees which hopefully will reduce the amount of money they get
staked and also increase the profitability of holding the token so so that way you you push in the right direction in both directions and you put this thing back in balance and that worked great in a kind of averting in in this kind of hierarchically integrated system where the there's no actual doesn't there are no other LEGO pieces and there's nobody else relying on that information for their bets but the problem is that there's no way to actually know not only can you not prevent this you can't even detect it so it could be that a couple of people have made an enormous bet on Olga they could have done it with a counterfactual contract so the auger is only the backstop and unless
something weird happens you never actually call Olga so this code may never even go to the blockchain and yet the incentive structure is still there that would make it worthwhile to attack Olga um and what's worse is that potentially if this does kick in you actually increase the incentive to make these parents light systems because if you put the fees up then I could pay the higher fee or instead I could go off and use a parasite contract and not pay the fee at all and and that means that the profitability of Olga actually decreases and then potentially you get kind of a death spiral um so this is kind of this fun little fundamental issue that the orga guys acknowledge so it's just kind
of a sort of an unsolved problem um so there is a strategy we think which can kind of escape this equation but it's a little bit weird and it has some limitations so this is the thing that we really like to get kicked off so Vitalik talked about this concept of subjective ah cracy we've been referring to it as fork anomic s-- the so the I guess the easiest introduction is if you think about times when instead instead of having a dispute about facts people were having a dispute about governance so when we had this disagreement about whether we should revert the money that was stolen from the DAO we ended up with
since we had this kind of intractable dispute we ended up with some of the people used etc' and changed the rule and didn't change the rules and other people use ETH and did change the rules so when that happened if you started with money before the fork if you started with one teeth before the fork you ended up with one ATC and one ATH after the fork and this gives you this kind of weird kind of security that it doesn't matter what the majority does you can always be sure that there will be a chain that reflects the world as you see it if you're prepared to to at least if there isn't you can create one and in a lot of cases we think that the correct decision is going to be the
more valuable one so in a lot of cases people can then look at these Forks and say okay this is the one that's got more money behind it therefore it's it's true and correct but that may not be the case and that may may not be the case for a particular time so if you try to get objective information out of these systems um there is still this sort of security burden there's risk that it can be attacked but the other thing that you can do is just not assume that you're going to get objective truth out of the thing everybody can use the chain they want to use and you can just carry on using the thing so that's effectively what's happened with with e th and e TT um so the thought here is what if we do that but instead of doing it with
governance we do it with truth with with facts about the world so in a kind of a naive way of doing it this would be that every time we have a question we would fork so if you want to say did our office burn down you fork your token that you've made the insurance contract in into two versions one says that it did burn down and one says that it didn't burn down and then probably if it did burn down everybody knows that it burnt down then they won't be very interested in taking the version of the token that says it didn't burn down and all of the value will go in into the the one that's correct if it's a fundamental kind of a worldview difference it's possible that
you will have enduring Forks and they have an enduring split but that's okay but but what you probably thinking looking at this is okay if you do this with facts then throughout a hundred million gazillion trillion facts and then some so we're going to have just this vast forest of forks which obviously wouldn't practical and but what we can instead do is we can commit our token to a white list of arbitrators so so what one branch might say that Claire awesome DX Tower okay and then the other branch might say I think the DX down just got attacked so you shouldn't believe the information that you get
back stop by DX down so if we do that since we don't have these issues about is this arbitrator good anymore since those issues don't happen so much we don't get some crazy forest of forks and we should get kind of a reasonable amount of forking so that's what I really like to see happen we this kind of grand for king token curator registry of arbitrators of truth you have a token committed to a whitelist of good crew sources good arbitrators we can model all this stuff inside a single contract or in different contracts on a single blockchain so we don't need to four key theorem we don't need to do anything at kind of the
base level we can do all the fit all of this modeling on top of the existing singly theorem chain whenever you want to change the whitelist you could just fork off the thing so we've been doing some some prototyping with with Aleks home and over there who's going to be talking later today and he also pointed out that um that we can also support other assets on this same forking universe we're not limited to a single token obviously the limitation here is that since your token can fork it's not going to work with actual with tokens that actually reflect some objective thing in the world so if you're trying to manage who owns my house only one person could on my house we can't actually fault the house so you're
limited to dealing with things that exist kind of purely in the sort of the mimetic blockchain universe and you and you also conjure things like stable coins where if you if you try to split four key theorem potentially if you're holding die weird things might happen you may end up with no die or to die or who knows so that's what I'm proposing is kind of fork anomic mean money um the way I think this should work we like we could do an SEO and make it a kind of our project open but I feel like it should be we want Lego money right we want all these composable parts talking talking to each other so the risk of being grandiose I think this needs to be a token shared across the whole
ecosystem we don't want one project in control of it because if you look at actual token actual currencies of the forks in practice bt c b CH b CH b sv ET c ET h in practice actually the core dev team always kind of wins so it seems like you probably don't want to call the dev team you need it to be very distributed in a very anarchist and we need to somehow we've got all that the kind of the parts are all working alex has got the had a prototype of the the the unconditional token that the gnosis uses to handle this method of forking so we've got all the bits but we need to somehow mean this thing into existence and maybe get some other projects using
it and and make this really weird kind of money okay so I hope that's useful to you so we've got reality oh it's on main net it's it's tested it's live today you can use it we've got the four Konami money which is really weird and very interesting I've put a few links up but reality Oh slash napkin please come and talk to me later if you're interested or or jump drop by our discord and let us know if you've got any questions or comments okay thanks Evan so we have time for a couple of questions if folks have questions from the audience over here in the yellow yellow jacket hello thankful presentation I want to
ask about can you explain more about arbitrators entity who are these guys and why we have to draw them right so so the arbitrate so the arbitrator is a contract it can be any contract you like in those contracts that have diffidence right so if you're using Claro's you use Clairol's because you think that claireaussi is krypter krypter economic shell shelling point design set shelling game design is good so if you think that Claire or Caesar is a going to be a functionalist functioning system then you can trust it if you're using augur is the arbitrator then because you think that organs crypto economics works if you're using for example a consortium of trusted
parties then that may be regular real world reputation however all that said if we do the fork anomic thing then you don't have to trust the arbitrator because if the arbitrator starts doing things that are wrong then the economy can just fork around them and ignore their bad data does that make sense one more one more question and learning from experience try to speak extremely clearly and not too gravely and we can hear you up here it's quite tough to hear who's anyone got their hand up okay no problem thank you very much Edna
[Applause]