#Prediction Markets

1 messages · Page 1 of 1 (latest)

tame quiver
#

Goal: Enable open, on-chain prediction markets to crowdsource insights and incentivize accurate forecasting using Soroban smart contracts.

Description: Build a Soroban-based prediction platform that:
-Allows users to create and trade on outcome-based markets (e.g., elections, sports, crypto trends)
-Uses conditional tokens and liquidity pools for market resolution
-Includes reputation or staking mechanics to deter spam and encourage truthful participation

Alignment: Brings powerful crowd-driven forecasting to the Stellar ecosystem, highlights the utility of oracles and smart contracts, and opens new DeFi-aligned use cases for speculation, governance, and collective intelligence.

pliant frigate
#

Our risk market which we are building for insurance can easily be repurposed. In fact, right now our framework is more suited for vault based prediction market rather than insurance.

#

We plan to change this to more of a parametric insurance protocol. If you think about it parametric insurance is basically a kind of prediction market.

turbid thunder
#

I got a custom version of LMSR here that supports multiple liquidity providers who don't change the price after they join

turbid thunder
#

here is the paper

pliant frigate
#

wow, thank you! this might help insurance too

tame quiver
turbid thunder
#

It is just that prediction markets are totally different from a dex like uniswap and should not be treated like one because prices should only be between $0 and $1. They should not go to infinity. Price goes to infinity is fine for uniswap because tokens can go to the moon and blow up but for prediction market, price should not go above $1. That makes no sense. Whatever CPMM uniswap and Dex's use should not be used for prediction market when there is a better one like LMSR that use logistic curve that has horizontal asymptote at 1.

turbid thunder
#

If you want to try it yourself, very easy. Calculations so fast that it is instantaneous on client side. Just a few exp() and ln()

#

And these are actual calculations, not fake. Fully collateralized.

#

I dont know why other websites choose CPMM when CPMM is clearly not built for this

pliant frigate
pliant frigate
# turbid thunder It is just that prediction markets are totally different from a dex like uniswap...

Makes sense, what's why vault based approach seemed a natural v1 try for us. However, we are limited only by binary outcomes. We have 2 vaults - a risk and a hedge vault, and based on oracle data and maturity date - one of the vault is liquidated, and other side wins. The problem for this though is that we can only have binary bets ( which is basically insurance, you either get paid or not)

Your approach also probably have the advantage of having multiple (more than 2 ) outcomes.

I mean, even with vault method we can probably have multiple outcomes - in which more than one vault will be liquidated.

#

@turbid thunder - Are you the author of the paper? We had internal discussions on Vault vs AMM architecture and would love to hear your thoughts.

turbid thunder
#

I wrote it

#

Let's say there are 3 outcomes. Buying 2 "yes" conditional tokens on the 2 opposing outcomes is the exact same as buying 2 "no" conditional tokens on the first outcome according to the math of LMSR

#

e^2/(e^2+e^2+e^0)=e^0/(e^0+e^0+e^-2)

pliant frigate
#

what is e here?

turbid thunder
#

eulers number

#

e≈2.718

pliant frigate
#

ah, I get it now ...

#

Okay, starting from LMSR pricing model - you have three outcomes

#

Had to to get help from GPT , haha

turbid thunder
#

I feel you need to consider how to distribute rewards in the end.

#

That is why we need these pricing models

#

You say one of the vault is liquidated and the other one wins

#

What if we are right before the resolution and a ton of people flood in to buy the winning one that they are certain will win

#

This will dilute the winnings the people who came in before deserved

turbid thunder
#

I think such a model has no incentives

#

Like in a basketball game in the first quarter team A has a 20 point lead over team B and everyone buying team A but you buy team B and at the end of the game team B looks to be winning and everyone rushes to buy team B. That means at the end team B vault is so much while team A vault is nothing so you end up with nothing even though you guessed at a point where most did not believe

#

Each conditional token should result in one usdc in the end for the winners

#

People should be buying conditional tokens that will guarantee 1 USDC per conditional token and their conditional token count will stay the same and always give 1 USDC, not some proportion of both the winning and losing vaults based on their proportion of the winning vault.

#

Conditional token can be collateralized if you find a counterparty who agree to bet $1-(your price) or if there is a liquidity provider.

#

Like you want 100 conditional tokens of Team A at $0.55, so you need to find someone else who is 100 conditional tokens of Team B at $0.45

pliant frigate
turbid thunder
#

What is something big happened between X+1 and X hours before the flight?

pliant frigate
#

hmm I meant to send this -

#

For some reason, the server blocked me

pliant frigate
turbid thunder
#

This model sounds reasonable for flight insurance case. There is a model for pricing conditional token without AMM that is just placing limit orders for the conditional token and hoping the counterparty will take the limit order.

pliant frigate
#

I think you hit the nail on the head - the biggest advantage of any AMM based architecture is that you do not need any counterparty. For me, I need to have counterparty! I cannot sell insurance if there is no counterparty.

