Building a Prediction Market: From Theory to Implementation (Presented at CTU Prague)

BuidlGuidl Talks · 4 Dec 2025 · 57:45

A presentation at CTU Prague on how blockchains turn collective belief into real-time probability forecasts. The speaker starts with a Polymarket demo of yes and no shares, traces the history from the Iowa markets to Polymarket, and covers the theory: efficient markets, wisdom of the crowds and Bayesian updating. They then explain building one, including token contracts, automated market makers (LMSR and fixed product), resolution through people or oracles, and the role AI agents may play.

Topics

From BuidlGuidl Talks, hosted by BuidlGuidl.

Transcript

Let's start with um the prediction markets  maybe first first of all who of you have used a prediction market before or already can  I see I see two hands three hands five five okay so maybe half half of the room all already  have touched the prediction market and tried it out a little bit yeah um maybe maybe up front  a um a quick experiment Let me jump in into it. When I would ask you kind of the question, will a  human set foot on Mars before 2035? That would be kind of my introductory question. Who who who  of you believes that? Please raise your hand.

One, two, three. Five again. Five. Five again.  And if I would now ask these kind of the people um how much money would they put behind each  of these raised hands and the other people who don't put up the hands would they  also vote for no who would vote for no and what would be the money you put behind  you you would put behind it would be a lot would be a little less what would  happen in your head would you do some more research about it or would  you just kind of yolo in the money.

I'll probably do my research for it. I don't know  if you can hear me. Yeah, I hear you. Yeah, I'll probably do my like research since like I have no  idea about the technological development on the bars. So where we stand with the like how far we  are from the landing to the Mars. So once I do my research, I'll probably put a lot of money for it.  right now just a little. Yeah, makes sense. And probably the more confident confident you would  get, the more money you would put in because you could maybe then make some money out of it. That's  kind of the whole thing about a prediction market more or less. We go in a detail in a little  bit how then the whole mechanisms about it worked. But in the end it's kind of a question  which kind of many people answer and behind each

answer they will put money and more confidence  they have the more money they would would put be be would put behind it but if there is no  money involved you would just raise your hand and would just give you a vote out with having  no consequences and I think that's kind of the idea behind a prediction market to get the wisdom  kind of the crowds with the and put money behind it in order to see okay what does a huge huge  amount ount of people or experts know about it. Yes. And what and that's why why that's kind  of the agenda I going to go through today the different different blocks we're touching. So  first of all I will go in introduction what are prediction markets go a little bit deeper now what  what we just recently touched with with the with

the with the example question then I dive a little  bit into theory but I don't want to get you bored about that. Then one one more important building  block is then the the the the third one that's kind of how you build prediction markets and what  are the different building blocks in there and then in the end I just want to give you a little  outlook how it could be and how prediction markets could be evolved in the future. Okay, let's come  in and don't forget to ask question if there are any questions in the room please. Okay, the the  the this first study and um and for that I would just quickly show you Poly Market how it looks  like. This is kind of the most for the the the most used platform right now built on crypto rails  is poly market out there and as you can see if you

go here into Poly Market it's loading. Do you  see my still my screen? I think yes it works. Um you can browse to all kind you see kind of  there are all kind of different questions asked is is it big enough? Yeah, it's good. We have a large  screen here. Yeah, this is kind of the the the platform everybody knows now in crypto and uses  for prediction markets. There are many more coming up but this is the most famous one. And as you can  see up here we have kind of all various various categories. We have politics, sports, finance. We  can go finance. We can have crypto, geopolitics, earnings, tech, culture, a ton of different stuff.  Oh, my my internet is very slow. Not the best here. Yes. And then you can and then then you can  really can just browse through and you see, okay,

all kind of different probabilities if an event  will occur to a certain certain certain date. And so you can really think about all kind  of different categories with all kind of different questions like a fed decision in  December and you could we can look into that and then we will see okay there's probably  that there is a 25 um bips uh decrease in December is highly likely and the crowd  gives it a 68 percentage um probability and how now does it exactly and how now does it  exactly um work like if you would give a if if you would give a vote onto that um here I got I  went with another question that's kind of which

company has the best AI model end of 2025 and  like we we will do it before like with the yes and the no question like like I asked in the room  if we now for instance we see okay it's a 77 cents cost you a yes share this is kind of you want to  build you you you want to bet on the outcome that um that Google has the best AI model at the end of  2025, you would pay 70.70 cents. What you can do now, you could w you could win when when this is  the case at the end of the year, you would get $1 back. So, you kind of make an upside of 23% cents  uh 20 23 cents. That's a roughly 30% on the money you put in. If you would bet against Google, you  only have to pay 24 cents for the share. But with

that, you would have a much bigger upside. But  you of course you would only put in the money on the no if you're sure that in any other company  will release soon another better model. Like if you would would imagine that maybe CH GBT has  maybe CHBT6 ready and they would release this at the end of the year and you're pretty sure  you're like an insider or whatever and then you could make a ton of money because you think okay  there's definitely be Gemini free that can just came out recently and that's kind of the the this  is this is kind of the core mechanics behind it. So you have always a question with a yes and  a no answer and you're going to bet onto that like a prediction market. I I I frame that you you  can imagine it is kind of a I mean like you saw

