# Snopes Meets mechanical Turk on a Blockchain: Reality Keys,

- Channel: [Devcon](https://streameth.org/devcon)
- Date: 2018-10-07
- Duration: 19:50
- Watch: https://streameth.org/watch/yt-I_69IxjIgqU
- YouTube: https://www.youtube.com/watch?v=I_69IxjIgqU

## Description

Visit the https://archive.devcon.org/ to gain access to the entire library of Devcon talks with the ease of filtering, playlists, personalized suggestions, decentralized access on IPFS and more.
https://archive.devcon.org/archive/watch/3/snopes-meets-mechanical-turk-on-a-blockchain-reality-keys-on-chain-truth-verification-and-subjectivocracy

The next-generation smart contract oracle platform by Reality Keys crowd-sources the process of data gathering and fact checking with an incentive-based system on the Ethereum blockchain. Our system is designed allow contract authors to fetch arbitrary structured or unstructured factual data, without relying on a pre-existing trusted off-chain data source.

Speaker(s): Edmund Edgar
Skill level: Intermediate
Track: Developer Infrastructure


Follow us: https://twitter.com/efdevcon, https://twitter.com/ethereum
Learn more about devcon: https://www.devcon.org/
Learn more about ethereum: https://ethereum.org/ 

Devcon is the Ethereum conference for developers, researchers, thinkers, and makers. 
Devcon 3 was held in Cancún, Mexico on Nov 1 - 4, 2017
Devcon is organized and presented by the Ethereum Foundation, with the support of our sponsors. To find out more, please visit https://ethereum.foundation/

## Transcript

getting information from a website to a contract and that's something that we do a reality keys but I want to talk something about something a bit broader today so this is kind of an ideal smart contract this is our insurance contract so I've kind of skipped the stuff where we set up a policy but we've just got the claim function there so what we'd like to be able to do is we'd like to speak to the absolute contract that knows everything and get the answer back doesn't exist and what is truth anyway so today is just talk through a little bit of theory and then go into some practical problems and some solutions and then hopefully at the end you'll see so there's this idea running right through Western civilization right through from Plato beginning of the 16th century the objective truth it's out there it's consistent it's eternal it's absolute and this originally was thought to apply not just to kind of factual stuff like has my office burned down but also to moral stuff to values then and then in the in the early Christian thinking they took this whole foundation with them and they also had it a hierarchy so you had the Pope at the top and the Pope was infallible so you've got objective truth and you you can pretty much find out what it is at least about certain things and then in the 16th century Martin Luther made his epic post nailed to a door on a church in Germany allegedly this is this is disputed and he said wrong and after that we had kind of hundreds of years of religious wars in Europe well people fought over their conceptions of the absolute objective truth and one of the strategies that allowed people to stop killing each other and live together was to separate truth into different baskets so you have things like scientific truth which is considered kind of objective and that you shouldn't really disagree about and then you had other value judgments that were we're not we're not considered objective and even this bit of objectivity is something that some recent philosophers have got a little bit suspicious of so post modernists think something more like this disagreement in language so the idea is that when we make claims we're playing a language game we've got a kind of a consensus system and something is true to the extent that it follows the rules of that language game right so it's true if you obey the consensus rules now well this has been going on there's something kind of weird happening in politics the internet is having this weird kind of crisis about truth so we've got on the one hand this vast internet knowledge but at the same time you've got people embracing alternative facts and you've got basically entirely made up news circulating freely on Facebook and deciding presidential elections and this is for two reasons the first created to help with the problem and then I want to talk about an approach called subjective accuracy which can help with the perspective problem so there are people out there on Facebook who are trying to hack your brain anyone in your social network or any paid advertiser can push claims into your stream and you have to work out what to believe when you're faced with a claim if you were prepared to spend a lot of time and money evaluating it and researching it then you could probably do quite a good job of getting to the bottom of it but since you're not prepared to do that you end up potentially believe leaving a lot of and this is a kind of a pattern that you see a lot in information security and also in for example missile defense there's this asymmetry between the attackers job and the defenders job because the attacker can just hit us with the entire this entire barrage of and we've got to defend every time to be successful and even if the attacker can't manage to get their through every time they can bring off a kind of a denial of service attack against the truth because if you can hit people with enough stories and enough claims they just lose confidence that they can evaluate any of them and then when they see something true they they can't they can't they can't evaluate that either so you end up being able to steal from them without them noticing so what we've tried to do is to increase the cost of attacking and decrease the top the cost of defense so this is reality check this is Mechanical Turk meets Snopes on the blockchain the rule is that anybody can ask a question and anybody can answer a question and that anybody can be you or it can be your contract so we make no no no distinction there and the goal is that people who give the right answer are going to get rewarded and make profits and people who give the wrong answer are going to make losses so we can ask a question like this this is why the the DAP or like this using a contract so we're passing in a template ID there that I won't get into there's also the text of the question a challenge timeout and an arbitrator I'll say the arbitrator later so the question is going to show up on the blockchain and therefore on this website and you can come out come in if you see a question you know the answer to then you can post and like this or from a contract like this now when you post an answer you're also sending some money this is a bond so this is money that you're going to lose if you're wrong and you're gonna get a get back if you're right and by wrong and right I mean that your answer whether your answer is decided by the system as the final answer now every time you you post an answer if you see an answer that's wrong and you want to correct that answer you can always do that but you have to double the bond so once that's happened once the timeout period is elapsed you can get the final answer from your contract like this so if we know the question ID we just pull it in give us our answer sometimes you want to do something more like this sometimes you didn't ask the question yourself but you want to take any answer that adequately answers a particular question also with a reasonable arbitrator and with a reasonable timeout and so you can in that case you can get the final answer if it matches these particular criteria so your user can send you a question ID and then you check that question either with the contract and if it's right you go ahead and use the answer so you're probably wondering what happens if somebody keeps on putting money on something that that's untrue and is prepared to put serious money to back there there there lie and what happens is the person who happens it's going to escalate so you end up with quite a lot of money in bonds resting on this particular question and then once that happens we get a serious amount of money in the pool and somebody is gonna want to use that money to pay our arbitrator now the arbitrator sounds like a person and it can be a person but it's a contract so it can also be a decision making process it doesn't have to be cheap it doesn't have to be fast but it does have to be able to get us our answer and we do have to trust it so it's kind of like the the Pope in the medieval um metaphysics there now for a lot of this is gonna be the right solution and we're going to be able to construct an arbitrator that suits your security needs in particular it's often going to be better than what people have been doing at the moment where they're pulling data from some website and even if the middleware that gets them that data is correct that website is there Pope and often the website or the websites that you're pulling from even if they're backed by some fairly reliable provider aren't actually secured with the kind of assumptions that we make when we're dealing with magical internet money so we've got ourselves to a place where we don't have to call on this arbitrator very often and we can use an expensive process so the the lip the arbitrator could literally hire somebody to go down and look at my office and see if it's burnt down out of the gate this is a service that we'll be offering a reality keys but we also think it's a great fit for things like all industry consortiums if you've done any work in the private blockchain space it seems like everyone wants to make a consortium to do blockchain stuff and then they come and talk to guys like us and they say what should I do with my consortium this is really somewhere where these existing industry players could leverage their their existing brands and their expertise you can also make this a socially expensive process so for example if you've had an IC o---- and you've got you've got some people who are supposed to be delivering particular milestones you might say we want to pay them if they reach these milestones and we're gonna check that with reality check but the arbitrator is going to be a vote of the token holders so in most cases you're not gonna have to call on them but if you do then you can so a reality check doesn't care it just lets you supply your arbitrator and it sets things up so that the arbitrator only has to get called on if very occasionally and that when they do get called on they can charge very attractive fees so this is our attack our application deployed on on the rinkeby test net I've also posted our Gator channel there the plan is that we're gonna take feedback for a couple of weeks on the details of the API and stuff in case anyone it has any thoughts then get out to an audit and hopefully have it you know live on the main net very soon so that's the efficiency problem but I want to talk about another problem which is perspective so for years we've been serving data on the question what is the price of Bitcoin and that's been a fairly factual question for most of that time there was a point when we had some funny data coming from Mount GOx which eventually went away but generally speaking was very straight forward but then next month when the fork happens this becomes a fairly contentious question and it's really not clear at all what the right answer is going to be to the question what's the price of Bitcoin you know there are gonna be at least two or three bitcoins around that you could possibly take the price off and maybe should have them together and you know who knows so that's a question that really depends on your point of view and perspective is quite a tricky problem for consensus systems if you look at the original problem that Bitcoin was trying to solve you've got all these nodes on the network and they all have a different perspective on the network so they all see transactions at different times and what you want to know is given two transactions that have been sent which one was sent earlier and that's something that about which every node will legitimately have a different opinion so I thought she just kind of punted on this and so she's genius was to realize that it was actually okay to punt on this question so Bitcoin or a theory and we'll just really just pick one and it'll you know and and what it'll promise you is that if you give if you ask it again then with an increasing probability it'll give you the same answer again so if we're trying to get the truth of a proposition it's not really clear that this answer will do it for us we don't really just want punt on anything that has perspective involved especially because things like the price of Bitcoin a lot of things actually turn out to have perspective when it maybe seemed like they didn't so we want the answer but there is no the answer now this is something where we've managed to handle in blockchain systems when we're dealing not with the transactions on top of the blockchain but with the basic rules of governance of the blockchain so what we did with the the dow hack or what we did with Bitcoin and Bitcoin cash was when there was a serious dispute over governance we fought the chain so if you have a Bitcoin before that fork then you have Bitcoin and Bitcoin cash after the fork and if you have ether before the fork you have it ether and EDC after the fork and this gives you kind of a slightly strange but kind of remarkable kind of security in that especially from the point of view of the minority if you lose to the minority of the majority if the decision making process in force goes against you you still have the ability to continue with your own chain you still have the ability to follow your own rules and it may be that even if in the short term the market goes against you who knows maybe in the long term you will also find that your token is more valuable than the other one and even if it doesn't then you still get to do what you want to do so this is a great fit for handling disagreements about reality what we can do is embrace perspective and embrace subjectivity so what we need is opinionated money so we've written a token contract it's about 100 lines of solidity and it commits every day to any number of new world views so every day you can create new branches on it and cause it to fork and each of those branches were represented a different world view so in each of those branches then the the contract knows how much money you should have and it'll allow you to spend money that's that's on the some parallel chains twice but not money that's on the same chain so it looks something like this so if you wanted to know did my office burn down one person might say it did and one other person might say it didn't so we have two forks and you can keep your money on on either or both now once we can do this your smart contract no longer needs to choose between these different allegedly objective realities so if you've got a bed on did Trump or Hillary win election you don't need the smart contract to choose which one which of those things happened you don't even need that to be an objective truth about which one of those things happened your contract just pays the person who thinks that Hillary won on Hillary won on the branch that says Hillary won and pays the the person who bet the Trump won on any branch that says Trump won so we can take all of that stuff all the objective stuff right out of the contract and put it into the social realm now at this point people always worry that if we've got these hundreds of thousands of facts and we're branching on all of them we're gonna have just an unfathomable number of of branches but this is quite a nice fit for our arbitration contracts because our arbitration contracts in reality check represents a process for forgetting resolving a bunch of facts and so you have a large number of facts that are all hid around hid behind that contract so what we can do here is you commit to a whitelist of arbitrators once you think that an arbitrator is bad you can just remove that arbitrator from the whitelist and what anyone can just publish a branch that removes that that arbitrator from from the whitelist and this means that we no longer have to trust our arbitrators arbitrators because if the arbitrator is bad the economy can just route around them so we can do this whole thing without needing needing that the trust so very quickly I just want to compare a couple of code examples so this is the claim function with a pope right this is the claim function with an arbitrator who the contract already thinks it's going to trust so what we're doing there is we're checking the question that somebody feet somebody feeds us to question ID and when we check the question and then we send them so in this case the balance of all tokens held by the contract to that person this is the same contract on subject democracy so the claim function is a little bit different we've got a branch parameter and arbitrated parameter and the first thing we do is we go to the token contract and we ask it on this branch is this Alice is this arbitrator legit and if the arbitrator is legit then we go ahead and all the rest is just the same except for the very last line where that token payment also specifies a branch so once we have opinionated money like this people are welcome to play their own language games and embrace their own worldviews so you're entitled to your own opinion hell you're also entitled to your own facts this is aetherium it's it's permissionless it's free you can do what you like but if you won't play a language game with somebody else you're gonna have to persuade those other people the world that you're trying to inhabit is interesting so we'll see what kind of values the markets actually want to assign to those different branches and we'll also see what people actually want to use so Kellyanne Kong where's welcome to her alternative facts if he wants them that's absolutely fine but we'll see what universe what worldview what set of facts uses if she wants to say ensure her house and get reliable data when it burns down so if like me you're excited about this then please come and talk to us on our Geeta Channel I've also put all the things this was a piece I wrote last year about this also links to Vita leaks writing on subject democracy where he did a lot of legwork so please please do come and talk to us the reality token thing is nearly ready to go but this thing we're still kind of batting around different models and so we'd love to hear what you think okay [Music]