turbid thunder
#

you and the counterparty agree on minting conditional tokens and each of your conditional tokens will become a USDC and their conditional token becomes nothing if you win and each of their conditional tokens becomes a USDC and your conditional token becomes nothing if they win.

#

lets say 100000 conditional tokens of yes were minted so there has to be 100000 conditional tokens of no minted. That means the pot is 100000 USDC.

#

if yes won, the conditional tokens of yes must each turn into 1 USDC

#

LMSR actually mints an infinite amount each priced under $1 and the loss is bounded for LP because the area under the curve from current price to $1 is a finite amount.

#

by using logistic curve instead of that nonsense hyperbola from CPMM that prices conditional tokens above a dollar once you buy a certain amount.

turbid thunder
#

If you are doing a method that involves 2 vaults that just increase at different rates and prizes are given out proportionally to the winning vault, you cannot have the same promise as conditional tokens or else you undercollateralize.

#

Conditional tokens are the most neutral and fair incentive

pliant frigate
#

Sers, I do not know why I keep fetting flagged -

turbid thunder
#

The yes side will have x many conditional tokens minted. The no side will have x many conditional tokens minted. x yes tokens have to be sold to the yes group and x no tokens have to be sold to the no group and the whole pot has to x usdc

#

These requirements have to all be met for this to work

#

If all the yes tokens get sold, but some no tokens don't get sold, it fails

#

On the contrary, for LMSR, infinite yes tokens are minted. Infinite no tokens are minted. Any amount of no tokens can be bought. Any amount of yes tokens can be bought. Liquidity provider puts in money to power pricing. Even if infinite yes tokens were bought and yes wins, liquidity provider does lose everything, but never goes negative. A fee can be added to incentivize liquidity providers.

#

When a winner who is 10% of the winning vault wins, how much of the losing vault do they get? It is obviously they will get at least the 10% of the winning vault they put in initially.

#

If they joined at a time where they became 100% of the winning vault, should they get 100% of the losing vault? But what happens to the rest of the winners?

#

This is why we need promise of conditional tokens.

#

they simplify things, not make things more complicated

#

I understand what you mean by these vaults, but that is more complicated for me than thinking it in terms of conditional tokens because thinking about it in vaults just raises the question of how winnings are distributed in the end.

turbid thunder
#

In LMSR, when somebody buys a yes token, the liquidity provider mints the both the yes and the no token and pays for the no token. The buyer of the yes token would pay for the yes token. The price of the yes token increases. The price for the no token decreases. The person buys yes token an infinite number of times and the price of the yes token converges towards 1 and the price of the no token converges towards 1 minus the price of the yes token so converges towards 0 such that the infinite sum converges to a finite amount, that is the total liquidity they put in.

#

As long as you follow the rule of for each yes token minted, a no token must also be minted, and 1 USDC must be put in the vault after each pair token mint, the market will remain fully collateralized.

#

with a promise of converting each winner's token to a USDC

#

Before taking into account the fees they earned, how much the liquidity provider loses is simply a path independent integral of the price function and is bounded by a finite elementary amount

blissful orbit
#

@pliant frigate your messages should have an easier time getting past automod now

turbid thunder
#

With all this said, I do have all the clientside typescript of all the pricing and cost functions written a few days ago and legitimately working. exp() and ln() functions can be easily, quickly, efficiently, and precisely calculated by any computer program in any language as evidenced as any regular computer running the website typescript instantly. I haven't tested the rust port but I believe it should work the same as it is just simple programming of mathematical expressions. Just go to my website and test it yourself.

#

This logistic curve is actually expected because of how liquidity providers provide their liquidity in LMSR. It is not an approximation but it is nice, accurate, precise pricing from the mathematics

#

Having such a curve is possible here and not on a normal dex because a normal dex uses a hyperbola for pricing and a hyperbola has vertical asymptote that make it go to infinity

#

I mean the ones that use standard CPMM

#

I mean it is possible for a normal dex to show the hyperbola but the behavior of the hyperbola becomes so poor the closer you get to its asymptote that is becomes bad UX

#

You have to zoom out and it is just so steep the closer you get to its vertical asymptote

#

I suspect that polymarket uses CPMM but limits how much you can buy. You can't buy past a certain amount

pliant frigate
#

I understand your LMSR in principle, we might eventually switch to something like this for price discovery of insurance. Right now we will have to come up with risk for a particular market. For example, if we know that all flights from Dallas gets delayed, so cost of buying insurance from there should be higher. With LMSR approach - market will decide the price.

We want to bring V1 to market asap before trying out more models

pliant frigate
#

we kept it pretty simple!

turbid thunder
#

I just want to promise users one USDC per conditional token if they win. They will be really happy if this is possible. For this promise to be fulfilled, yes/no tokens must be minted in pairs and must be both bought at the same time to be valid. Whether the buyer is a counterparty or the market maker, as long as these are fullfilled, we will be in a fully collateralized system and in this fully collateralized system, can we fullfill the value of the winner's conditional token.