it's kind of a stock market but the difference  is I mean on on the stock market you also kind of trade always the future the the future of the  company. So there's never never never about now it's always about the future. what is the company  going to reach um in in in revenue in the future all this opium in the market like for Tesla and  so on and here with the with the with with the prediction markets it's kind of kind of similar  but you have really dedicated questions of future outcomes so it's really important to have future  outcomes in there and because people needs to be interested into that it's always kind of it has  some public interest so you wouldn't ask some random questions Nobody knows about it. Nobody  cares because nobody would would know anything

about it. It's always anything public interest  like elections, sports, could even be the weather or the animals or what what what we have seen in  these all these the these different categories. Um in a in a nutshell it's like really having an  end date. So the end date is very important here. So it's always have to be clear. So it needs to be  kind of a clear question. There are no questions about how to answer it when it kind of reaches  the certain point in the future. Then we having a binary market. So we can have yes and no. Is it  okay my voice? I hear myself. Is it okay? Does it come through? Yeah, perfectly. Okay. So we have  a we have a binary market. So we have yes and no questions. So even when we go into into poly  market you see always even here the 25th 20% of

a pips decrease here this is always a yes no so  they are kind of different all these questions have always yes and a no yes and a no yes yes  and a no so we have kind of always these binary structure it makes it much easier even put it on  blockchain you can have different ones but it gets very complicated to trade so this is kind of the  common state right now using always these binary and then kind of splitting these questions with  different answers so people can bet on them. And then one important and then a very important thing  here just going back to the full screen is that um like like you saw with the AI model question  there's always a winning share value. So in the end when a market resolve is it's over um you will  get a certain amount of money. In the case of a

polling market it's one USDC. So, one of these  tokens here, that's the yes and the no token will have in the end the the the value of one USC and  the other has zero USCC. And here's a very and in between it always trades between um one and 01.  But there's a really fundamental rule and this is important that the prices of these token together  there should never be more than one USDC because otherwise you can just you you can just um um  just going to um take all all the money out of the market because imagine you would get if you buy a  yes and a no token and um and and they would give you kind of more money than the one USDC would  always make money. So you're buying just both both

shares and you're just running away with the money  and in the end the whole market is going to lose. Prediction markets are actually out there for now  some longer time. There was one um there's there there's the university um um from Iowa and they  kind of started with electronic markets was back then called um for predicting the election and  let student predict on that and that was already 1988 and that was actually a great success because  it was kind of the first time they said okay that actually really works people not just raising  their hands and voting on it if they if you put some money incentive behind it you have actually  very good results coming out. That was kind of the first the first exploration in this field. And  then actually in 21 there was already coming a

big a big big prediction market coming out. It  was in the US and there was kind of for sports trading but it led bet all around the world. But  then the the authorities were against it and had to close it again. And then it was calm for some  time and then in 2015 with the rise of Ethereum and everything and and they saw okay the the  the programmability there was Konosis and augur coming out and they were building out the first  prediction market frameworks for the blockchain. But it took another couple of years actually to  2020 when polling market the example I showed you um got then really successful because the issue  in the beginning with Ethereum was it was so slow it was so expensive to do all the transactions  so it not really took traction and first when poly market launched on launched on polygon  that's kind of a side chain to ethereum then

it started to get traction more and more  people started trading on that whole thing there But right now to give you a quick overplay  overview there are two big players in the market. One is kind of the centralized mark market  player and the other one is the decentralized. This decentralized is the polling market market  more or less they are kind of valued now very big and everyone is waiting for an airdrop.  They have a valuation around 15 billion and on the other side is KCI who is also cooperating  now with um with um Robin Hood and they got a valuation just recently won 11 billion and raised  1 billion total funding. Don't know what they do with all that money but it's definitely  mean there's a lot of traction right now

in in the whole prediction market ecosystem  and more and more stuff gets built around it and there's always the question I get asked  many times what is the difference between a prediction market and a betting market and um  I mean a betting market is already out there for a very long time we have in UK I think  they're betting on everything. What dress is the queen wearing the next day and so on and  we have all these different where where can can bet bet bet bet bet bet bet bet bet bet  bet bet bet bet bet bet bet bet bet bet bet bet bet bet bet bet bet bet bet bet bet bet  bet bet bet bet bet bet bet bet bet on but the thing is that the big difference is with  this I think they they are kind of shaped for entertainment and profit and the objective of  that betting market is actually that the book

bookkeeper or the book maker makes money. So  why they create this market? Because they want to get money and I see prediction markets more  like the way that a prediction you want to get the information about what is what is what  becomes true in the future and you are also willing to pay experts for that. This is kind  this is kind of my differentiation. I I don't know if this makes sense yet for you or not.  You can just have a question. But you will see later how a prediction market is constructed  and what are kind of the the the the flaws into it. And there you will see okay if you  is not really set up or you don't ask the right people there's also a high chance that  a market creator can lose money in in in that okay and why and why is it good to build  prediction marks in general on the blockchain

