DappCon 2023: Introducing Prediction Feeds - Trent McConaghy

DappCon 2023 · September 2023 · 26:04

Ocean Protocol founder Trent McConaghy introduces Predictoor's prediction feeds, at DappCon 2023. Drawing on a career spanning AI research and the decentralized data infrastructure he built at Ocean Protocol, he lays out how onchain, crowd-sourced predictions can feed AI models and DeFi applications with signals that are harder to manipulate than centralized data sources.

Speakers

Topics

From DappCon 2023, hosted by Dappcon Berlin.

Transcript

hi everyone it's really a pleasure to be here in Berlin my hometown for the last 10 years and you know at a nosis conference uh wonderful team wonderful group and wonderful conference so it's my pleasure today to introduce prediction feeds and uh you might ask what's that about well that's what I'm going to share about this is a project um that we've been working on at Ocean protocol for a while and yeah today we're announcing it let's get started imagine imagine that you are a traped trapeze artist 5 m 10 m above the ground every single muscle that you move makes a difference makes a difference whether you fall whether you do that uh Highwire act successfully or not and therefore you've got to predict what the

effect is extremely well in prediction can come Beauty in prediction can come greatness imagine you're an F1 driver um every millisecond almost matters um turn left a bit too far disaster turn right a bit too far to too quickly disaster so in prediction can come greatness can come winning there's also less than greatness sometimes if you predict badly predict about the effects of climate build a house on the coast when the seawat is rising not so good so prediction can be helpful or not helpful all

right I predict that if I press the button it goes forward no all right try backwards not sure what's happening there we go great I go backwards there we go okay so um so I talked I hinted at at climate change right so um I have a sort of pet project I'm very fascinated by what's going on with uh the rise of the Seas and in particular Southern Florida in um 30 years or 100 years no one quite knows the bottom third of Florida will be underwater and this is a zoom in on a portion of the bottom third of Florida in Miami in particular uh South Beach which is where Miami Beach like South

Beach Miami all that um it was actually under the sea and it was reclaimed from the sea in about 1910 there was a big boom in the 1920s a lot of it got built up again in the 50s again in the 80s and more recently in the last 10 years and this is what Miami Beach is like now on the on the left um you know the blue is water and the green and brown is um not water um but if the water level were to rise 1 meter then you've got about um 2/3 of South Beach that's the sort of pen Peninsula Island stuff that'll be mostly underwater with a 2 meter rise 100% underwater that part and 2third of the rest of Miami underwater as well 3 meter rise everything and if you were to zoom out the like mentioned the whole bottom third of Florida would be

underwater not so good so then the question is when right well of course there are predictions for what the sea level would be in Miami from the University of Florida and otherwise um and there's an agency in the USA dedicated to measuring sea levels as well called the NOAA so they've got a prediction the American Army as well so uh the NOA they're predicting upper bound that it'll be a 2 meter Rise by the year 2100 so in about 75 years um that 2 meters so you know almost worst case scenario it's going to be um you know pretty underwater right there is a very very conservative measure that it's you know um a fraction of that um but overall by about 2100 we're looking at 1.6 2.1 M but you can ask how accurate is is that right they've got their upper

bound their lower bound so um let's look at um past performance of these predictions um so if we look at predictions from another climate group called the ipcc um from 1990 till um about 2010 um they had uh their predictions were that um shaded gray curve there so there was an upper bound and a lower bound and if we see what actually happened that's uh the blue lines it it actually hit within the confidence bounds but the very very upper confidence balance it was hugging the edge right so and why were they so you know almost off why was it so off well they didn't account for the melting of the the glaciers uh enough and the reason they didn't was because they said

we don't have robust enough data um so they didn't they could have accounted maybe from with wider confidence intervals but in this case they didn't and I'm not saying that they were bad it's just that it's really hard to make predictions um how are other ones doing there's a lot that are good but I'm highlighting some ones that where they've had trouble here's one for the degree of sea ice um where um in about the uh you know 1970s 19 up to the year 2000 uh there had been predictions and the sea ice went off by a factor of 40% um pretty quickly right so it fell off the rails and the thing is this stuff matters a lot right there's a lot on the line here you know uh Florida going underwater or Vancouver or New York or Venice or Amsterdam Berlin's actually okay if you look at the map of what

