pull down to refresh

Predyx BuddyPredyx Buddy

https://ekung.io/predyx-buddy

This was just a little side project to help people make smarter bets on Predyx.

Enter your beliefs on what the correct probabilities should be, and the tool will tell you the optimal betting strategy. There's also a slider for how conservative you want to be. I predict there to be some fairly good opportunities for strategic bets, especially in multi-outcome markets where the optimal strategy is harder to think through.

Consider this a Christmas gift to all stackers! But if you benefit from this tool, I'd appreciate any thanks in the form of sats, as well as feedback for improving the tool.

Hope this helps! Happy predicting!


The Math Behind PredyxThe Math Behind Predyx

Predyx uses a "logarithmic market scoring rule", basically, a pricing algorithm. When you buy or sell shares on Predyx, you are not buying or selling shares from another market participant, you are buying and selling shares from the platform. Here is the explanation in their own words, with a focus on helping market creators. My tool is meant to help market participants, not creators.

Let there be outcomes, and let be the current number of outstanding shares for outcome .

The LMSR rule says that the current probability (and therefore share price) of outcome is:

where is the "market liquidity" parameter, something set up by the market creator which influences how much sats are available in the market to earn. (Higher liquidity means the market is harder to shift but there's more potential earnings for each trade; lower liquidity means the market is easy to shift but there's less potential earnings for each trade.)

Note that the market creator also "seeds" the market with a number of initial phantom shares that you won't see in the order history, but serve to set the initial probabilities of the market.

The nice thing about this formula is that there is an easy rule to tell you how many shares of each outcome to purchase/sell in order to shift the probabilities towards what you think are more accurate:

Optimal betting strategyOptimal betting strategy

Let indicate the current market probabilities, and let be your target probabilities (the probabilities that you believe more accurately reflect reality). Choose one outcome to hold fixed (that is, to not buy or sell any shares). For simplicity, let's call that outcome 1. Then, for every other share, the optimal rule for buying is:

If you believe that outcome is more likely than the current probabilities indicate, you'll buy more of outcome . If you believe that outcome is less likely than current probabilities, you'll sell more of outcome .

The strategy can also be adjusted so that it can be implemented with only buys. You simply add a constant to all until none of them are negative (sales) and all of them are positive (buys). Since shifting all shares by a constant amount doesn't change the target probabilities, this results in the same expected profit from the trade.


@mega_dreamer @Team_Predyx @Coinsreporter @grayruby @BlokchainB @Undisciplined @OT @Wumbo @south_korea_ln @SimpleStacker @ACYK @softglitter2d @ken @DarkStacker @itsTomekK @needcreations_
@Solomonsatoshi @afpsniper88
@kepford @Cje95 @Jer

So cool!
I think Predyx uses more sophisticated formula, I mean maybe some adition to the formula. It's not that you can always win or there's always some arbitrage on a market. I'm not sure though. My maths is too weak to understand formulas a lot.

I'll still try this tool and see if it works.

reply

No sophisticated formula - @SimpleStacker's math is 100% correct. We use LMSR.

reply

I think my cost estimates for multi outcome markets may be misleading though. I realized that the order you buy shares and the amounts you buy them in matter. I think to minimize costs when executing a multi outcome strategy would be to buy the shares one by one, is this correct? Since this is cumbersome, maybe there should be a way to simultaneous buy shares in multiple outcomes with one trade.

reply

There is reason we do it one-by-one is:

  1. The cost to buy bundled shares across multiple outcomes is always less than the cost to buy one-by-one.
  2. Bundled shares will be boon to the traders but bane to the creators. In other words, the creator will loose more sats.
reply

That makes sense as a choice to make for your business. But it also means my calculator is wrong because it uses a bundled price. Something I'll need to go back and change.

(I guess the user can replicate it by buying one share at a time, but that is way too much work; also racks up transaction fees.)

reply

Oh wait, both ChatGPT and Gemini are telling me that the cost function for LMSR is path independent. So executing a bundled trade using multiple single-outcome trades only costs more because of transaction fees, not because of the probability paths. If that's the case, my calculator is fine, since it ignores fees right now anyway.

reply

Thanks for pointing that out. I'll have to re-visit my assumption regarding bundled shares.

The optimal bet is only optimal if you have the correct beliefs, which you likely don't, so there isn't really an arbitrage opportunity here. The "expected profit" could be wrong if your beliefs are wrong.

Afaict, my math is the same as theirs. But I simplified the presentation a bit (with my discussion of phantom shares which abstracts from the parameters)

reply

Nice piece of work!

Wish to see Predyx updating their pricing algorithm one day, or at least allow for API calls (so your tool could run the strategy) or a least! limit orders.
I know all will come one day, fingers crossed!

reply

Thanks Tomek,

Wish to see Predyx updating their pricing algorithm one day

Regrading the algo, I digged deeper into maniswap only to find out it is NOT loss capped. Meaning - the creator could loose much more than the anticipated loss as compared to LMSR where the max loss is fixed.

The reason manifold is able to do it is they can just mint MANA out of the thin air at the time of market resolution. That's why we've been experiencing MANA inflation.

If we do it with sats, we'll probably go bankrupt in few months.

After investing so much time on to find a perfect AMM, I've come to a realization that it doesn't exist.

Thus we've decided to go full blown CDA/CLOB just like Poly and Kalshi. Should be released by March. Of-course our CDA will be a hybrid CDA will spillover to LMSR. So there will always be a price for spot buying/selling. If there is a limit-order, the trade will be executed against those orders, if it doesn't exist the LMSR will be used.

allow for API calls

Yes - we're preparing to open up our APIs. Most probably before March.

reply

Are you suggesting wild ass guessing is not the optimal betting strategy?

reply

Now you can wild-ass guess more sophisticatedly

reply

I am so smart. SMRT.

reply

Very cool!

I've recommended they implement something like this for a new mechanism that allows participants to directly input the probabilities they want and Predyx tells them the cheapest way (including sales) to get there.

It doesn't look like fees are taken into account in your tool (maybe they don't matter for what you're trying to do). Something that might be helpful would be a tool that gives the best ROI, based on beliefs and fee structure.

reply

I thought about including the fees, but I felt that would be too many input parameters to adjust, making the tool more unwieldly. It's easy enough for users to check the fees on their own and subtract them out from the cost and expected payout.

I don't know of Predyx has an API, but a cool thing would be if the user could simply enter the URL of the market and have all the parameters auto-filled. @mega_dreamer @Team_Predyx

reply

First of all - very good work!! Thanks for building this.

Yes - we'll be opening up our APIs soon. Most probably before March.

reply

Yikes!! My gut feelings are getting destroyed by maths!

reply

What I particularly like is the flexibility you built in with the conservative slider. In the real world traders are often not fully confident in their estimates and allowing them to scale their risk down without changing the direction of their conviction is critical for long term survivability.

If people take the time to understand how this works they can spot edges especially in multi outcome markets where current prices often over or under value certain events. Over time these small edges compound and that is how disciplined market participants end up consistently profitable while casual bettors wonder why they cannot beat the odds...

reply