I mean f first of all as you know now it's kind  of a decentralized settlement settlement you can just put out out the question and it just runs  it cannot taken down it's just it's just there you know it's very transparent and very variable  so nobody can tweak around the market kind of we also have the censorship resistant thing that  everybody everybody around the world can kind of trade onto onto it and there is just no one  taken out of the market so you can really gather all the experts around nobody needs kind of  a KYC in in that sense yeah and that's why it's it's and and all the whole I mean it's  not there but all the trading mechanism how you set it up and so on is definitely very good  tailor made for the for the for the blockchain.

Yeah. But what is kind of the the theory behind  these prediction market and why does it work? Um I mean in general how it works. You're  having kind of all these beliefs out there. So people believe into in into something or have  opinions, have informations about it and they're going to go and and they're going to see, okay,  these are kind of the prices. Now I think, okay, this price is pretty low and I can definitely  make a ton of money because I'm just smarter than anyone else and I have the information. So I going  to buy these token prices and these kind of token prices then lead that the these um probabilities  occur. And so it's kind of the flow. Okay, I'm smarter. I can make kind of money or using  that and out of that the crowd kind of aggregates

all these probabilities together and there are  three concepts kind of oh they can't come in a second behind it I I will go into it but I think  a very very very powerful tool is definitely these incentivized structures we having if you're having  I mean may maybe you felt it before in the little experiment we do if there is no money beh behind  it. Everyone just votes. It's just no skin in the game. It's nothing. But as soon as there  is money involved, people definitely will do better their homework and don't throw the money  away. Of course, we having kind of some hurting behavior and people will just chip in and they  have a gut feeling doing that. But as soon as there is bigger sums evolve or you want to play  the game, you do your homework, you're getting

information correct and then you just start  um participating in these kind of the markets. the the the the the the there are kind  of these three uh theoretical foundations behind it. One is kind of this efficient market  hypothesis. There's was there a question? No, not yet. Oh, okay. Let me know if something  is in unclear. I don't see you anymore. Can I Oh, no. So, I have a little bit of feeling what's  going on, but then I have to go look to the left.

Yeah. Um did and we have we have efficient  market wisdom of the crowns and business updating and they all kind of lead to it that  kind of prediction works. That's kind of the theory behind it. That's when when you want to  read some textbooks about it just in a nutshell. I mean that all comes also from um from finance.  We have the efficient market hypothesis and this more more or less means that nobody is smarter  than the market. So actually what that would mean is on the stock market all the prices are there  and you cannot be smarter than the stock market. So in the end what that the question no okay so  in the in the end and I mean you you you see that that kind of all information that are out there  already in baked into the asset prices. So even

if you see ridiculous valuations on the market,  they are kind of justified by the market and I mean and and this thing comes also from there that  any fund in the world or fund manager they really I mean it's pretty hard to beat just the normal  market and that's why you could have outliers but they all the time then coming back. I mean there  are some exceptions like Warren Buffett don't and so on that beat it but in the end you never be  better than that than the index and I mean there are there there there are some some some some  things that don't work in the in the short run that you have behavioral biases is minds hurting  you're jumping in you heard the new trend and then you have kind of the these these exaggeration  on the markets they lead to anomies to bubbles

or bubbles or crashes they could happens um  there could be market frictions in there and so on and so on But in the end this is kind of one  pillar behind prediction markets that kind of all informations get backed in into the asset prices  and so you will get have kind of the best best um probability projection for the future. And  then there is the the the other one I mentioned it before is kind of the wisdom of the ground and I I  I found it very funny or to read about it because um the more people you're having on certain topics  like there there there's a there there's a there's a m of or a class of jelly beans in there and  they let people just guess onto that how much is in there and the more people you're having  even you're having outliers they're guessing

oh that's five or the other one was that it's 5  million you will just end up when you when you average out everything or you take the median  out of it, you will come a pretty good guess on the number on on the number of jelly beans  in the jar without anyone knowing how much is in there. And this is just like because you're  taking many people with different diversity in there. They're kind of having independent guesses  on that and you you also then need to choose the right aggregation mechanisms and this is kind  somehow baked in into a prediction market as well. And the and the last one this is very very  theoretical I don't go into this into into this um into the theorem now exactly that was from base  sorry Philip there is a question could you go here this one sorry uh I do have a question I was  wondering because I heard about this experiment

with the jelly bean and what what I heard is that  if people can beforehand talk about or discuss it somehow the experiment doesn't work anymore. So  uh by talking together they create some bias and I was wondering if you are familiar with this uh  form of the experiment. What do you think because the poly market uh prediction markets are all  about discussion or like the discussion forms the price right so uh I don't know my question  is what is your opinion about this? I mean, you're totally right. I I should have This is  kind of the independence of the guesses. It's kind of like anchoring, huh? You're going into  a room and and and you're putting the number out