happens Berlin is pretty good for all of this at least for water for for heat maybe another story but at least for water the point is overall it's it's really hard to get accurate predictions so how do we do that um because if we can do it there is Great Value there right um for Real Estate if you know that real estate will go up in a certain area um great you're in great shape uh if you're a farmer I grew up on a farm in Ral Canada and we would have the radio on all the time and every 30 minutes there was the weather report and it was like everyone had a shut up and listen what are they going to say about is it going to rain or not and that really mattered because it mattered for the next 1 hour the next 6 hours the

next 12 hours what our actions would be would we go farming um you know seeding or plowing or whatever or uh and if we do what's the risk of getting stuck in the mud and Wrecking our crops so it really matters in agriculture for spraying for bugs all that too what about logistics right you're often trying to plan your manufacturing capacity 3 months 6 months 12 months ahead right now we have a chip shortage for gpus because Nvidia locked in their their orders 6 months 12 months ago with tsmc so we're feeling a GPU shortage and of course crypto prices right we all think about that I'm sure we're you know this is a a crypto conference what if you can predict the price of eth whether it goes up 5 minutes from now or not or 60 minutes there's value in that there's Alpha

so um so overall actually oh it somehow jumped but that's okay let's keep going okay so accurate predictions are hard and here's a key thing there's no accountability when wrong right when listening to that radio um from the weatherman um about whether it's going to rain or not if they say it's going to rain with 90% probability and then it doesn't rain um you know it sort of no skin off their back but to uh to the farmer to my father the farmer it really mattered because it was 6 hours 12 hours of lost time when you could have been farming and vice versa even worse if they say um it's not going to rain and you go into the field and you get stuck in the mud and wreck a bunch of stuff that's really quite bad so the weatherman he's like I don't know so how

do we get accountability in predictions um and here's the core idea um and this is accurate prediction feeds right this this is time series for accurate prediction feeds you need to make the predictions accountable put your money where the mo your MTH is so therefore if you're correct you make money and if you're wrong you lose money simple as that and of course you can take this in many ways in blockchain land but blockchains are um you know a system for engineering these incentives token engineering all of that so here's the goal overall we want to have prediction feeds for everything we want to have prediction feeds for climate and for short-term climate which is weather rain and wind and all that for transportation for logistics for manufacturing and for crypto of course

we want it to be globally distributed where anyone can predict and earn money um it's no gatekeeping at all we need it to be accountable therefore we get accuracy we need it to be non-custodial you know that we can't be a middleman um having the money flowing in and out and of course it's got to be privacy preserving because if these everything is transparent people can't make money very easily so that's the goal how um what do we do with this well today I'm happy to announce ocean predictor an ocean predictor is an dap and a stack for prediction feeds predicting time series let me share what predictor is all about here's the overview um there are two key sets of actors in the ocean predictor ecosystem there are predictors

these are people who are using Ai and machine learning and other things to make predictions um such as you know will Bitcoin go up in 5 minutes or not um and then they take those predictions and they put them into a smart contract running on a chain and this smart contract they have one for Bitcoin one for eth ETC uh into this predic contract and then they're going to get paid if they're right okay I'll get into more into that later and then Along come Traders Who Um can buy these feeds and they'll see okay eth is going to go up in 5 minutes um and they know from past experience that it's maybe 52% accurate or 60% accurate whatever so that's Alpha they can make money from that so they buy these feeds and then they use that to trade you know it can be a direct

rate right Buy Low sell high or vice versa um shorting the other direction um or you know you can get fancy with options and derivatives but the the heart of this is now there are prediction feeds that are available on chain for purchase by anyone in this globally distributed permissionless non-custodial fashion let's drill into the structure a bit more so this is um on the left um predictors or Traders or whatever they can get going by going to predictor this is a new site that we just launched today um where you can go there and play around and see these feeds and I'll show some screenshots in a bit um you can play there and uh start to get a feel start to build your mental model of what it looks like but where the um rubber really hits the road where

