190 likes | 201 Views
Realitio: Snopes meets Mechanical Turk on a blockchain. Edmund Edgar, Founder, Realitio. Two main problems: 1) How to get someone to tell your contract the truth 2) How to make it fast, cheap and socially scalable. Our design goals: * Handle any question with a public answer
E N D
Realitio: Snopes meets Mechanical Turk on a blockchain Edmund Edgar, Founder, Realitio
Two main problems:1) How to get someone to tell your contract the truth2) How to make it fast, cheap and socially scalable
Our design goals:* Handle any question with a public answer * Fast for the typical case * Cheap to use, expensive parts funded by liars * Low gas usage * No funny tokens
The economic game: * Anyone can ask a question (pay if you like) * When you answer you post a bond * Answering sets a clock ticking * Anyone can change the answer, but they have to double the bond * Changing the answer resets the clock * Once the clock goes to zero it’s automatically settled, unless...
The arbitrator contract * Anyone can pay a (hefty) fee to request settlement * Let a liar put up a big enough bond to make a profit * Paying the arbitrator freezes the question * Anyone can make an arbitrator contract
Arbitration approaches * Trusted parties (Yuck) * Experimental crypto-economics (Aaargh) * Schelling games, eg Kleros * Subjectivocracy: Augur’s Evil Twin (See my other talk) * Use Augur, like a parasite
"parasitic markets have the potential to threaten the long term viability of Augur, and should be vehemently opposed" - Augur whitepaper, section III A
Using it (1): Ask a question from the UI, then: bytes32 answer = realitio.getFinalAnswer(question_id);
Using it (2): Ask a question with your contract:bytes32 question_id; address arbitrator = “0x...”; // An arbitrator you trust function ask() { question_id = realitio.askQuestion( 0, “Has the Realitio office burned down?”, arbitrator, 1 days, 0, 0); ); }
Using it (3): Wait for an answered question:address arbitrator = 0x…; // An arbitrator you trust function claim(question_id) { bytes32 answer = realityio.getFinalAnswerIfMatches( question_id, keccak256(uint256(0), "Has the Realitio office burned down?"), arbitrator, 1 days, 1 ether ); }
Formatting questions:{"title": "Has the Realitio office burned down?", "type": "bool", "category": "insurance"}Separated into templates and parameters: {"title": "%s", "type": "bool", "category": "%s"}”Has the Realitio office burned down?␟insurance”
Making your own template:uint 256 template_id = realitio.createTemplate( “{ \"title\": \"Was flight %s on date %s delayed by more than 3 hours?\", \"type\": \"bool\", \"category\": \"flight-information\" }”);
Things that will work badly: * Unavailable blockchains * Ambiguous answers, with lots of options * Tricksy questions* Questions with information hidden between rounds
More information: https://realit.io/dappcon