already and then everybody is kind of stuck  in this number and maybe you know when when when everybody already get a clue about it,  then everybody thinks around this number and so you need to keep them independent from each  other. So, you would just never let them talk to each other before. That's what you meant.  Thanks for Thanks. Thanks for adding that. And you're right with the with with the poly market.  Of course, you're getting kind of some some bias already because you seize the price numbers.  But I think because um there is money behind and you're trying to put effort into it to get  smarter than the people because you want to make money take money out of it. So you don't go with  the herd. So if I see if I if I see the guess is the best eye model is now from I mean now now it's  probably clear that in 2025 Google will win that.

But maybe beforehand it was like I would probably  do my research even more in getting smarter and trying to get an independent answer. But on  the other side, yes, of course, you kind of heard it away. But I think if you taking also  into account that everyone can participate from around the world in different groups, in different  bubbles, you're getting of course you have the price already, but you're having these different  more independent groups instead of just getting the expert from the MIT together and giving your  opinion about one uh one one question. But I mean, you're you're right. The more independent and you  probably if you would leave away the the the price and the probability would be probably better  if somebody would give a guess, but then it's just hard to bake in the the money incentive.  Does it make sense? So, it's just like yeah,

it's it's it's complicated, but you're you're 100%  right. Thank you very much. That's helpful. Thank you. Great question. Thank you. Yeah, very good  question. Any other question regarding this topic? Nope. Okay. So we kind of having this this this  efficient market hypothesis we having kind of the wisdom of the ground and the other one is like  of course when there is a new belief something new coming in the market some fundamental  information then this should then update of course the probability and this is kind of  what the the base terms kind of say says so new information leads to change but I mean that  that it's kind of um obvious in here. Yeah.

Um and because of these kind of things baked into  these prediction markets, it's kind of sad and um and studies have shown that that kind of  these the the these prediction markets that they produce better probabilities than kind of  experts around the world. But of course it needs to be the prediction market. There needs to be um  enough liquidity so enough people can be active on that and trade on that. If you don't have a lot of  people and you don't really get the right experts, it just doesn't work. Then you have also the issue  that you kind of of course I mean that insiders can dominate kind of the market who knows the most  can just force force the market and it comes also hand in hand these insider with manipulation risk  because when you're having a ton of money you can move the market and like we have seen like before  that this anchoring moment no I don't know I don't

know your name sorry for for the question but  yeah like he meant when you kind of can change the the price and therefore the probability  already and then you just tweak everything. Ah, Trump will win of course because I put a ton of  money and then everybody thinks that you kind of manipulate this prediction market as well. So  this is always things to keep in mind as well when when regarding prediction markets but in  general it works like evidence have kind of shown don't know which evidence this was exactly  but these prediction markets work just better than um normal normal expert opinions. Yeah, that's  kind of the the the theory about it. Now, I would go deep a little bit into  how to build a prediction market.

Maybe just a quick question in between. Is  it clear what a prediction market is? Did I get did I miss maybe the beginning? I don't  know. I'm I spend so much time thinking about it. So is if if there's anything unclear just  let me know before we going into into the the challenge build. No. Okay. Nice. All good  here. Thank you. Yeah. I just want to um I don't stay so much in the code because  I think that everyone of you can do then afterwards and but I just I mean I just opened it  quickly. I mean um in the in the in the challenge um we having kind of three parties in here.  It's kind of the the user who's going to

participate in the in the let me open quickly  cognto window to have another burner wallet. I hope you're all familiar  with scaffold e right now. doesn't open. Yeah, we having um we kind of having three parties in the prediction market  participating. That's kind of course the user who's who's kind of playing or  playing or betting or just giving her um the the the information into the market.  Then we having a liquidity provider. Where's my Then we having a liquidity provider. I don't know

why this doesn't work right now.  My NexJS doesn't want to load. Okay, then whatever it doesn't matter. So just  just briefly the user participating we have a liquidity provider because we need some money in  there you could take out and you can gamble on and also then provide the tokens and we have  the oracle the the and the oracle is kind of important to bring kind of the the resolution  on chain. So then the let's go back into here.

This is kind of from a user perspective or from  a from from from a but if you're looking at the at kind of the building blocks you need to pay  attention to when when you're building it you're having three important parts. It's kind of the  tokens and all the mechan mechanisms behind it. So how you can trade how you can um um provide  the liquidity. We're having the oracle which is very important but comes very short-handed in  here. It's it's actually a very easy concept but actually very complicated to realize and then  we having the whole whole around the trading the tokens. What kind of mechanism you're using?  Is this a automated market maker or is it even a order book like um like holding market has kind  of the core core components but now let's go