the real action is is if you're a predictor you're making predictions every five minutes or so um you're going to want to run a bot because otherwise you're going to get tired after a couple hours so uh we have template Bots for people to run um as a predictor to make predictions um you know a baseline random one and then also ones with some um AI models for people to work with and so on but of course if you really want to do well you know um if you're an AI person then you go in and make a better model yet to make better predictions yet um we also have a template bought for Traders you know a very basic one if it says price go up then buy and then automatically sell five minutes later and vice versa for Price go down so that's the heart of the top level

interactions um and then uh from these Bots what they're doing is they're um sending the predictions to the chain and uh if they're correct they're making money um and then the Traders as well they're buying the predictions from the chain um and then working against that uh this is a screenshot of predict order Ai and it looks a lot like coin gecko or coin market cap or something so every single row is another pair so on the top it's uh in this case Bitcoin true US dollar um and what it shows you then going left to right um the price of that um at 11:15 and then 1120 and then now and then 1125 basically will the price go up or not that's the predictions uh uh row I mean it's column sorry and then it tells you the accuracy over time too so if it's random it'll you know

converge to 50% if you you've got actually good predictions happening it could be 51% 60% whatever um and of course if you don't have the um subscription yet you can buy it um there's one um feed that's free and the rest you can buy okay what do the bot templates look like so we've got a GitHub repo open source Apache 2 blah blah blah um and you can go there um and um go through the readme and get running with a template and of course you can Fork it do your own thing and you can do this if you want to be a predictor making predictions or if you want to be a Trader buying the predictions and then trading against this um so what is the life cycle of a prediction itself so it happens over

three epochs over three intervals of five minutes or whatever the interval is at Epoch um T the first Epoch that's where the predictors submit their prediction and they submit it right before the EPO ends typically right so like 2 seconds before 10 seconds before whatever and what they each do is they they submit a prediction but critically they have to put their money where their MO is so they they submit a prediction and a stake of say this first guy he says I'm going to stake maybe 10 ocean I predict that um eth will go up and the second guy he Stakes maybe 20 ocean eth will go up and the third guy says going down okay then what happens it Aggregates this together in a private presision way I'll get to that and um as an overall uh prediction and um it says okay it's going up with say 30 of 50

Ocean State towards up okay and then um that is information for the Trader to take and um use however they like um it could be a very simple trading strategy or it could be F here so they buy and then um a simple strategy for them is 5 minutes later when the third EPO starts they sell okay that's when the prediction was for so they sell then or they exit their position um and then at the same time in that Epoch this is when the true value is available right because now um the the true value of eth has been posted on binance whatever um in the binance exchange so um we have an agent running that posts this to the smart contract cont ract and then um there's accounting done to update okay this predictor was right he gets some

money this predictor was right he gets money this predictor was wrong um he gets slashed so overall I get into it but um predictors themselves make money um if they're accurate overall and lose money if they're not so once again accountably accurate what about privacy um overall there's actually three privacy challenges here um in this system in the predictor system um we need privacy for the predictions that are submitted because if that's transparent on chain then other people would just peek on chain and see right um also the Computing from the different um submitted predictions from three or 20 different predictors um as those get aggregated up um that has to be um private as well because otherwise people

you know if it was transparent once again you wouldn't be able to create value from it and the third thing is the aggregated predictions themselves once this compute has been done that aggregated prediction has to be not fully private it has to be available to who Whoever has subscribed to that feed who whoever's paid to see that feed so those are the three privacy needs and of course you could do the centralized right but then that you know kills the rest of the specs it's it's um you know so you want to keep it where it's decentralized non-custodial permissionless all this right so that's the big Challenge and you know for the last 10 years we've had um uh transparent chains and now you know the world is moving towards privacy and just in the nick of time of the Privacy work uh we were uh we explored and looked

around at the different options of what would work we built many prototypes using a whole variety of things from home workk encryption to tees and so on and in the end um we chose to use Oasis Sapphire why well it met our privacy needs cleanly end to end it's the only privacy preserving evm chain in production right now which is um yeah that's just how it is um and how does it use um make things private it uses Intel sgx trusted execution environment te and with this I would like to welcome matate from Oasis on stage to um tell a few more words about Oasis because we've been big fan become big fans of Oasis Sapphire Network so please take it away mat yeah thank you TR uh can I employer for no you can switch it I don't know