#

Without conditional tokens, we disincentivize people who come early when we are uncertain and incentivize people who come late when we are closer to certainty.

#

Nobody would want to join early and everyone would want to come as late as possible. In fact, nobody might join at all. This is like an inverse ponzi scheme.

#

I think your system works really well if chances do not change as the market is open, but for prediction market, chances do change. For example, a presidential debate might happen and the candidate's chances drop sharply. This is the case where conditional tokens becomes better than a system that works well when probabilities do not change much.

#

In a condition tokenless system, somebody might buy a position that team A will win at 20% current odds for 100 USDC and later somebody else might buy a position that team A will win at 80% current odds for 100 USDC. Team A wins. How much is distributed for the first person and how much is distributed for the second?

pliant frigate
turbid thunder
#

Just make sure to do events that don't change probability much as the market stays open or else you might be running an inverse ponzi scheme or something unfair which actually has a strategy of buying right before buying ends.

turbid thunder
#

I want to submit my project, but don't know how complete my project should be before submit. Is the client side typescript of the simulation following math formulas enough? I know you submit #35. What are next steps after the website.

pliant frigate
#

This is not for a basketball game where probabilities can change fast, but for things like hedge against wildfire , hurricanes and flight delays.

All insurance is structured like this - you can only buy insurance 24-48 hours in advance for a flight for example. We will stop withdraws and deposit during the flight + X hours to stop anyone from gaming the system.

pliant frigate
# turbid thunder I want to submit my project, but don't know how complete my project should be be...

We did not get picked for 35. We applied again for 36. So far, we have 2 vault system as POC with both contracts and frontend.

Our next goal is to open source our vault as a DEFI primitive for other developers ( we are working with open-zeppelin with this)

We will make the changes as proposed in our technical documentation to make a functional insurance and onboard DEFI yield seekers (counter party risk takers) before starting to sell.

turbid thunder
#

Should I submit my website?

pliant frigate
#

We also did a simple Monte Carlo simulation to check if the yield is sustainable assuming 5% flight is delayed over 3 hours in US domestic flights (we got that number by looking at 2 year average). The result was positive.

tame quiver
turbid thunder
#

Chris anatolio said something about this before

tame quiver
#

Yeah you might be able to phrase it/structure it in a way that isn't. Or focus on an initial usecase that avoids it.

#

It's getting kind of grey with a lot of applications

turbid thunder
#

In the USA, it is under CFTC and prediction markets have been winning in court

pliant frigate
#

We moved away from betting to insurance too - and honestly, I'd rather fix insurance. Web2 insurance is broken!

tame quiver
#

We'll see what emir says but I hope that doesn't discourage you from building it.

turbid thunder
#

Kalshi even used the word "bet" when referring to march madness games and still win in court

tame quiver
#

Should build it for a hackathon or something where the rules are less strict

pliant frigate
#

where are you based @turbid thunder there has to be some EasyA hackathon coming up - if not, build it at the next ETH Global ( Stellar will probably not be a sponsor there though)

tame quiver
#

We have a couple of virtual ones coming up

turbid thunder
#

Im in california now and only ever been to 2 of them. First one was flying from toronto to hong kong. Then 2nd one from sf to toronto. I am just an unemployed college undergrad who never got a full time job.

pliant frigate
#

bruh! I am in California right now too ...where in Cali are you based?

turbid thunder
#

Bay area

pliant frigate
#

Chico atm! but I am normally in Seattle - I think we are spamming this channel now. I will DM you 🙂

blissful orbit
#

Sac area checking in. 😃

turbid thunder
#

Now that you mention easy a hackathon, i wonder whatever happened as an aftermath of first place team being discovered to not actually using smart wallet

#

For my opinion on predictions market, I see it more as futures trading than gambling. If prediction market is gambling, then futures market is gambling.

turbid thunder
calm dawn
sinful raven
#

rebrand it as a platform for futarchy, and now it's governance 😂

turbid thunder
#

Is that for every type of event or only for specific ones like sports? I feel like some markets are different than others. There are more markets other than sports and some may be useful.

#

I always thought prediction markets were gambling, until I searched online and saw they were not

pliant frigate
#

Could you rebrand it as hedging against inflation? and then build a product which is basically prediction market for fx market - just don't say it out loud.

turbid thunder
#

I will make the only markets you can run on the platform as scalar markets on commodities and other things values. Questions like what value will barrel of oil be by July 2025? And answers being like 0-10, 10-20, 20-30, 30-40, 40-50, 50-60, 60-70, ... and this will therefore make it a high leverage platform rather than something else. Liquidity providers provide separate liquidity for these ranges. Each range will be a binary option of yes and no. This will serve purely as a derivative as a financial instrument.

#

forex, metals, stocks, foods, cryptos, indices

#

real estate

#

the difference between this and the high leverage is expiry dates and the margin calling

#

like euro is above $1.10 at end of month