let's break them further down how our prediction  market is set um is set up. So first we have kind of the setup for the whole prediction market. So  what are kind of the core variables and the core instances we need in the beginning. Then we having  kind of the tokens and liquidity. We having the oracle trading mechanisms. And in the end I want  to just give you some final considerations how to build a prediction market then in production and  what are kind of the things you should focus on. So let's start with the with kind of the setup.  So for this for the setup um we need a kind of a liquid we need to define who kind of the liquidity  provider is. The liquidity provider is the person we will see that in a second who offers the money  in the beginning and and the money back then the

tokens. So when we when we want to buy a token  out of it and this cost in a in a probability of 50/50 we will we we we just say okay we put um  um is one the the winning value is one USDC like before in the example and we're saying okay one  token is 50 cents and the other token is 50 cents. So this kind of the start of the prediction mark  and we say it's a 50% probability. Then if and if you're taking out one token um and now the the  prediction result is to yes and you took out a yes token then someone needs to pay the yes token  holder one USDC out. So this this money needs to be there. It needs to be already for there. So  otherwise the person couldn't win anything and

that's where liquidity provider comes into play.  Then we have the oracle address. We need to say okay who is willing to report the result to us.  We have a question and to the question actually is is always that's a a tricky part in the end  because you need to define a question which is clearable answering and doesn't leave any room for  for leeway and also has kind of the fixed state baked into it and this is also the reason I mean  I was talking about permissionless and all in the blockchain and decentralized why poly market and  most of the and most of the prediction markets are just not um permissionless that everyone can put  their their question because it needs to be very created and make sure that this question also  can be answered. Then we need to define a kind

of initial token value for the winning token. So  in this sense like I said it's it's one one USDC could be also all everything. It could be ETH also  you could set up the prediction market with ETH. We kind of have an initial probability we need to  define in the beginning with that I mean like an example I said 50/50 sense that we have we have  50%. But maybe we we know already the outcome is more skewed in the one direction and we say okay  but actually um that that that humans will be on Mars 2035 because of the evidence we think rather  it's kind of more already in the range of the 80% and so we would let the market start with 80%. So  we have kind of 80 cents you need to pay for the yes token and 20 cents for the no token. Then in  here we kind of introducing a token percentage to

lock. That means we that's kind of I explain in  a second to that and then we need to be able to track collateral inside the contract and also  we want to kind of occur some trading revenue for the liquidity provider or for the market  creator and what is very important is kind of the fixed end date because you want to know when  your market resolves because there needs to be an end date. we want to get um response for  a future end date. But in in this challenge, you will see if you do the challenge, we kind of  it's a it's it's it's not in there. So, we left it out because it's just easier to test the whole  thing and just to build it. So, this is kind of the setup. And when you have kind of the setup in  place, you can starting implementing. And first,

we're going to look at the tokens for the for for  the tokens. Um, we just we're just deploying an ESC20 contract here. So, two contracts for both of  these tokens. I mean, there are there are better ways you can use an EC155. Sorry for throwing all  around these numbers. That means kind of you have one contract that can holds inside. So, you don't  need to create a new contract. Different tokens inside and you could just use that, but this is  this is a more complicated and I would just you use the easiest one in here. And in the beginning  of the deployment when you're putting out your contract, you kind of need to define how many yes  and no tokens should be there. So for instance, we're taking in one ETH and we're saying okay  now our collateral is the one E and we define

okay initial token value. This is kind of the  the the winning token value I would say when when when the market resolves to yes how much  then yes would get would be 01 for instance. Then we would know okay we would mint 100 token  each. So we would have 100 yes and 100 no token. And when we have that we can also then calculate  kind of the probability like how it is done. And um because we um like I said we want to kind  of lock tokens away because in the beginning of a market if you imagine there is nothing nothing  really locked away and you would just make a one trade one trade you're buying out one token  it would distort the whole probability. So

you would get these spikes. So if there is 100  yes token 100 no token you're taking one yes out then you think okay the whole market now  bets on um yes. So the probability that yes of course is 100 and this is just not and then  anyone someone else will buy a no token it would just kind of distort the whole market. That's why  it's a good thing to lock away in the beginning some tokens from the liquidity provider so  you have better smoothing smoother trading. This makes sense. And also with the locking away of the token,  you can define the starting probability. And this is this I should I just put it here.  When we mint away, we we put 100 token away

each. We want to have a starting probability of  60%. Then we just going to lock away 12 tokens um of the yes and a token of the no. And  then we having in the beginning when we taking the relation to each other we count  out we having kind of the 60 60% in there. But just keep in mind this is only because  like the the calculation is done right now that we just always taking the the amount of  the tokens and relatively we take the full amount and that's how we can calculate  the the percentage for for each sides. Does this make sense or does it not  make sense? Maybe I need to come.

I guess it it does make sense. Okay, perfect.  No questions here. So, okay, perfect. So, this is kind of the liquid the liquidity side.  So, when when we doing this, we having we we set up we set up all our our stuff. Now,  we having kind of our tokens in place. So, someone now can trade later. But first of all, we  need to make sure that we have an oracle because you always want to have someone to report what is  the exam what is what what is the result and that needs to be um kind of defined when you're setting  up the market. So to the question who will be on um if there will be human on Mars by 20 2035 we  need to define already when we setting up okay who is responsible to report the outcome when  it's done and is this really a reliable source