which the button is go yeah so you're going to be my my slide switch all right yeah hi guys I'm the Bey manager at the OES mate uh and yeah congrats to the ocean team for launching predictor we're very happy to see this product I think we think it's going to do good and we all excited to see you know them using the uh underlying Tech Sapphire for the Privacy preservation of the data feeds of prediction feeds basically yeah so I'm going to do a quick intro what Sapphire is so basically it enables contract State confidentiality uh it's very flexible so in Ence everything's public if if you don't program it to be private so it's not like a privacy chain when everything needs to be private but you you can have it on a spectrum you know it can be completely public

completely private or anywhere in between uh it has strong integrity and security guarantees because we're separating compute um from Key Management tees so if something gets uh basically uh compromised it doesn't get everything doesn't get revealed as in maybe some other project that also use tees um we also have full evm compatibility so easy to use with familiar tooling right you're using solidity hardhead truffle and with privacy native privacy you can get like random number generation signing encryption all of that just is using natively on chain right uh if you can switch to next slide as we know that not every D wants to move their stuff to

another chain right uh we are also developing The Oasis privacy layer where you can utilize the Privacy features without moving your user or funds or or the daap to our chain right you're just plugging into our chain through the messaging Bridge message passage Bridge uh to get the Privacy features you need let's say in a secret ballot right you can get users on let's say in a dow that's based based on ethereum voting in private on Sapphire and get the final result back on ethereum without the user ever know ever ever knowing it right and if we move to the next slide we can see you know that there are some very interesting use cases that come with onchain privacy like you know private PR private data management onchain the decentralized ID secret ballots a lot of stuff you can do with nfts right

confidential nfts seal be auctions gaming there's a whole Spectrum you know fog of War all that the private payment so uh check it out Oasis protocol. org and I'll give it back to you Trent thank you m thank you so yes we're very happy um Oasis uh Sapphire Network um came along just in the nick of time to serve our needs with uh with predictor so um you might ask okay how you know how do I become a predictor um and this is just uh you know how you on board it's calling all AI ml Jedi so you start off as you know young naive Luke on Tatooine and just you know play with predictor AI build a bit of a mental model but then you know you go to diab Bob swamp and you work with Yoda and you you know you ramp up and we actually

have something called challenge data forming where it's a weekly competition to make predictions for the price of ethereum and you just submit once a week and um so it's sort of no pressure not every five minutes all of that it's just once a week so you do that once you're good there then you're ready to you know take thing take on Vader um uh with your lightsaber and you can run your predictor bot with continuous predictions and finally you know um once you get good at this you can keep optimizing optimizing to be come um your jaded Jedi that you know can disappear just by thinking about it and you know um that's really the the end game where you can really optimize so that's how to become a predictor and earn money and like mentioned you can earn money in three different ways the feed sales from

the Traders buying from the feeds that gets distributed to the predictors with a small fee um stake re shuffling you know the people who do bad um their stake goes to the people doing well and finally data farming so we're happy to announce that um when we will be launching an incentives program called Data uh called called predictor data farming and it's $10,000 worth of ocean every week um and you can think of it like extra sales coming to the predictors based on the accuracy Etc and there's other ways too that this ties in challenge data farming Etc um what about becoming a Trader um so calling all trading Wizards a trador and predictor so once again you know you can be a little baby play with predictor toai but people will see the Promise on your forehead and then you know you can run a

Trad Orbot start doing continuous trading and eventually become that wizened wizard ready to take on the the meanest to the mean and optimize and increase uh your profits Etc so that's how to become a Trader and predictor and Traders earn money basically from alpha right they buy the prediction feed and they use that to um as one of the key inputs to trade and make money and of course you can also participate in data farming Etc uh here's an example Benchmark we've done actually about a Year's worth of um intensive data science um within the ocean Corp team so we actually didn't uh even Embark upon building the Resto predictor until we saw that we had good results you know I come from the world of AIML going back to the late 90s so um and we have uh you know a really great team internally at

Ocean core team so here's a benchmark where um it's 24 days um and it was trading making predictions and trading every 5 minutes and it's uh about 12% returns over 24 days this particular Benchmark uh it's on um Bitcoin on binance um it uh accounts for order book slippage but in this case it does not account for trading book uh trading fees so you obviously have to account for everything and I just wanted to give you a flavor of what this can look like um and if you're ever entrepreneur you can launch your own daps on top your own feeds Etc um timeline we're launching the test net today uh you can go to predictor a you can go to the the trading Bots all that in exactly four weeks we are launching mainnet and exactly four weeks after that data

