Philip Krause I Beginner's Track, Prediction Markets I ETHGlobal Prague 2025
ETHGlobal·Thu, Oct 9, 2025, 12:00 AM
Philip Krause explores prediction markets in this ETHGlobal Prague 2025 workshop, covering their role as decentralized forecasting tools for elections, sports, and more. Learn how binary markets (yes/no shares) work, the importance of liquidity pools and oracles, and see a live demo of an on-chain prediction market built with Scaffold-ETH. Discover how AI agents could revolutionize forecasting and tackle challenges like incentive alignment for niche markets. Perfect for developers interested in DeFi, decentralized governance, and futuristic applications of blockchain technology. 00:00 - Introduction to Prediction Markets & Real-World Use Cases 00:43 - How Binary Markets Work: Yes/No Shares & $1 Rule 02:22 - Key Components: Tokens (ERC20/1155) & Trading Mechanisms 04:20 - Order Books vs. AMMs for Prediction Market Liquidity 05:41 - Oracle Challenges: Bringing Real-World Data On-Chain 07:37 - Scaffold-ETH Demo: Setting Up a Prediction Market 09:44 - Roles: Users, Liquidity Providers & Oracles 10:53 - Liquidity Pools: Minting Tokens & Starting Probabilities 13:16 - Dynamic Probability Adjustments & Locked Tokens 15:28 - Monetization Models: Fees, Incentives & Revenue Pools 17:23 - Live Trading Demo: Buying/Selling Shares 19:18 - Reporting Outcomes & Resolving Markets 21:22 - Advanced Concepts: Conditional Tokens & Multi-Outcome Markets 22:29 - AI Agents & the Future of Decentralized Forecasting 25:11 - Q&A: Legal Considerations & Stock Market Integration _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 🇨🇿 *ETHGlobal Prague* This workshop is specifically for ETHGlobal Prague, a 3-day hackathon held May 30 - June 1 2025, bringing together the most skilled web3 developers, designers and product builders from all around the globe for a weekend-long adventure to advance the Ethereum ecosystem! Watch the full ETHGlobal Prague 2025 playlist here: https://youtube.com/playlist?list=PLXzKMXK2aHh5Vv-ZobDU2YMWekDFYvOqd&si=SoQ5O2TOAK8RkYf- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ✅ *Follow Buidl Guidl* Website: https://buidlguidl.com/ ✅ *Follow ETHGlobal* X: https://x.com/ETHGlobal Warpcast: https://warpcast.com/ethglobal Website: https://ethglobal.com YouTube: https://www.youtube.com/c/ETHGlobal _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _Are you interested in Ethereum development and entrepreneurship?_ 👉 Sign up for the next ETHGlobal event: https://ethglobal.com/events 🎁 Get exclusive access and perks with ETHGlobal Plus! https://ethglobal.com/plus 📣 Want us to throw an event in your city? Tell us where! https://ethglobal.com/city _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Transcript
[Music] Thanks for being here. I'm I'm Philip like Austin said and I going to try to introduce to you prediction markets. It's probably I don't know one of the biggest onchain applications so far we have. I mean we have stable coins, we have landing boring but we have also prediction markets and they are out since blockchains are there. So people were tinkering with it around a lot.
Whom a few have already used the prediction market. Yeah actually I mean there were a ton of people using it for the part presidential election last year. I mean just on one on the one bat for um for Trump versus versus Harris there was $3.3 billion betted on the outcome. So it's quite a lot and that's just hold in a little smart contract.
You can imagine that's all the money in there and people were betting what they kind of do. I mean a a prediction market in the end is like a I would say like a stock or I imagine that kind of a stock market where you don't trade shares but you can trade the outcomes of future events. So whatever you want to know, whatever question is and has an end date in the future, you can ask for for for the outcome and people can bet on that and it can be used for all kind of um events like sports bets, like elections, like even the weather or what or whatever you can imagine. But one important thing is definitely needs public attention. So who's going to try to bet on things that don't you don't care about it?
That's kind of all this shaped around in poly market. So, pres presidential X some nice football games and so on. But how does it actually work? And I I would now use this um example for for poly market where we have kind of this this one question with an fixed end date and you have the two outcomes. So you have yes and no.
That's kind of the the the only ones and um you start a prediction market. It kind of um you define what is one of these chefs worth. So like Austin said at the beginning it's kind of a meme coin. So you decide okay one of these shares when it wins it's worth $1 like in poly market. So that's and um the the other one when it loses is zero dollar but in between before we find the outcome it's kind of fluctuating.
So if you if if you think okay in the beginning you don't know what the outcome is. So you can buy one share for 50 cent and the other share for for the other 50 cents. But both together are kind of making up for $1. And that's actually one of the important things I want to give to you. It's kind of this fundamental rule.
So all of these both chains, they always in between have to be $1 because imagine if um if you can buy a yes share for 40 cents and you can buy a no share for 40 cents as well, you just both will would buy both shares that cost you 80 cents and when when when the outcome is whatever you're going to make always 20 cents. So that would completely up the whole prediction market. So that's a very important rule if you want to build a prediction market that you really have to stick to that and the the interesting thing what it what it does a prediction market or for me is like there are some people they have kind of informations some kind of informations or opinions out there and they're using these and they see some prices in a prediction market they're putting their meaning in there and these then move the prices because if more people buy for instance a yes share if the weather will be tomorrow good and people buy yes then price because there is more demand goes up and kind of so the these opinions and what you think they drive the price and that on the other side then shows the probability people use. So it's kind of this flow from some random opinions, ideas or you have some material information you turn it into prices and out of there comes the probabilities and that's kind of in nutshell how a how kind of prediction market works out there just a basic concept and if we look a little bit further like now in from a building context what are kind of the important components we have in there and that's actually free as well. So one thing of course we need a token.
So people need to trade the outcome somehow and therefore you can have just easy contracts like or easy standards like an EC20 token or you just go all the way up to ESC 11155 where kind of EC the tokens will bundle in one contract so you don't have to create more contracts and so on. That's one important part the tokens of course but then also the mechanics how you going to trade the tokens. So how do you make sure that people can trade um wi with each other the tokens? Therefore, you need some kind of trading mechanism. So, if you just consider a normal a normal betting market where you go and just bet on the soccer team that's going to win normally, you cannot trade in between.
But that's kind of the special feature or the special thing about a prediction market, you can always sell the shares. So, if you think, okay, now um your your team scored, I don't know, a good goal and the prices go up and you think, okay, maybe they're going to lose because I know this guy now has no energy anymore. We need to take him out. You can just sell this sell your share. But it's not normally not possible in a normal betting market.
That's gives them the definitely a big advantage about the normal ones. But this trading is definitely difficult because you always have to deal how how do you match the people and um if you look at poly market they have a kind of an order book like maybe you know from normal exchanges but the thing is with order books it's very complicated to implement so you cannot do everything onchain. So you have to do it offchain as well and you need to have a matching lo logic and the thing is always with a order book or you need always another person to sell to. So if I want to sell my share I don't know to to Carlos he needs he needs to want to buy it. If he doesn't want to buy it I cannot sell it.
So you always need this this this matching pair. But there are also other forms like an AMM similar to the DEX part where you kind of separate. So you have kind of a liquidity providers and then you have kind of the users or the people they they want to buy shares of and that's kind of separate. So you don't the good thing is you just don't know who you're selling the shares to. So everybody can just trade in and out and that makes it very easy but it also makes it difficult in a sense how to set it up but because how do you make hold in liquidity providers who going to go into that because imagine I just give a little example like we're going with the $1 example before um imagine we we we put up a share and there the two shares and you can buy one for 50 cent.
If you then if you then just um sell one share for 50 cent and the person wins, he gets $1, but you only got 50 cents from him. So you as a liquidity provider, you need to make sure that you don't occur a big loss of it because otherwise you're just paying the people and they and they just get the money and you making you're making no money and that's kind of all kind of components you need considering building a prediction market in there. And there is another very important component that's the oracles. I mean Kevin mentioned it before. I mean I we don't go so much deep into this in this part because it's completely different challenge but it's very but it's very very important because we need somehow to make sure bring offchain real world events onchain and since the the the complete blockchain is kind of separated itself and cannot communicate with the with with the outer world we need to somehow sure to bring the data on chain.
I mean it's very easy actually in Oracle basically it's just a write function. So you just you take some call data, you call a function to write it on the blockchain and then you have the data onchain. But how do you make sure that not everybody can do that? How do you make sure that's the right data and so on and so on. So it gets very complicated where you have all these different um um companies out there like chain link.
I mean they do the amazing job with the oracle network. You have optimistic oracles where you just born some money. So if you don't just don't tell the truth, you lose the money. So you make sure that people bring the real data um onchain and so on and so on. So as you can see if you go deeper into the material prediction market I mean you see ah okay it's just like you can buy yes and no shares it's actually very big what's what's in the what what's what's be behind it in the background what's what's going to happen and that's why we kind of built the challenge in speed to bring it to you and give you kind of the basic concepts so then you can come from there and see okay what else can come there and that's for I want to show you I want to dig a little bit into the into the challenge this time it's just like similar to Kevin.
I don't want to go deep into code. It's more like the basic concept what what we consider and what you will find in there and then in the end I just give you a little bit outlook what I think where my um prediction mark is going going to head to because it's actually very very interesting as well. So let's go. I mean everything I mean you have seen this now a couple of times. I mean that's got scaffold if you're using here as well.
So we're going to start the the local blockchain. We're going to start the front end. And then of course we need to deploy here. I already used the full code like one one solution I have written. I mean you would get as a in a in a challenge like Thomas did the empty functions and your task is it to implement all the functions so that in the end the whole front end works but the front end is already given by us.
So let's go to the yeah I mean before we talking about the three components I mean it is also like in a prediction market you have kind three of part three parties who are participating in the whole thing I mean of course you have the users that's probably your main your main thing but then you have also the liquidity providers or the market owners who um who facilitate the whole trade or the whole the whole prediction market and you have an oracle you can see that up here. So we have these the these different these three different um um people who going to participate in it. So if you if you go to a user and what I forgot to mention I mean we integrated or we we just instead of asking some electional um question or whatever we just came with a car race and that's just like randomly which car is going to win and you're betting on this in the whole in in the whole challenge but yeah but as I said we we have users they going to um they're going to trade tokens then we have the liquidity provider the liquidity provider make make sure that there is enough tokens and people can trade on it and the whole the whole tray gets facilitated and then we have an oracle on the other side which is kind of in this case a right function who makes sure the right um the the right outcome comes on chain that's kind of the thing so let's step a little bit into the liquidity provider like we said with poly market each winning share is one USDC in here we're having um 01 E so we're using just complete leaf in this case so whenever you have a token that wins, you will get in the end 0.01 E. That's that's your winning.
Um then the uh the liquidity provider when when he kind of starts up a new prediction market decides how much liquidity and how many tokens should get minted. In this case, we're going to here you see it is kind of the prediction collateral. You need to think about it. We going to put one ETH in. And this one if means with the price of the token value that we're going to create 100 tokens each of both sides.
So as you can see here we have the yes token then we have the no tokens and both of these are 100 in this case. Yes. This one is a binary prediction market. I forgot to mention that. So we have we're having yes and no two tokens.
I mean it can be more. No, there can be as many users. So the whole room could be could be a user the Yeah. The liquid. Mhm.
the price I mean depending on the the token that get bought. So I I don't know if I get the question correctly. So if you if if for instance you um there are there I don't know to 10 people buying each one token of yes and then there is one person that buys just 20 token of no. Yeah, kind of. Yeah.
So, we're having in the beginning when it when when the prediction market spins up, we're saying we have 100 tokens each of both sides and now people can trade out. The thing is it's just a certain supply there. So, if this 100 tokens get sold out, there is no token anymore. But the liquidity provider has the has a chance to put more ETH in and create more tokens with it. That's the whole thing.
So you always need to make sure if there is a lot demand on the prediction market, you're going to put in more ETH creating more tokens so people can trade for it. Yes. And then and then people can just trade whenever they want. So if there are token there and you want to buy a token, you don't need to have a counterparty. just take it out of this kind of this pool where these tokens where the where these tokens sitting in.
And then we have also like like a thing. Here you can see we locked away in the beginning a couple of tokens because the we we calculate the pro probability like how many tokens of each side got bought. If you would have only one one token bought out and you would have no lock tokens away, your probability would be immediately 100%. because it would go all of one side. So you can think this is also a mechanism that needs to be implemented.
How you going to do this? Is it kind of floating? Is it fixed? You going to adapt this? There are many there there many ways to play around with that.
In this case, we're going to use 10 tokens of both um going to locked away. And another thing that's also possible because we we going to start like here with the with the 50%. So we're saying we're locking both sides away. But you can also say ah I'm I'm pretty sure the red car is much faster than the green car and it probably most of the cases it will win. You can define in the beginning as a liquidity provider that you set it to 90 to 10%.
So that you know if the probabilities are higher that the one thing wins that you don't lose so much money like I explained before that you're already up there in the in the mids and then other people can bet on the other side. So you have also this as a a prediction market created the probability uh the the opportunity to define the starting probability and that's and yeah and we lock the tokens away but of course if you're locking more tokens away in the beginning then you have less price fluctuate um fluctuation but it means also less liquidity so you also need to put more liquidity in. So there there there really many different things you need to consider when when setting up this tok um this this this whole prediction market. Um yeah you can you can think about different things. So first of all I mean um a prediction market you can think of it I have a question and I want to get it answered.
there could be one one way to go and you say but I'm also willing to pay for that outcome. So you have a really difficult question you're targeting a special audience they have the knowledge and you're willing to put money in and they get incentivized to give you the information and you're paying for it. That would be one option. So you definitely just pay for the information. Another thing what you can do what is not implemented that you're taking on each of these trading fees you're just taking a little percentage and you're getting and you're getting um you're getting money back.
And then another thing if you imagine I mean that's just one question we put in here but if you're looking at poly market they have many questions in there and it's also the case if there is a there there is a market and the outcome is completely different. So all the people jump into yes and they're paying you the money. So if if you're going back to one USDC and it's n it's and it's it's 90 90% for instance and they're buying this side and you get as a liquidity provider 90 cents as well and you're collecting more and more because they're trading there and then you're making in the end because you're holding a lot bunch of no tokens but they all give you kind of access to this prediction market collateral what kind of I see also as the winning pot that's in there that gets out you get then all the money out there but people but people increased here the the revenue in this side because when whenever you buy a token that will go into the revenue pot. So you have kind of these two pots. So you have the the the winning pot that will get to the tokens in the end and the liquidity p whenever you buy in between a token that goes into this LP revenue pot kind of thing in there.
So these are kind of the things you you can consider and I mean and user can make money that they have the right the the the right outcome or they trade it in between. That's kind of the two the the the two option you can play with. So I mean what what we can do now we can just I mean that's kind of the the the the liquidity provider but we can go now to to the user and we can just decide okay let's let's bet I mean the red car won the the the green car won the race before. So maybe let's start it now. And now we betting I don't know maybe the this time the red car is going to is going to win.
So will the green car win the race? And we say no. So we're going to buy a no token on this sense and we say okay we're going to buy I don't know five five tokens on this side and as you can see we immediately then changing the probability here as well. So we're buying five tokens on this side. Now I think I need some I need some funds here.
Why is it not working? Okay, I just want to get a just want to get a burner wallet. That's maybe easier. Let's have this one. Okay, but I mean this the the my my my address before bought five of five five of these tokens.
So, and that's why now the the probability on this side goes went down. So, we bought five tokens of the of kind of betting on the on the red car and it it actually won. And so, now we change the probability to 40%. That's kind of the that's kind of how how it works. And now in between, if I don't believe in it anymore, I could just sell it during the race.
But we just use the race here because if you put there some fixed end date and very long, I mean, you have to wait and it's a little bit boring to watch. So, the cheat just can can play play around with it. And now if we would go to the liquidity provider and we say okay it says here not a liquidity provider. I think that's the that's the thing because I deployed with the first Envil account in here or the first hardhead account. So let's get this one and connect it with Metam Mask.
So now we're kind of liquidity provider and we could also say okay let's put another E in there. So we're going to put another And as you can see as I minted now put one E. It's it's the same ratio. Now we have 200 tokens in there. And now since I said the liquidity provider as the oracle what you probably shouldn't do because you should have always a kind of a decentralized or a trustworthy entity out there that just really gives the data.
And I mean that's why it's good to have the roles always separated in there. We could report here the outcome but since this isn't this here the race kind of thing it's completely an offchain event so it has nothing to do onchain it cannot communicate there is no direct link to it so otherwise you need to um automate that and call a function that calls an automatically but how do you trust the onchain and then comes the whole oracle problem in there so we can report here kind of the outcome so we said yes and then we kind of close the whole thing I mean maybe one important point is also you always have an end date. I mean I mentioned that so there is always an end date and after that then you can only report the outcome because then you just know that the prediction market resolved then you have it here the the prediction market provider or owner can kind of now withdraw all the ETH and get the token back as well can the can the user here on this side but now here I'm the liquidity so let's go to um okay this one hasn't hasn't bought now because we used a burner wallet But here now if I would have whole tier tokens I could redeem it here. Now that's kind of the basic or the or the the basis around it and that's kind of we we broke it down in all these different components and it's definitely if you're taking these there is a lot things you can improve you can change out you can adapt it for your needs whatever you want to have. So if you have a really long running um thing like an election you probably have it differently set up than if you would have a sports betting app on a um on on a soccer game.
So there are really then you can think around what kind of oracles you want to integrate what is your trading mechanisms what is there there there are so many things to do it gets even more complicated you can if you look Kosis came out with the conditional token model that's kind of a very very sophisticated um repo as well where you have dependencies on outcomes so you can have whole chains of if this happens then this happens this happens so you can set whole things up you can have more tokens than only yes no you can have more outcomes in one contract, but it gets very more complicated if you want to if you if you want to do that. And of course, you can choose make and implement a more complicated um token standards for instance. Yeah, that's kind of the the thing. I just want to give a little bit an outlook what why why I think it's really interesting the whole prediction market like it is and how maybe it could evolve. Then that's how was this imagine you have you you're getting this question like I mean that's a very weird question I never read read this the first time I mean who who in the world can answer that that's kind of I mean you need to find I mean will a crisper based therapy for the chen muscular distributor reach phase three trials before Q3 2026 I mean that's a very narrowed down and probably some people want to have the information because maybe it's it's the company who want the information what's happening there and There are probably people out there who maybe know this or somewhere is the information but how do you find the right people?
How do you incentivize the people and what you can do to get the people and that's kind of the limitess probably of the the humans because we have just I mean I mentioned in the beginning you always have some events um but they need they need they need to be attractive and getting public attention but this one probably not. I mean nobody is talking about these only if you are in this field and that's why we having kind of these limiting factors of humans. So it's and it actually fits perfectly for these prediction. I mean we have attention. We cannot be on 10 different prediction markets and looking through all the questions all the time.
Then we need to focus on a topic and get in as soon as the the the topics get just more complex like this one. And then also we get very very much influenced by other people like what do people think and we having this hurt the this hurt hurting behavior and that's why I mean it's nothing new but here AI agents come into play. That's kind of this thing. So imagine you're spinning up swarm of people, swarm of bots, they in the internet and you fund a little bit in each of these prediction markets kind of in the questions you want to know and there are a ton of agents out there who kind of participate into into these prediction markets. I mean maybe it's not much because they run all the time.
They can run all the time and have the time in the world and if you think they're completely autonomous and they need to make some money somehow, it could be a good thing and we could get something like a Google of forecasting. So whatever future question you want to have, you put into this. You have all these agents running around out there and answering the questions and you kind of get a prediction market like a how how is it called like something to look into the future. Yeah. And that's why I think this this definitely this field has a lot of potential.
We're just in the beginning and I think these these new developments they will unlock a lot of potential in this in in these applications. In what sense? You mean trading? Yeah. I mean, yeah, I mean it could be.
I mean, it it it definitely depends in the in the legs region you are in with the markets. I mean, yeah, Malta is a good thing to go, but no legal advice. I have no I don't know. I mean, that's Yeah, definitely. I mean, as soon as you have something related with money and gambling, it all comes into this.
Yeah. In this bucket, you can integrate this very share, not just you. market because many forex traction prediction predict go up or predict will go down. Uh if you can integrate this A lot of people and a lot of problems with back and you can facing someone whatever lose you will win and take your Yeah, that's good. Um, how to combine the kind of the stock market thing with h AI ABI integration.
Yeah, putting kind of the prediction markets more closer to stock market trading and have this all combined formulas something. Yeah, it definitely has a big potential if this gets brought out to the mainstream for more people to participate. Yeah. Are there any other No, no, now everyone left. Sorry for that.
If there are any other other questions. Well, one question I don't know if you can address it but the way I see it the big problem with this for example super interesting question you presented that would be very beneficial to have a market on is that there is a real lack of incentive for anyone else except the people with knowledge to take the other side of the like why would I want to trade against some guy who works in a company that's in my opinion a very big structural issue markets Do you have any takes on what could be done there? I think that's exactly that what I kind of meant because when you when going back to this question here I mean that's just like like you said it's just I mean probably I don't know two handful of people who can probably answer this question they're working probably directly with the company and I think pro with these agents and having more access to all the data around you can kind of more getting better outcomes in in these stuff because I mean it could be then also incentivized I mean if they if I mean you you can also play is of course prediction market. You can also tweak the the results if you're putting money in there. So if you want to if you want to show that we won't be there and you want to surprise your competitors kind of thing.
You're betting against it and everybody believes it doesn't come out and but it comes out and you have maybe the big disruption effect. So of yeah definitely I mean that's a good point. I'm pretty sure it would be nice to discuss. Oh very cool. Yeah.
Yeah it would be nice to talk to you. Thank you all. Thank you. [Music]
Automatic transcript — names and jargon may be misspelled.