and that needs kind of a trusted source because if  it's just a a source I could just bet everything on no even if it's yes and then I just rock the  whole market and you don't want to have that and that's where oracles come in play and actually  an oracle is very simple because Ethereum like like in a nutshell the concept. So, Ethereum is  kind of completely closed system as you as you probably know already. So, there there has no  there's no real connection to the real world to keep it very safe and no APIs anything. It's  just this whole with the nodes network. It's completely separated out. It's it just is running  running machine. And but for for this question the prediction markets we need to get some some  input from the real world. How does Ethereum

know if a man was on the Mars or not? And and  therefore we we need to report that and in the end an oracle is just a really a write function  that sends call data into the into the blockchain and stores in a variable and that's actually just  an oracle. That's that's what an oracle do does. But the thing is like I said, how do we make sure  this is a good oracle and this reports really the outcome and therefore we kind of came up with  different oracle types and different functions. So you want I mean the most easiest maybe maybe just  stay in here first. The mo the most easiest thing okay we just choose a very very trustful person  that has no bad bad behavior plan or whatever.

is very centralized and this one then writes the  the um the the report into into the blockchain but I mean that doesn't work and I wouldn't trust on  that if I would put a lot of money in it. So then you can think okay maybe we grouping more people  maybe we having even a multi-IG and the multisig then they need to sign I don't know 10 people and  they're going to sign it but it's still very weak the assumption and then there there there  the other things you can think of a oracle network where then everyone everyone around the  world takes part they're going to have a kind of incentivized in there they take a stake and then  they get slashed when they kind of um reporting that comparison to all the other networks. So you  incentivize the whole thing and you can think that

further and further and I think a good example for  that is chain link. They kind of run a completely decentralized oracle network that's their dawn  where they have many many many networks around the world and they are reporting prices into into  Ethereum and if you're an outlier you get kind of slashed but it's also not the best because chain  link also cates the whole thing. So just here just that's a little nutshell this definitely this  oracle part is definitely not a good solve thing and there is still in my opinion a lot thing to  improve for the future of blockchains in general and we having kind of three oracles here so and  that's what we kind of would use for a prediction market is kind of a optimistic oracle because it's  just a open-ended questions more or less they're

really hard to get there's no clear IPI don't know  which API I would take now for having um um human on Mars by 2035. So therefore you would you would  create an optimistic oracle and that works like an optimistic layer two more or less people can  kind of post their answer and it would be led in the beginning if no one disputes it. As soon as  someone disputes it they have to make the groove then there's again a centralized authority. You  see there's again a centralized authority and then this person kind of gets slashed with the money  put behind the answer and the other person who kind of disputed it with the correct answer would  then get his money and so you let everyone post all the time and if there is really a fraudster  it gets slashed and the correct answer would put

on on chain. Then the other type of or and that  one kind of we would use because it's like but but on the other side we have also price oracles  out there and the price oracles are used for all kind of D5 stuff where you need prices all the  time like for an A and all these kind of landing borrowing protocols you always need direct prices  and there comes for instance the oracle network from chaining into game so many people reporting  the prices and then what's the medium is taken and put on chain that's kind of what they what they're  going to do and then we have also like this kind of this expert thing in very weird and  subjective question you would really then use human oracles and I just call it okay this like  like the example with a trusted person who sits in

front of the computer and just gives their opinion  and puts it in that's kind of the kind of the three types of oracle for us it's the optimistic  oracle and how how it's in the challenge done there's just one right function and you call it  like it's kind of a human oracle more or less Yeah, that's it to to oracles. So when we have the  tokens and the oracles, we can report the answer. Now we can kind of start of trading in there. And  the trading implementation for this one, I just wanted to show you and then maybe how how it's  correctly done is kind of very linear like you can see I just put here kind of the um the the the  distribution if there would be kind of yes sold tokens and and what the price would look like. So  it's very linear if you would buy 5050 50 we have

five um five.5 cents in here or a.5 E because the  winning token value in our in in the challenge is with Eve instead of USDC and it's very it's going  very linear the p the price functionality the big issue and I don't go into here is um that is that  it's very easy to implement like it's done in the challenge but it's actually not the best because  um you're having all kind of distortions in here. And one funny distortion when when you're doing  is that because we you you always calculate the the the average price in there. If you do a  big trade, if you um if if you do a big trade, this means you buy a lot of token, that trade  is cheaper than um yeah, this this one is more

expensive than you would do with smaller trades.  That's just because the average you take a bigger average and a smaller average and this is not a  good thing. So therefore um I would recommend um to go to other pricings models and there are two  pricings model out there. There's one there's the logarithmic marking market scoring rule and this  is a little bit more complicated like you see here and this kind of has the advantage that there's  kind of infinite liquidity so you can trade all the time in and out but you need some subsidy.  You need some trusted party in it who comes up with money in case there is money needed to kind  of fund the market. And that has definitely a big potential of rack the pool and rack the protocol.  That's why it's not so commonly used and it's also