farming turns on so to wrap up um I today was happy my pleasure to share predictor with you accountable accurate prediction feeds uh quick summary of what it is again it's crowdsourced predictions time series predictions globally distributed non-custodial built on the ocean stack privacy preserving via our friends at Oasis Oasis Sapphire predictors make money doing AIML and Traders make money by using the feeds so I encourage all of you to try it out go to predictor and give it a whirl and uh with that um yeah thank you once again for allowing me to share with you something I'm personally very excited about as well as the whole ocean core team ocean predictor thank

you thank you that was very exciting do we have some questions in the audience right yeah thank you OT for the presentation so I have two questions first uh the selling and buying the the information is done in Ocean token on or in any toking like ethereum die or anything else and the second question is about the trading Bo so uh this is onchain action right so who automates the onchain action for trading Bots yeah great questions so the first one um within uh so every prediction feed whether it's say Bitcoin usdt on binance

5 minutes or eth usdt cracken 60 Minutes whatever every single one of those is its own ocean data nft and data token so it's leveraging the ocean infrastructure so um and these follow erc20 all that right so it's very composable Etc and in fact um predictor itself you can view it as a new D5 primitive it's sort of like chain link style oracles but it's future oracles so um overall uh within that uh we have it set where you you do have to stake with ocean and then you're buying with ocean because uh we wanted to focus on the staking mechanic Etc so it is with ocean there uh to your second question um yes it is automated but these Bots uh we have uh within the readmes sort of to get going um you can run it locally where you have your

private key u we have in the readme to show how you run it on a Zer where you've got the private key key within a z but of course you can also use um any other infrastructure you want you know some of this emerging um agent infrastructure if the agents can handle private Keys Etc whatever you want right as far as predictor is concerned um you just buy the feed and do whatever you want with it right um so uh you you can yeah use it as a a defi primitive you can use it for trading you can make derivatives on top however you want yeah thank you thank you believe you had one right here and then right there after hello uh great talk um I'm curious how the Privacy aspects can affect the viability of the data so if I'm a Trader uh what

if I want to selectively choose a prediction if someone hasn't predicted or if they have predicted um and someone might be like a negative signal or malicious and so kind of how can we possibly like perceive the data that goes into the predictions if we want to act on that data before it actually goes on chain and like finalized yeah uh you can't I mean as a Trader you buy the feed and you get this aggregated prediction right um um as well as you can see how many ocean was pointing up versus down right um so there is the possibility that people might act maliciously and stake a lot but if they keep doing that they're going to lose money so people who are acting maliciously it would only be around for they won't last long um so overall there's an incentive to um uh have

accurate feeds right and the people who are accurate can stake a lot right they're and because they're not losing money they're making money all the time so there's a natural incentive towards accuracy over time but we can effect just like any crypto system there's going to be really interesting dynamics of people you know acting uh well trying to make money but sometimes maybe people wanting to to mess with the system and have bad bad accuracy one thing we've done to help understand this though as well is if you go to predictor doai we have a special column that shows the accuracy of the last 24 hours right so right now it actually is hovering around 50% because we've got a random bot running and we're going to turn on the AI bot um shortly here um so then you should see that it's going up to 52 to

60% depending on the feed um but overall we can also expect other interesting Dynamics such as you know lots of people buying the feed maybe they follow the naive strategy of buy and then um this price might Spike more right um or maybe they go the opposite direction anticipating that so we don't know for sure what's going to happen but we know it's going to be interesting we've got time for one more thanks TR uh is there a mechanism for against wash prediction like with two wallets myself it's a zero sum game so I don't lose but there is some ocean incentives on top uh well so watch prediction can't really happen right I mean if you're wrong you lose money uh you could actually predict both up and down and then it doesn't

really win you at all and you're going to lose a little a little bit on the um prediction fee right because there's a small fee to make the prediction so overall that's not going to serve you well um but overall this is Cil resistant naturally because it's got this staking element right so have a thousand wallets it doesn't matter all right thank you very much thank you everyone [Applause]