because you you see the formula here. It's  very complicated to make in solidity or not complicated but it's very gas inefficient and  very expensive to do and that's why most of the people more go here with the fixed product market  maker and maybe you know that from the decks like unis swap and um this is just this this this um  this simple bonding curve but the downside here is you always need this liquidity providers who  putting money up in front in our example like I when we going to put into the we're going to put  into the market one ETH and we're going to mint against that 100 tokens. If these tokens get  traded out and everybody I hold now 100 token Lubos holds the other 100 no token for instance  then there is no liquidity anymore to trade.

What needs to be happen that there's someone the  liquidity provider injects more liquidity into the pool. So puts another ETH and mints another  100 100 tokens and how the concept works I don't know I I just go into it a little bit and I think  that's pretty cool and that was definitely one of the very moments which I like the most when I  were discovering all the different concepts is pretty cool is this AMA this fixed product market  maker concept that means um you you have a pool and I just going to use here the pears and the  and the apples and they sitting there in the pool and on the other side you're having users.  And if a user now trades in and out of that one, he takes a pair out or he puts a apple in. So he  puts an apple in and therefore he's then allowed

to take a pair out. But then in the market you  have four apples and you have only two pairs left. That means that the price of the pairs goes up  because it always here has stays on the curve. And now if you imagine you're taking out again another  pair because someone puts another apple then the price even changes more and that's kind of leads  other people to to see that and say oh nice pears are so expensive I have a ton of pers now let  me put them in a pool and take out some apples because they got very cheap and I think they are  too cheap. And this is kind of how this market works in unis swap. But you can also use this  kind of the same concept in predicting kind of the price with the with the um with the yes and the no  tokens. But you always need to keep in mind that

you have keep the that is never can be more than  the one USDC otherwise you just rack yourself. Yes. And this is kind of the the the commonly most  thing also from ping market because it's cheaper on chain. It kind of has a decentralized liquidity  approach. So everyone can kind of participate it. If you have these other other model, this  logarithmic one, it's kind of more centralized because you have one party you rely on. I mean,  it's very feminine battle test. Everyone knows it in the in the DeFi in the in the onchain space.  It's very predictable what the price does in the LMS air and this logarithmic one. It just can  spike a lot and it's very hard to calculate.

And here just more simpler to see and  it's kind of I mean that's probably the the last point is very it's it's simple to  implement and everybody knows how how it works and the kind of the the the final considerations  to building this and this is what I want to go back to the beginning is like what I said  with the differences of the betting against a prediction market and I don't and I wouldn't  see like py market really as a real prediction market. For me, this all goes more into the  betting and also culty. It's just like, okay, you're betting on sports event, you're bidding  on the most most events and it's kind of where they trimmed and you see all these valuations  where they going. I mean, they're all they're all

trimmed to make a ton of money just bringing this  this this betting market in onto blockchain just making a ton of money. But if you and that's why  the whole markets of poly market are also created in ki. So you cannot create just a market out  of there because it bears a risk and the risk is um is explained here a little bit because  if you don't pay attention I just give um I just give an example again. So we having just  one yes and one no token again and we're putting in one ETH. So each of these token would be with  a 50% probability would be 50 uh 0.5 E and 0.5 E and when now only one person participates and  buys the yes token for.5 E and now the market resolves to yes I as a liquidity provider have to  pay him one E out. So I would lose.5 E when I'm

doing this. And if you [ __ ] that even more up  and you're starting with some skewed probabilities in the beginning, you just put the the yes to 10%  and the no to 90% kind of and you start and then the market resolves to yes and you have only one  person trading it. You're going to you need to pay this person then.9 E because you only paid it for  0.1 E. You paid for for the yes token. And this is definitely something to keep in mind. And this  is also one of the main reasons why you don't have out there permissionless market because anyone  needs to be upfront coming in with to liquidity.

But I think this is exactly the core and what it  should be is that these prediction markets are kind of truth seeking markets. So you're willing  like a prediction market creator or a market creator in there. I put out a question and I want  to have people betting on it or blame or put their information into prices and I'm willing to pay  for for this in order to get kind of a probability outcome I want to use for something else. And  this is I think the difference in my opinion or for me the difference between betting and um and  and a prediction market. And the other thing I already mentioned is really about the question  because when you're thinking I'm I'm trying to build a kind of a predictionless a trustless  permissionless prediction market. It's really

hard to to to make people then create the right  question because first you need to have the right question. This question was clear and precise  and has a fixed end date. There is nothing no one can debate about it. This is the one thing and  that's that that's already hard to get. And the other thing is then finding the right oracle who  can answers that and who is trusted. So there's just no disputes on it. So this is a a very very  difficult task to tackle when you're going there down you want to build a predictive market and so  it should be permissionless and so on. Then how do you bring users or creators of the markets that  they create the question and how do you then make them find an oracle that can reports that if this  makes sense this is definitely a thing is a not a

big knot in my head building these prediction  markets really predictionless that there is no one interacting so you as a user or you can  go there you're going to post your question people can bet on it and then at some point it  resolves with the right result from an oracle Yeah, this is definitely some things if you if  you're more interested going into the prediction market route, a thing to wrap the head around and  build something cool with it. And I would be happy if someone come come up with a good idea and would  like to support me. Yeah, this is in a nutshell building the the prediction market. I wanted  to highlight the most important things. I think when you're going through the challenge, I mean  everything is more described as well. You you will see even more. Let me know if I just go should go  to the code or not. But I think everyone can do

that better. I I don't know how how you're feeling  about this. I don't think it's necessary to go through the code. Yeah, we show something. Okay. I  I have a question related to liquidity providers. Are they profitable today or are they losing? Um  they're making money. So um I haven't mentioned that and I forgot is like poly market for instance  they they're using a market maker concept. So they have um they have an order book and they paying  market makers to run that and they're taking a spread out of it. So every trade they're going  to make some make some money and poly market is definitely very cautious about the markets. So  they don't they they do a lot of research before

before they're putting out the market. there's  just a random randomly created most of the markets or it's kind of sponsored by by by by someone but  most of the time and these market makers making money. Poly market itself doesn't make money  right now. So they're paying all these these fees they going to create in the spreads going  to the market makers. Okay, thank you. So how will eventually poly market uh profit from this?  What what is their goal if they are not profitable right now? I mean they can turn whenever they want  a fee switch. Okay. So they can start I mean there there's already a spread in there. So they can  also take a spread for themselves or they can just be the market maker himself as well itself is but  I but but I don't have a lot of insights how they

really do business and what is their revenue  streams. So I cannot tell you exactly. This is just what I what I read that the market makers  right now make the money and body market operates for uh for free but they got a lot of funding so  we see is paying them. I think they raised another two billion on that. Yeah. Thanks. Are there any  questions so far? I guess so. So you can continue. Yes. And this is kind of the the thing what  I find very interesting and where I want to definitely dedicate more or my future time into  it is the whole thing with the agents. I mean everybody is speaking about what is the impact on  these agent on prediction markets and if you see

this questions for instance will will a crisper  bay therapy for the chain musc phase three trials before Q3 2026. I mean there is no one out there  in the room probably I don't who can probably answer that and has the the information to it  and yeah I mean this is this is kind of an issue because we were kind of talking about okay if you  going to poly market it just is all these public events everybody is kind of interesting in but  there's not these niche niche questions actually you want to get in information for it because  for for this question to get answers you need expert in the field they very hard to get and if  they if they would dedicate their time to solving this question or answering this question you  probably need to pay them a lot of money if you

even get them. So this is kind of a our thing out  there and the question is how could how could it be that these kind of questions can be answered in  the future and I mean we having all these limiting factors for for us humans we having the attention  where we dedicate the time on even if you get an expert in for for this question is he dedicating  time on this or is he maybe rathering rather do doing something else exploring something else  then um the focus and the complexity is really really hard to get. I mean I cannot I have no  idea in this area. I cannot work on that and if I should really focus on that I'm not sure maybe  I'm I'm better in in different topics. And then it's the whole emotional influence. I mean we have  seen this with the jelly beans and the question

that get asked. So you can kind of getting this  hurting behavior in there and you you're driving people in the one direction and and creating these  bubbles and stuff but you want to get real answers out and real information. Yeah. And this is kind  of the the the the time where agents could come into play because I mean agents if you if you  think of them like invidiums participating in the in the in the whole ecosystem out there, they  also want to make some money to to earn something and it could be a good way for them collecting  all information in special in special areas all together consolidate and participate in these  in these in these prediction markets. And if I want to know the answer, I'm willing to get the  money out even even if I lose on that in a little

bit and I can just put a little ton of money in  there just just a tiny bit because these agents don't need so much money. They don't need to pay  rent. They don't need to pay whatever. They just want to want to live and make some money out  of there. And that could happen that there are many agents just participating in these prediction  markets. And that kind of would lead then kind of a Google of forecasting. So we can ask all kind of  future question in there. It will take some time and an agent with the information around their  specialized agent participating in the markets can spend so much time as they want 24/7 on it and  that could then lead to answering all these future questions and then we would have real prediction  markets that kind of are really giving me um information about the future and that's what  I'm really curious if this would work out. I'm

not pretty sure yet. The question is where I would  get these these agents the real information from it. Especially to the first question I asked.  They need probably very internal information of a company but they are not public. They are kind  of private information. Would there be a leak in there or how would they know it? Maybe they have  information around but this this could be a cool way and I would like to see a platform where  I can just ask this question and get just get my tailor made answers to the questions out  of it willing to pay maybe 10 bucks or so. Yeah. And that's kind of the the the overview from  the prediction markets. Um yeah, from from my side and of course I would like I  would would like to see you

doing the challenge and if there's any  feedback or you would change something or do something else or you have  other ideas, please let me know.

Related talks